Оберон-клуб «ВЄДАsoft» https://zx.oberon.org/forum/ |
|
XDev + SDL https://zx.oberon.org/forum/viewtopic.php?f=8&t=128 |
Страница 1 из 2 |
Автор: | slenkar [ 19 июл 2013, 05:11 ] |
Заголовок сообщения: | XDev + SDL |
we could use SDL to draw dots to the screen? In the SDL examples folder it has testdyngl which draws dots to the screen the example can be changed to draw normal small dots easily here is the code to draw some white dots Код: "C"
|
Автор: | Zorko [ 22 июл 2013, 22:52 ] |
Заголовок сообщения: | Re: XDev + SDL |
slenkar писал(а): we could use SDL to draw dots to the screen? Yes, sure. ![]() Now all binding code is written in Oberon, and it's a good example how to bind XDev/Ofront to an existing C library. Later I need to rewrite the code into C (to have "smart linking" feature). |
Автор: | slenkar [ 23 июл 2013, 00:29 ] |
Заголовок сообщения: | Re: XDev + SDL |
sounds cool ![]() |
Автор: | Zorko [ 23 июл 2013, 18:31 ] |
Заголовок сообщения: | Re: XDev + SDL |
Some scalable graphic and drawing mono tiles features was added. ![]() I think we need to have possibility to write graphic software without dependence on screen resolution, therefore I've added actual (factual) and virtual coordinates. It allows to use virtual coords and stretch screen to any actual resolution. Just look at the samples. ![]() |
Автор: | slenkar [ 24 июл 2013, 05:27 ] |
Заголовок сообщения: | Re: XDev + SDL |
yep good windows demos ![]() |
Автор: | Zorko [ 24 июл 2013, 22:55 ] |
Заголовок сообщения: | Re: XDev + SDL |
Line and Circle procedures was added, GrDemo was updated. ![]() Drawing of actual pixels is enough optimal, but need to "update screen" manually - by calling GrScr.Update. At first I tried to update the screen in each call of PutPixel (by calling Sdl.UpdateRect), but it works very sloooooow. Drawing of virtual (stretched) pixels is not so optimal (need to remove multiplies and divides by changing to array with pre-calculated data), but it works perfectly. This optimization is for the future. What other ideas, mr. slenkar? ![]() |
Автор: | slenkar [ 25 июл 2013, 00:21 ] |
Заголовок сообщения: | Re: XDev + SDL |
GrScr.Update sounds ok can the pixel size be increased? or draw each pixel as a rect? (if they are bigger than one) |
Автор: | slenkar [ 25 июл 2013, 04:29 ] |
Заголовок сообщения: | Re: XDev + SDL |
If you want speed opengl can draw dots at different sizes. f.glPointSize(1.0f); f.glPointSize(2.0f); f.glPointSize(1.5f); Any game that works on spectrum should work on pc without slowing down, opengl should only be used for games that are too big for spectrum |
Автор: | Zorko [ 25 июл 2013, 11:46 ] |
Заголовок сообщения: | Re: XDev + SDL |
slenkar писал(а): can the pixel size be increased? Yes, it can.or draw each pixel as a rect? (if they are bigger than one) In this model the pixel size is specified in module GrConfig and may be any: Код: "OBERON"
Try to change the coords and don't forget to compile/rebuild all modules that configured by GrConfig. ![]() slenkar писал(а): If you want speed opengl can draw dots at different sizes. I agree. If someone needs pure SDL or OpenGl, he must forget about compatibility with Spectrum. f.glPointSize(1.0f); f.glPointSize(2.0f); f.glPointSize(1.5f); Any game that works on spectrum should work on pc without slowing down, opengl should only be used for games that are too big for spectrum ![]() Virtual model of coordinates adopted not for having possibility to draw a dot with any size (although it may be added in the future), and to rely on some coordinates for various screen resolutions. In the future we can add vector tiles/sprites and filters (like hq2x), and then the plan will be lit up even more new meaning. Btw, I am quite satisfied with the speed of my module GrPixel. Simply said this to show that there is something to strive for, and that you did not find this an ideal. ![]() |
Автор: | Zorko [ 25 июл 2013, 17:32 ] | ||
Заголовок сообщения: | Re: XDev + SDL | ||
Scalable graphic. ![]()
|
Страница 1 из 2 | Часовой пояс: UTC + 2 часа |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |