Sign in to follow this  

OpenGl 3.0 Frustration

This topic is 2844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi guys, i was going to start programming in OpenGl (after programming in directx for a while, nice to allow mac users to use my software). but i can't work out how to get the 3.0 SDK where the api is and how to find out if i'm actually programming in it. Can someone give me a hand, every time i go to OpenGl's website, i feel like there is nothing on there. I have been using an openGl of some sort as i have been working through NeHe's tutorials as a conversion course. Also i presume that NeHe's tutorials won't work on opengl 3.0? HELP!!!! Cheers JamesCobras

Share this post


Link to post
Share on other sites
OpenGL 3.0 is mostly a super set of functionality on 2.x so old tutorials will work just fine in 3.0 if I'm not mistaken.

Also, there isn't really an SDK to speak of, API references sure, but that's about it.

Share this post


Link to post
Share on other sites
First, you need to create an OpenGL 3.0 context. The easiest way to do this is to use freeglut. Google freeglut, install it, and add a call to glutInitContextVersion( 3, 0 ); during initialization:


glutInit( &argc, argv );

glutInitContextVersion( 3, 0 );

glutInitDisplayMode( GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGB );

glutInitWindowSize( width, height );



glutCreateWindow( "Window Name" );




Now that you've created an opengl 3.0 context, you're using opengl 3.0.

Go ahead and open this pdf, scroll down to the section that says Profiles and the Deprecation Model, and make sure you know which features were deprecated/removed in OpenGL 3.0. You will actually be able to use all OpenGL 2.x features in OpenGL 3.0 but many are deprecated. If you use OpenGL 3.1 or OpenGL 3.2, the deprecated features have been removed and you will not be able to use things like glBegin/glEnd to render primitives.

[Edited by - MilfredCubicleX on February 28, 2010 10:59:50 AM]

Share this post


Link to post
Share on other sites
Wavesonics,

Actually, OpenGL 3.0 is pretty much the antithesis of a superset of OpenGL 2.0. It's true that if one creates a compatibility profile, then all of the OpenGL 2.x functionality is pretty much supported. However, a strict OpenGL 3.0 context provides an incredibly stripped down API (I jokingly refer to OpenGL 3.0 as OpenDT (Open Data Transfer) b/c it basically just provides an efficient interface for transferring data from the host to the GPU). If the OP is interested in using a strict OpenGL 3.0 context, then most of the tutorials available online are riddled with deprecated functionality.

--Rob

Share this post


Link to post
Share on other sites

This topic is 2844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this