Jump to content

  • Log In with Google      Sign In   
  • Create Account

Trying to comprehend OpenGL


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
12 replies to this topic

#1 Chris_F   Members   -  Reputation: 2387

Like
1Likes
Like

Posted 20 September 2012 - 02:02 PM

I'm coming from having worked mostly with Direct3D and only a small amount of OpenGL 1.x knowledge, and now that I'm trying to learn the ins and outs of modern OpenGL I'm having a very hard time understanding a few things, but none more than this business with deprecation. I'm trying to figure out what features I should or should not be using if I want to keep my code very core/forward compatible thing-a-ma-bob. I'm targeting 4.x specifically. Why is there no concise information available about what IS and IS NOT considered deprecated?

Even more confusing is when I run into things like this: I read online that GL_EXTENSIONS is deprecated in 3.0, so why on Earth can I still use it when I am using the latest glcorearb.h and a 4.2 core profile forward compatible context? I thought it was supposed to be removed for forward compatible contexts.

Sponsor:

#2 Servant of the Lord   Crossbones+   -  Reputation: 19658

Like
5Likes
Like

Posted 20 September 2012 - 02:09 PM

I came across these official quick reference cards a few months ago, I saved them for when I later use OpenGL. Maybe they can help? They color-code the deprecated functions, it looks like.
It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#3 Brother Bob   Moderators   -  Reputation: 8250

Like
2Likes
Like

Posted 20 September 2012 - 02:10 PM

There are plenty of tutorials focusing on the modern API. You can start looking at the Getting Started box in the OpenGL forum for a few of them. If you want a concise list of what's deprecated and what's not, check the quick reference card at the OpenGL Registry. At the registry you can find the API documentation as well which has all the information about deprecated functions but not as a very concise list of course.

#4 tanzanite7   Members   -  Reputation: 1304

Like
0Likes
Like

Posted 22 September 2012 - 12:34 PM

Even more confusing is when I run into things like this: I read online that GL_EXTENSIONS is deprecated in 3.0, so why on Earth can I still use it when I am using the latest glcorearb.h and a 4.2 core profile forward compatible context? I thought it was supposed to be removed for forward compatible contexts.

Either non-conforming driver (i doubt it a bit, what GPU?) or you do not have a forward compatible context. Sure you set it up correctly (drop code)?

Trivia: Glew uses that deprecated function which causes a crapton of errors - iirc, one has to allow use of experimental extensions to make glew use the proper functions to get around the problem.

#5 Chris_F   Members   -  Reputation: 2387

Like
0Likes
Like

Posted 23 September 2012 - 12:25 PM

Either non-conforming driver (i doubt it a bit, what GPU?) or you do not have a forward compatible context. Sure you set it up correctly (drop code)?

Trivia: Glew uses that deprecated function which causes a crapton of errors - iirc, one has to allow use of experimental extensions to make glew use the proper functions to get around the problem.


AMD HD 5850 and glGetString(GL_VERSION) is reporting a 4.2 core peofile forward-compatible context, and glGetString(GL_EXTENSIONS) still works without any errors.

#6 tanzanite7   Members   -  Reputation: 1304

Like
0Likes
Like

Posted 23 September 2012 - 01:00 PM

AMD tends to be more strict about spec than NVIDIA (for circumstantial reasons), but seems they do not bother to disable that function ... understandable. One of course should not use the function regardless of whether it works with one-or-other driver. I recommend to get a debug context with all the debugging bells and whistles enabled (not available on my hardware, so not sure about their quality currently) or use gDebugger (which definitely does the job) to highlight that kind of problems.

#7 3Ddreamer   Crossbones+   -  Reputation: 3157

Like
0Likes
Like

Posted 23 September 2012 - 06:46 PM

Hi,

A quick question: Does OpenGL deprecated features ever force the GD to change game code?



Clinton

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#8 Brother Bob   Moderators   -  Reputation: 8250

Like
0Likes
Like

Posted 23 September 2012 - 06:58 PM

Hi,

A quick question: Does OpenGL deprecated features ever force the GD to change game code?



Clinton

If the rendering code and the game code are sufficiently separated, then you don't have to modify the game code.

#9 3Ddreamer   Crossbones+   -  Reputation: 3157

Like
0Likes
Like

Posted 23 September 2012 - 09:20 PM

Is OpenGL ever a part of a render engine (separated) (or a game engine source code) or is OpenGL a part of the framework?


Clinton

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#10 Brother Bob   Moderators   -  Reputation: 8250

Like
1Likes
Like

Posted 24 September 2012 - 03:50 AM

Yes, it can be part of both a rendering engines and frameworks. It is wherever you, or some third party library, use it.

#11 L. Spiro   Crossbones+   -  Reputation: 13612

Like
3Likes
Like

Posted 24 September 2012 - 05:01 AM

Run your program through gDEBugger. It will show you when you are using any kind of deprecated functions or macros.
Remember, functions are not the only things that can be deprecated, and gDEBugger is probably the best way to make sure you are not using anything that is.


L. Spiro
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#12 3Ddreamer   Crossbones+   -  Reputation: 3157

Like
0Likes
Like

Posted 25 September 2012 - 07:40 PM

Thanks! I love this community! Posted Image


Clinton

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#13 Koehler   Members   -  Reputation: 228

Like
0Likes
Like

Posted 27 September 2012 - 09:49 AM

L.Spiro has the right of it. A preemptive option is to check the SDK docs at opengl.org. The 3.3 and 4.2 manuals no longer include listings for functions that have been removed from the standard, so a good rule of thumb for core functionality is "if it's not in the SDK, it's probably no longer needed".

Extensions are a whole different can of worms.




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