DGL https://delphigl.com/forum/ |
|
Starting with EasySDL https://delphigl.com/forum/viewtopic.php?f=19&t=6363 |
Seite 1 von 1 |
Autor: | Gowen [ So Feb 11, 2007 11:14 ] |
Betreff des Beitrags: | Starting with EasySDL |
Hello: I'm i newbie on this area and have some problems with EasySDL. I'm modifying the template, changing things, adding others, but can't set fullscreen. I tried to set FULL_SCREEN const to TRUE on EasySDL.pas but don't work, and add MyProgram.SetDisplay(800,600,TRUE) before MyProgram.Create, between MyProgram.Create and MyProgram.Start, after MyProgram.Start, and so on until before MyProgram.Stop. The first time i get an SDL error, because i changed it before construct it, but the next ones, SetDisplay don't work, it stays with 640*480 default size. How can i use SetDisplay method correctly? Or is there another way? I don't want to set it calling SDL directly because it's like use a hammer, and want to do the rigth way. Code:
Thanks |
Autor: | Gowen [ So Feb 11, 2007 13:22 ] |
Betreff des Beitrags: | |
I also tried to modify EasySDL code, in TEasySDL.InitSDL method, changing Code:
to Code:
as Jedi-SDL documentation says but nothing changes, perhaps it's hardcoded on another site, but changing consts Code:
don't work, nor width, height, nor fullscreen :( Also i forgot to say that i use Freepascal 2.0.4, and DGLSDK 2006.1 under WinXP but will compile code also under FreeBSD6 later. Thanks[/pascal] |
Autor: | i0n0s [ Mo Feb 12, 2007 10:39 ] |
Betreff des Beitrags: | |
That with Fullscreen seems to be left on the road will coding. You have to add the following code before SDL_SetVideoMode: Code:
This solve this problem for me. I hope it will be fixed in the next release. |
Autor: | Gowen [ Mi Feb 14, 2007 00:36 ] |
Betreff des Beitrags: | |
Now fullscreen works, but i found what seems an error. Citing JEDI-SDL help docs (included on dglsdk 2006.1) Zitat: if you wish to use double buffering you must specify it as a GL attribute, not by passing the SDL_DOUBLEBUF flag to SDL_SetVideoMode.
But EasySDL code does Code:
Code:
Erasing SDL_DOUBLEBUF makes few fps more (from 680 avg to 695 avg) on simple scenes, perhaps it's unnoticiable on complex ones. Also i have updated EasySDL with a new creator for manage Width, Height, FullScreen and Resizable, and fps average. |
Autor: | i0n0s [ Mi Feb 14, 2007 14:41 ] |
Betreff des Beitrags: | |
Thanks for the correction. Can you send me the corrected code, so I can update it in the SVN? |
Autor: | Gowen [ Do Feb 15, 2007 12:45 ] |
Betreff des Beitrags: | |
I sended you a pm with the url where is my EasySDL.pas version. Don't know if i break other things, as i don't know OpenGL. HTH |
Autor: | i0n0s [ Do Feb 15, 2007 15:08 ] |
Betreff des Beitrags: | |
I've read the PM and took the code into the svn, no code breaks happened. But I simple forgot to answer your PM, so sorry for that and thanks for the code. |
Seite 1 von 1 | Alle Zeiten sind UTC + 1 Stunde |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |