PDA

View Full Version : SDL as openglcontext in Lazarus



JC_
04-03-2010, 09:03 PM
Hi,

Is possible have SDL as frame context in lazarus form ? like lazarus/examples/openglcontrol/openglcontrol_demo.lpi or image: http:wiki.lazarus.freepascal.org/Image:kambi_vrml_browser.jpg

It looks that SDL can only create own app window and thats all..i dont know where start.

grudzio
06-03-2010, 09:35 PM
You can use SDL_putenv (http://www.libsdl.org/cgi/docwiki.cgi/SDL_envvars) function to force SDL to use an existing window instead of creating its own. Look for the SDL_WINDOWID flag.

JEDI-SDL package also comes with an example. It is located in the Demos/2D/SDLtests/testwin folder.

JC_
07-03-2010, 10:57 PM
thanks, about SDL_WINDOWID "hack" i read before

i hope that SDL example help (in any case its too much for my poor programming skill..) :)