A Question about Open GL?

Started by
5 comments, last by poorman40 20 years, 11 months ago
started learning Direct3D and never tried Open Gl at all. All my books are D3D based,but now i''m ata stage of doing more advanced things i''m having a lot of problems,mainly finding it too difficult. I''m seriously thinking about getting a 1 or a couple of good OGL books and having a go with OGL instead. There seems to be tons more help and code samples to help on the net for OGL than with D3D,nearly all the things i needed help for,i found a code snippet on the net for OGL but not D3D. q1: How easy is it to use the CG Toolkit(using it in a win32 app?)i couldn''t work out how to even get the basics running! q2:I spent quite a long time learning D3D 8/8.1,now it seems to keep up,i''m gonna have to learn pixel shaders.Is OGL any easier than D3D? Is it worth changing to OGL after so long learning D3D? q3:Most games most people make are FPS (meaning all in 3D)is it possible to do a pre rendered backdround like in adventure games in OGL like i''ve been doing in D3D? TIA.
Advertisement
if you want pixelshaders, you either have a gf fx or new radeon and use the fragment program extension or forget about changing to opengl. i dont know why you think opengl will make advanced stuff easier to do/understand.. to use advanced techniques to need the necessary understanding of how things work and if you have that it shouldnt matter if you find information about how to do it with opengl or d3d.

and no, i think you might even have a pretty hard time if you change now, because opengl doesnt come with a nice d3dx lib that contains hundreds of handy functions. you will have to use a lot of extensions to access the same features and add a lot of libs (there is no matrix vector math stuff etc.)

if your app is win32 anyway and you already know d3d then changing to opengl definitely wont help to make things easier, just different.
f@dzhttp://festini.device-zero.de
If you know D3D, you know quite a bit of OpenGL. The concepts are really very similar. The major difference is an organizational one-- object oriented versus state/procedural.

Contrary to what Trienco said, OpenGL DOES include vector/matrix math functions.... not sure where he''s getting his info. It''s true, however, that certain D3DX functionality must be implemented by you in OpenGL (though GLU provides other such ''helper'' functions).

Overall, use whichever you prefer, and if you feel especially competent, make your program be able to use both.

How appropriate. You fight like a cow.
that would depend.. if you consider two functions to rotate/translate and multiply a matrix to the stack as matrix/vector math then yes, opengl has it. but compared to the pretty extensive load of functions you get with dx you''re literally on your own. the three above might be the most used, but i wouldnt have found any vector or matrix structs/classes in opengl, let alone all the operations to perform on them.
f@dzhttp://festini.device-zero.de
Both are good APIs. Look at some OGL if you like it switch, I prefer OGL. Also if you want your programs to be cross platform use OGL. Personaly I think its good to at least have basic knowledge of both. As for resources for D3D there is Nexe''s site that you can reach by going to the hosted sites link at the top of the page, also on the hosted sites page you will find a few more sites that teach D3D. Also you could use MSDN, thats always a good refference. Also use the docs that come with directx sdk. Thats basicly what I am using. actualy FPS means First Person Shooter I think, but yes you can do that in OGL. As for Cg I havent had time to try it and am already use to using extensions. Also if you want pixel shaders and you don''t have a FX or new Radeon, I believe you can achieve some(if not most) of the same effects by using Register Combiners which I know Geforce 4s have not sure bout 3s but I think they do too.
"I don''t care what you think unless it is about me"
You get pretty good pixel shader support on GF4''s. I just bought the CG tutorial book and just about all of the examples work on my card which is a GF4 TI 4800. As for which API to choose just try both and pick whichever you prefer as the other posters have suggested.
quote:Original post by dead_roses
Also if you want pixel shaders and you don''t have a FX or new Radeon, I believe you can achieve some(if not most) of the same effects by using Register Combiners which I know Geforce 4s have not sure bout 3s but I think they do too.


3s have them too.. but you should mention that they are nvidia only. thats the nice decision: d3d and limit yourself to windows or opengl and limit yourself to the graphic cards you have (or wait for the arb version).

the reason i wouldnt advice to change is because he''s expecting the "advanced stuff" to be easier with opengl. thats a little like changing from c++ to pure c, hoping that something will get easier, when in fact it''s still the same. (maybe different languages would be better.. the syntax changes, but the rest wont).

his advantage would probably be, that he''s used to indexed vertex buffers.. question is: would he like to have to use an extension just to get the (brand new) vertex object buffer extension and work pretty much the same like he''s doing in d3d?

looking at opengl wont hurt, but my guess would still be, that he will go back to d3d where everything needed is in one package and no different code paths for different vendors are necessary.
f@dzhttp://festini.device-zero.de

This topic is closed to new replies.

Advertisement