Archived

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

colinisinhere

What 3d library?

Recommended Posts

I''ve tried OpenGL and Directx but they are confusing... it isn''t the 3d space stuff (I''ve taken a 3d class useing Elica[Logo] and i understand 3d stuff) it is how it works with Windows API... are there any good tutorials on how OpenGL or DX works with Windows API? And what is the best library... i''ve heard openGL is better than DX cuz it is easier to learn... is that right?

Share this post


Link to post
Share on other sites
It seems nearly everyone at some stage in their younger game development years asks this question:

Which API is better?

Well, to tell the truth, I belive both give an equivalent contribution to the scene. No one could ever decide which is truely ''better'' as most things can be done with both.

Since you are a beginner, however, I would recommend learning OpenGL from one of the excellent sites available (such as NeHe''s: nehe.gamedev.net) first as it is easier, but can get rather messy. Once you have acquired the skills and knowledge that can be gained, move onto DirectX / Direct3D programming. It''s alot more challenging and I, for one, am glad that when I was learning these API''s I learnt OpenGL first, then moved onto DirectX...

/*==========*\
- SCYTHE -
\*----------*/

Share this post


Link to post
Share on other sites
Well, can you program C++? If you can I recommend "Programming Role Playing Games with DirectX" - it''s quite good.

BTW, neither OGL or DX is the better API. Choose one and stick with it.

**************************
The best way to accelerate a Win9x machine is at 9.81m/s2

Share this post


Link to post
Share on other sites
quote:
Original post by colinisinhere
OK... but nehe.gamedev.net doesnt work for me... i read the tutorials and compile them (i use Dev-C++) and i get errors i dont know how to fix... thanks


what errors do you get? are they linker errors, compiler errors? if they''re just linker errors, you may not have the openGL libs installed on your machine. if they are compipler errors, the nehe tuts are Microsoft VC++ projects so unless you are remaking the project and including all dependancies you''ll have a tough time compiling them as it.

however, the code should work fine and you should be able to build your own project in your IDE using the same code. start from scratch and it should work out fine. the nehe tuts are as good as you''ll get for openGL stuff. dunno about DirectX stuff, b/C i haven''t looked at it yet.

-me

Share this post


Link to post
Share on other sites
quote:
Original post by colinisinhere
But when i try to run in fullscreen it says "Can''t Create A GL Rendering Context"



hrm, are you setting up the device context correctly?

hDC = GetDC(hWnd);

where hWnd is a HWND handle to your window''s window. and hDC is the device context you use to init stuff like:

//This creates a rendering context from hdc
hRC = wglCreateContext(hDC); wglMakeCurrent(hDC, hRC);

etc, etc..... basically look in the Init.cpp of the nehe tut and make sure that all the init code is getting called. put in a couple MessageBox(NULL, "here", "Error", MB_OK); calls in there to make sure the openGL init stuff is getting called.

-me

Share this post


Link to post
Share on other sites