yet another OpenGL/DirectX questions

Started by
4 comments, last by Tutukun 18 years, 4 months ago
I know there are a noob questions, so pls dont laugh as u reading further on :D Are there a lot of difference between OpenGL and DirectX? I heard that OpenGl is easier to learn than DX, So If i learn OpenGL and then proceed to DX ( which -in my opinion- issomething u have to know to get a gamedev job). Will it make the DirectX learning process less painfull? Also , How long would it normally take for someone with avarage IQ + abit below avarage C++ skill, to learn OpenGL/DX to complete a game with the complexity equal to 3d Pacman. Thank You Ps sori for my english, i know it sucks :(
Advertisement
Learning OpenGL before DirectX would help a lot, as it did with me. But if you dont know a 2d API, it may be eaiser for you to learn that first and may make learning OpenGL easier. Try SDL then move on to OpenGL then on to DirectX, that is what I did.
I'd work on getting your C++ skills up to par, if you really think they're below average. If you don't have a full understanding of pointers and memory management, using any of those libraries is going to be tough.
id start with plain ole opengl, since i consider it as easy as you want it to be.
the difference between opengl and direct3d is that opengl uses a procederal approach in a client/server enviroment while directx uses com (common object model) which is sorta like c++
directx does work in c compilers that support com, so a c++ compiler isnt completely necessary, but most would get offended at that line.

for the most part you do the same steps in opengl and directx, so most often its not impossible to allow the end user option of selecting the api along with the resolution somewhat like you see in modern games

basically the bottom line lame mans terns is..

you set up the box (viewport)
set the perpective (they call it a matrix transform)

preload you traingle vertex arrays to the api usually through buffers that the api handles (you can throw in colors with the vertexes- optional)

preload the textures, api specific also (textures are optional)


-per frame-
black out the box
do any per frame rotations or movements (matrix transforms)
set the lights (optional)
colors in opengl (default is grey- if you set the colors in the vertexes, then ommit this, directx you pass colors with the vertexes)

-do this per object
set the texture
select the vertex buffer

now after all the appropiate buffers where sent to the api, you flush the backbuffer/endscene
-end of frame-

basically a wrough sketch of the process
speaking of useing multiple api's, has anybody had sucess in useing multiple versions of directx in the same project?

i have problems when linking multiple versions
opengl and anyversion of directx liink together fine however
thx for all the replies guys :). Ive bought the Instroduction to DX 9 by Frank Luna, but now i think I will learn OpenGL first b4 I start on that book.
Again thx for all the advices

This topic is closed to new replies.

Advertisement