OpenGL vs DirectX

The Partridge Family were neither partridges nor a family. Discuss.
BobCrunch
Posts: 5
Joined: June 19th, 2012, 12:27 pm

Re: OpenGL vs DirectX

Post by BobCrunch » June 19th, 2012, 9:53 pm

I don't want to waste a lot of bandwidth with this topic because the focus here should be DirectX ... but if there is a short and quick answer to my questions, then it would be nice to keep in mind for later.

I followed the instructions on http://www.mrmoen.com/, but I got several link errors like:
1>------ Build started: Project: Test_OGL, Configuration: Debug Win32 ------
1>Test_OGL.obj : error LNK2019: unresolved external symbol _SDL_GL_SetAttribute referenced in function "void __cdecl InitGraphics(void)" (?InitGraphics@@YAXXZ)
1>Test_OGL.obj : error LNK2019: unresolved external symbol _SDL_SetVideoMode referenced in function "void __cdecl InitGraphics(void)" (?InitGraphics@@YAXXZ)

I'm using Windows 7 (i.e., 64 bit) so I attempted to link with the SDL x64 lib. When I link with the x86 lib, I get no link errors, but it indicates a startup error which isn't surprising. Incidently, isn't a Win32 application on a 64 bit system a little strange? Hmmm.

BobCrunch
Posts: 5
Joined: June 19th, 2012, 12:27 pm

Re: OpenGL vs DirectX

Post by BobCrunch » June 20th, 2012, 2:34 am

I'm going to create a DirectX application that colors my face red. The Windows SDK already has the OpenGL includes and libraries. You don't have to install SDL. SDL is a cross platform SDK for developing OpenGL applications that run on Windows, OS X, and Linux by recompiling. It turns out that I downloaded the wrong source file from http://www.mrmoen.com/. The correct file for Windows native OpenGL is opengl.cpp, not sdlopengl.cpp. The only properties that need to be added to the project are opengl32.lib and glu32.lib to Linker -> Input. Now back to DirectX.

Post Reply