Sign in to follow this  

SDL or windows.h

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

Hi, is windows.h required in order to make a directx application? 

This is my first question I ever asked on a game programming forum BTW.

 

Thanks in advance.

 

 

Share this post


Link to post
Share on other sites

It's been a while since I was slinging C++, but I seem to recall that SDL (1.2) worked pretty nicely as a simple window management and input library to paper over the uglier ways you do that in raw Win32 code.  For initializing DirectX, or binding an OpenGL context, all you really need is the HWND of your main window to bind to, which SDL exposes.

Share this post


Link to post
Share on other sites

Thank you all I have my answers that really helped. 

I have made simple projects in Unity3D, and C++ however I am more interested in graphics programming so as I am writing this I am actively teaching myself the basic concepts of Direct X. I am also looking at OpenGL  However I prefer D3d because I have found more documentation for it than OpenGL.

Also  sorry for the late reply.

 

Thanks Again.

Share this post


Link to post
Share on other sites

Slightly late to the party but it might help.

 

In OpenGL, often people starting out (and for those who try to keep dependencies down) use GLUT (OpenGL Utility Toolkit) which provides the bare minimum for Windows creation (http://freeglut.sourceforge.net/) FreeGLUT is the more modern version of GLUT.

 

In DirectX, there has been made similar called DXUT. It used to be provided with the DirectX SDK but has now also been separated into a separate library (https://github.com/Microsoft/DXUT). This library will help you avoid dealing quite so much with the (admittedly archaic) Win32 API. Obviously because DirectX has limited platform support, the value of a toolkit like GLUT is perhaps reduced, but still handy nonetheless.

 

You can actually avoid most of the Windows API by using the Windows 8.1/10 store framework (and using C++/cx). I don't really suggest it because I don't think this technology is going to be supported for very long but it is still something you might be interested in knowing about. An overview: https://msdn.microsoft.com/en-us/magazine/jj991975.aspx

 

Also, if you did ever decide to go back to OpenGL (and if you are interested in graphics programming you will likely end up learning and using both), I find this a great place to start for documentation (http://openglbook.com/chapter-1-getting-started.html)

Edited by Karsten_

Share this post


Link to post
Share on other sites

This topic is 674 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this