OpenGl 3.0 Frustration

Started by
4 comments, last by gfxnomad 14 years, 1 month ago
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
Advertisement
use OpenGL wiki
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.
==============================
A Developers Blog | Dark Rock Studios - My Site
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]
how about doing it with SDL?

Need that as that's what i'm using.

what is the function to make the context.

JamesCobras
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

This topic is closed to new replies.

Advertisement