PDA

View Full Version : Getting rid of SDL



rsforster
02-14-2006, 10:49 AM
Currently I use SDL to initialize my OpenGL context. But SDL is becoming a pain because it is not very feature rich. (For example I want to open multiple independent windows in my application. I also want to remove the Window frame. Is there an example around here of how to initialize an OpenGL context with my own WinMain and WinProc functions?

Robin

jide
02-14-2006, 12:02 PM
This is more Windows related than an advanced question. Use glut :)

Zengar
02-14-2006, 01:54 PM
Well, you can try out my library if you like experiments ;-) I woule appreciate having a beta-tester as well

I wrote it recently, it works only with Windows for now but appears to be rather stable. The site is http://wwwstud.uni-leipzig.de/~phi04daw/

Also, you should look into glfw(just google) and glut

rsforster
02-14-2006, 02:26 PM
Glut does not have the features I want either. I know you have to load the OPENGL32.DLL or something like that but I am not sure of all the details. I imagine that it is not that hard but someone should post an example of this somewhere.

Does your library come with source code?

Robin.

Zengar
02-14-2006, 02:46 PM
Yes, but it is written in object pascal

What features do you want then?

Generally, a MSDN article covers the topic of using the OpenGL on Windows rather nicely http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnopen/html/msdn_gl1.asp

Now, if you need multisampling, things will get rather complicated, as you need to select a special pixel format, that is not supported by GDI. You'll have to use a WGL_ARB_pixel_format extension. There should b esome tutorials on the net.

Humus
02-14-2006, 04:08 PM
You could for instance check my framework. I don't use anything but plain Win32 calls.
http://www.humus.ca/

Ozzy
02-14-2006, 09:42 PM
Try out GLFW which is running fine on unices, mosx, win32 ,dos & so on..

hazelwood
02-15-2006, 08:23 AM
Originally posted by rsforster:
I also want to remove the Window frame.
RobinYou can use the SDL_NOFRAME flag for this. For the other things I don't have a fully reliable solution though.

wazoo
02-16-2006, 11:37 AM
@rsforster if you're looking to write directly to the metal of windows, then Nehe's tutorials are a good starting point for creating your own WinProc and such.

The MSDN also has a few articles, but they're a tad older....okay more than a tad. But they're also there if you need (or prefer) another resource.

hth,