Jump to content

  • Log In with Google      Sign In   
  • Create Account

OpenGL worth the try?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
26 replies to this topic

#21 Crosstantine   Members   -  Reputation: 102

Like
0Likes
Like

Posted 07 June 2011 - 03:20 PM

As usual, thanks for all your opinions around this subject, I've been educating myself in order to understand some of the advices, now that I read a little bit I got some of your points, As I said before I will start with OpenGL mainly because I'm targeting my 2nd game to android and/or iphone, and both use OpenGL as core graphics API,

It's a little bit overwhelming that most of the tutorials I found are very old... 2005 or older, and most of the tutorials I found about OpenGL ES are written from people who read someone else tutorials and made a new one... with a LOT of mistakes and misleadings, I also looked around and found a lot of books with the same copycat techniques... the documentation found at OpenGL.org is a little bit cryptic and not newbie friendly,

The other thing that was "funny" (lack of a better term) is that the OpenGL ES samples does not run within the emulator provided with Android SDK, after several hours of changing the code and putting some debug messages (and loosing some hairs) I found a forum which claims that emulator does not support OpenGL ES... what a mess... how can I create a game that I need to deploy at my phone every time I need a test? is there a way to create an API abstraction layer to run code in OpenGL at desktop and then port it to OpenGL ES without rewriting all the code again?

Do you have a GOOD tutorial, a proven tutorial that has a NEHE like experience but with a newer versions of OpenGL?

Thanks for your support.

Sponsor:

#22 mhagain   Crossbones+   -  Reputation: 8275

Like
1Likes
Like

Posted 07 June 2011 - 04:00 PM

This page is something of a goldmine when it comes to dealing with OpenGL tutorials: http://www.opengl.org/wiki/Common_Mistakes (yes, even the NeHe tutorials are guilty of many of the mistakes here). By all means follow a tutorial, but keep that to hand a reference for correcting things as you go.

For modern OpenGL it doesn't get much better than this: http://www.arcsynthesis.org/gltut/

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#23 Crosstantine   Members   -  Reputation: 102

Like
0Likes
Like

Posted 07 June 2011 - 08:39 PM

thanks for the links, they're priceless, the common mistakes is really a very nice link to have in my bookmarks :D I think it will save me tons of hours trying to figure out what I did wrong (mainly when you check a tutorial and everything is exactly as the tutorial but you still get the error).

#24 NightCreature83   Crossbones+   -  Reputation: 3031

Like
0Likes
Like

Posted 08 June 2011 - 05:57 PM

As usual, thanks for all your opinions around this subject, I've been educating myself in order to understand some of the advices, now that I read a little bit I got some of your points, As I said before I will start with OpenGL mainly because I'm targeting my 2nd game to android and/or iphone, and both use OpenGL as core graphics API,

It's a little bit overwhelming that most of the tutorials I found are very old... 2005 or older, and most of the tutorials I found about OpenGL ES are written from people who read someone else tutorials and made a new one... with a LOT of mistakes and misleadings, I also looked around and found a lot of books with the same copycat techniques... the documentation found at OpenGL.org is a little bit cryptic and not newbie friendly,

The other thing that was "funny" (lack of a better term) is that the OpenGL ES samples does not run within the emulator provided with Android SDK, after several hours of changing the code and putting some debug messages (and loosing some hairs) I found a forum which claims that emulator does not support OpenGL ES... what a mess... how can I create a game that I need to deploy at my phone every time I need a test? is there a way to create an API abstraction layer to run code in OpenGL at desktop and then port it to OpenGL ES without rewriting all the code again?

Do you have a GOOD tutorial, a proven tutorial that has a NEHE like experience but with a newer versions of OpenGL?

Thanks for your support.

The D3D documentation can be equally cryptic in certain situations and if you pick D3D skip everything before D3D11, if you need to target older hardware(D3D9 and up) use the feature levels in the D3D11 API this will allow you to write you D3D stuff more transparently. The graphics stuff in XNA is D3D9 based but models the D3D11 level closely as in immutable rasterisation state classes and certain other things.

The fact most games support D3D is historical as state before and pre 2005 OpenGL was lacking features that D3D9 did implement and thus most developers switched to this API, nowadays most stuff is done in shaders and HLSL and GLSL offer the same capabilities. If you wish to write shaders that are supported by both OpenGL and D3D use Nvidia's CG language it has backend hooks that make it work on both, side note HLSL and CG are more or less the same language.


Seeing that most stuff now is done in shaders you benefit far more from learning how blending operations work as you need to be able to express them in shader code in most cases.


Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, Mad Max

#25 mhagain   Crossbones+   -  Reputation: 8275

Like
0Likes
Like

Posted 09 June 2011 - 03:51 AM

I wouldn't quite say "skip everything before D3D11". If you need to target Windows XP then D3D9 is still be best choice, and is a surprisingly clean and elegant API with just a few (but very few) places that make you go "WTF!" Compared to the contemporaneous OpenGL versions (2.0, 2.1) it's definitely much easier to use, more sensibly structured, and needs significantly less lines of code (compare SetVertexDeclaration with the mess of glEnableClientState/gl*Pointer calls, although the VAO extension - if available (which it may not always be at this target level) - balances things off). D3D10 is defintely one to skip though, and if needing to target XP isn't a consideration then going straight to 11 makes sense.

All assuming that one is targetting Windows only, of course.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#26 wildboar   Members   -  Reputation: 281

Like
0Likes
Like

Posted 09 June 2011 - 12:17 PM

The glEnableClientState/gl*Pointer calls are confusing at first, but once you have it working once, you can pretty much just copy and paste the same bit of code over and over.
OpenGL has a great mini unofficial SDK thing which comes in the form of code/shader samples. Can find it here: http://www.g-truc.net/
The sample pack is very easy to read and concepts can be understood within minutes.

#27 Dave Astle   Senior Staff   -  Reputation: 2307

Like
0Likes
Like

Posted 09 June 2011 - 09:26 PM

The other thing that was "funny" (lack of a better term) is that the OpenGL ES samples does not run within the emulator provided with Android SDK, after several hours of changing the code and putting some debug messages (and loosing some hairs) I found a forum which claims that emulator does not support OpenGL ES... what a mess... how can I create a game that I need to deploy at my phone every time I need a test? is there a way to create an API abstraction layer to run code in OpenGL at desktop and then port it to OpenGL ES without rewriting all the code again?

Go here, register for a free account, and download the Adreno SDK, which includes a full OpenGL ES 1.x/2.0 layer implemented on top of desktop OpenGL, over 50 samples and tutorials, and a sample framework for building on Android and Win32. We'll soon be releasing an updated framework in which all samples will build for Android and Win32.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS