glload headers with SDL

145 views Asked by At

I'm setting up an OpenGL c++ program with SDL as the 'wrapper'. I noticed that as soon as I added this line:

#include <glload/gl_3_3.h>
#include <glload/gl_load.hpp>

All of the 'old' OpenGL commands such as glBegin(), glEnd() and etc. become undefined, even though I still have

#include <GL\GLU.h>

just after it. This isn't a problem as I don't intend to use them in this program at the moment, but it is a bit annoying and I was wondering if there is a way around it.

Also, why is it that I have to use

<glload/gl_3_3.h>

as opposed to

<glload/gl_3_3.hpp>

even though I am writing in C++ and not C, which seems to contradict the glsdk docs?

glsdk_0_5_2/docs/html/group__module__glload.html

1

There are 1 answers

0
Bartek Banachewicz On BEST ANSWER

When requesting API of version 3.3, you request just that. As of OpenGL 3.3, glBegin, glEnd, and a lot of older fixed-pipeline functionality has been removed.

You really shouldn't be worried about it and simply code against the API version you chose; you certainly aren't going to miss any of the older functionality.