glEnable doesn't compile inside a class?

130 views Asked by At

I'm compiling OpenGL using freeglut and glew using visual studio. I'm having a rather strange issue and I have reduced the code to the minimum required to demonstrate the issue.

#include <Windows.h>
#include <GL\glew.h>
#include <GL\freeglut.h>


class Test
{
public:
Test() { }
void enable();
};

void Test::enable()
{
    //glEnable(GL_DEPTH_TEST)​; // Doesn't compile? Error - Error   C2146   syntax error: missing ';'   

}

int main()
{
    glEnable(GL_DEPTH_TEST);
}
0

There are 0 answers