Getting going with D/OpenGL

Bill Baxter dnewsgroup at billbaxter.com
Mon Oct 23 17:15:15 PDT 2006


clayasaurus wrote:
> Bill Baxter wrote:
>> What's the easiest way to get going with OpenGL under D?
>> It seems like Derelict has OpenGL support using SDL, but I don't 
>> really like SDL's single-window limitation or draconian approach to 
>> window resizing (i.e. trash all your textures).
>>
>> Are there other options?  What's the best supported / actively developed?
> 
> In defense of SDL...
> 
> 1) Losing the OpenGL context on window resize only happens on Windows

Really?  GLUT supports resize without trashing the context on Windows. 
I wonder why SDL can't.  I thought I remembered the argument went 
something like "some platforms don't allow it, so we just trash the 
context on every platform to maintain consistent cross-platform 
behavior".  But if it only happens on Windows, then I don't get the 
reasoning...

> 2) Multi-window support in the future 
> http://www.gamedev.net/community/forums/topic.asp?topic_id=380142

That'll be nice when it arrives, but according to Bob in the post below, 
it's been in the works since Fall of 2004, so I'm not holding my breath.
http://www.libsdl.org/pipermail/sdl/2005-July/069565.html

> However, if you are going to make an standard OpenGL GUI, you should 
> make it work with Win32, SDL, GLUT, GLFW, X, etc.

I think so too.  They all do about the same thing, so it would be nice 
to have them wrapped up in an abstract interface, even if only one of 
them is supported initially.

--bb



More information about the Digitalmars-d-learn mailing list