Sign in to follow this  
tom_mai78101

If you include SDL in your project, can you also use all OpenGL functions?

Recommended Posts

As the title goes, do you get all the OpenGL features in SDL, regardless of what OpenGL version you have in your graphics driver? When you include SDL in your project, does it activates all OpenGL standard header files and #includes them for you in your CPP file?

SDL 1.2.14 = OpenGL 4.1 and below?

Thanks in advance.

Share this post


Link to post
Share on other sites
With SDL 1.2 if you #include <SDL/SDL_opengl.h> it will include gl.h and glu.h
I don't know what versions of opengl that allows you to use but you might also need to get glew (gl extension wrangler) to bring them up to date.

Or, what I've now done is gotten SDL 1.3 which doesn't have a seperate header but I have also included gl3.h and gl3w.h and gl3w.c

Don't know about GL 4.1

Share this post


Link to post
Share on other sites
No matter what version the header is, or if it just pulls in your current system OpenGL header, you'll get the version that your installed hardware driver supports and gives you. I believe SDL gives you the ability to create post-3.0 contexts, but you are still limited by what your graphics card can give you.

Share this post


Link to post
Share on other sites
I do not see any problem why OpenGL should lost some of it's functionality because of SDL.
First google result: http://www.libsdl.org/opengl/index.php
Try some of this tutorials...

Share this post


Link to post
Share on other sites

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