Archived

This topic is now archived and is closed to further replies.

DirectX with Win32 initialization

This topic is 5010 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I''m working with some others on a module-based gaming engine. Our goal is to provide class interfaces for different types of core modules that''re abstracted enough to provide a type of "mix and match" functionality with the engine. In other words, you could take a Glide renderer module, SDL sound module, and DirectInput input module and it should all still work together. I''m fairly new to programming with rendering APIs in the first place, but any experience I have is with OpenGL. I''m using a combination of custom Win32 init code and SDL (I pass my HWND to SDL to be able to have full control over it and still get the other benefits of using SDL). I have a few question regarding the matter: Are HDC and HGLRC objects specific to OpenGL, or are they standard for all rendering APIs (namely DirectX)? If you need anything cleared up just ask, but I *think* I explained everything well enough for the sakes of this post/question. ;-) Thanks.

Share this post


Link to post
Share on other sites
You''ll have to provide your own abstraction types to effect this kind of pluggable design. You''d have a base RenderContext interface, with D3DRenderContext, OGLRenderContext, GlideRenderContext (Glide?!) and so on as concretizations/specializations of the base type. Your library/engine interfaces would then be defined in terms of RenderContexts, so runtime and compile-time selections would work nicely. Same for input, audio, etc.

Does anybody use Glide anymore?

Share this post


Link to post
Share on other sites
Well Glide was only supported on Voodoo cards. Since nVidia bought them and chose not to continue its support only people with very old gfx cards use it.

Stick to OpenGL and DirectX and a software renderer if you want one.

Share this post


Link to post
Share on other sites