• Advertisement

Archived

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

SDL and DirectX

This topic is 5040 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

I''ve got a curiousity kind of question. Is it possible to get Direct3d working using an SDL created window? I''ve been comtemplating trying some DX stuff besides just using OpenGL, but I absolutely hate dealing with win32 programming. One of the main reasons I went with SDL in the first place was because it wrapped window creation and manipulation up so neatly. Anyway, if anyone has any information about this one, I''d greatly appreciate it. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Maybe you could hard code it in the SDL library but that isn''t what you want to do so I think it''s impossible.

Share this post


Link to post
Share on other sites
SDL does not support Direct3D because Direct3D is not corss platform.

Share this post


Link to post
Share on other sites
Are there any other decent ways to handle windows besides SDL? Seriously, win32 is mad lame

Share this post


Link to post
Share on other sites
quote:
Original post by Instruo
Are there any other decent ways to handle windows besides SDL?
GLUT, wxWindows, Qt, Gtk, Gtk+... None of those will provide a window for DirectX, though.

MFC (eww), WTL (unsupported, so... meh), a Win32 window wrapper of your own (or a borrowed one, like mine), or Windows Forms. These are all compatible with DirectX.

Share this post


Link to post
Share on other sites
Well, looks like I''ll be sticking with OpenGL for a while longer. Thanks for satisfying my curiousity.

Share this post


Link to post
Share on other sites
As Oluseyi pointed out, you can hook to directx via Windows Forms. It probably solves a lot of your complaints with win32 and may be appropriate for what you want; though you''re tied to .Net platform with it.

Share this post


Link to post
Share on other sites
You could use the DirectX app wizard to create one for you or just copy/paste the code from the SDK or one of many website tutorials.

Share this post


Link to post
Share on other sites
Lazy..
The window-creation code is something you don''t have to remember. You only have to know how it works, which is VERY simple.

--
You''re Welcome,
Rick Wong

- sitting in his chair doing the most time-consuming thing..

Share this post


Link to post
Share on other sites
Initalizing DX using win32 takes about 10 lines of code.

It''s not like you have to actually do much windows interaction after that. Create the class, make the window, and set your message loop, and that''s pretty much it.

If you''re using DX, it''s not as if portability is an issue you''re dealing with in the first place.

*shrug*

Share this post


Link to post
Share on other sites
The forum FAQ also lists a number of sites with DX tutorials. Any one of these will give you the window initialization code you need and then you never need to look at it again.


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites

  • Advertisement