I am currently writing a high level 2D game programming library that runs on
top of SDL. I currently have rendering backends for OpenGL and for the SDL
2D API. I want to add a third rendering backend for Direct3D so that the
numerous Windows users who have a 3D card but don’t have OpenGL drivers can
benefit from 3D acceleration. I still want to use SDL for event handling
and audio. I see three possible approaches:
Expose the DirectDraw interface SDL_SysWMInfo on Windows.
Create a Direct3D window in user code and somehow transfer it to SDL.
Add a SDL_DIRECT3D flag that tells SDL to create a Direct3D window,
analogous to SDL_OPENGL.
AFAIK all three would require changes to SDL. My questions:
Which of these approaches is best? Do any of these approaches have
hidden drawbacks?
Is there any chance of seeing these changes in a future version of SDL?
I am currently writing a high level 2D game programming library that runs on
top of SDL. I currently have rendering backends for OpenGL and for the SDL
2D API. I want to add a third rendering backend for Direct3D so that the
numerous Windows users who have a 3D card but don’t have OpenGL drivers can
benefit from 3D acceleration. I still want to use SDL for event handling
and audio. I see three possible approaches:
Expose the DirectDraw interface SDL_SysWMInfo on Windows.
Create a Direct3D window in user code and somehow transfer it to SDL.
Add a SDL_DIRECT3D flag that tells SDL to create a Direct3D window,
analogous to SDL_OPENGL.
AFAIK all three would require changes to SDL. My questions:
Which of these approaches is best? Do any of these approaches have
hidden drawbacks?
Is there any chance of seeing these changes in a future version of SDL?
All 3 approaches implement platform-dependent functionality.
If you simply want to do 2D over Direct3d, why not just implement
direct3d as a new SDL rendering backend ? Just like what is done with dx5…
I successfully integrated Direct3D to SDL with no changes to SDL. I
submitted that a long time ago to Sam to be a FAQ but I’m not sure if it
was included - I’ll try to find the email and send it again.
All 3 approaches implement platform-dependent
functionality.
If you simply want to do 2D over Direct3d, why not just
implement
direct3d as a new SDL rendering backend ? Just like what
is done with dx5…
Because my high level library should be able to take advantage of Direct3D
features that are not available through SDL.
I successfully integrated Direct3D to SDL with no changes to SDL. I
submitted that a long time ago to Sam to be a FAQ but I’m not sure if it
was included - I’ll try to find the email and send it again.
I think it got lost. Can you add it to the wiki project?
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
I successfully integrated Direct3D to SDL with no changes to SDL. I
submitted that a long time ago to Sam to be a FAQ but I’m not sure if
it
was included - I’ll try to find the email and send it again.
[Sam] I think it got lost. Can you add it to the wiki project?