I have set up a 3.3 context using SDL:
const GLubyte *version=glGetString(GL_VERSION);
const GLubyte *vendor= glGetString(GL_VENDOR);
const GLubyte *renderer=glGetString(GL_RENDERER);
cout<<"Renderer: " << renderer<<endl;
cout<<"Vendor: " << vendor<<endl;
cout<<"OpenGL Version: " << version<<endl;
GLint nombre_extensions;
glGetIntegerv(GL_NUM_EXTENSIONS, &nombre_extensions);
cout<<"Extensions: " <<nombre_extensions<<"
"<<endl;
this outputs:
Renderer: GeForce 8800 GTS/PCI/SSE2
Vendor: NVIDIA Corporation
OpenGL Version: 3.3.0
Extensions: 190
First, 190 Extensions? Is this correct? when I open the Opengl Extensions Viewer it says me that I have 210 :S
Second, I want to use “glGetStringi” … but i don’t know how to load it globally. If I make:
PFNGLGETSTRINGIPROC glGetStringi = (PFNGLGETSTRINGIPROC) SDL_GL_GetProcAddress("glGetStringi");
//AND THEN
const GLubyte *ext2=glGetStringi(GL_EXTENSIONS,0);
cout<<ext2<<endl;
It works ok, the problem is that if i call glGetStringi outside the function, i have to load it again…
Probably its an easy task but I’m unable to make it “global”.
Another question, if I need to use this:
glVertexAttribPointer((GLuint)0, 3, GL_FLOAT, GL_FALSE, 0, 0);
How can I load that function?
Thank you.