Function to detect if a OpenGL Extension is supported by the machine your application is running on.
Code: Select all
int extension(string D)
{
int L, N;
string E, S;
E = "";
S = glGetString(0x1F03);
L = length(S);
N = 0;
while(N < L)
{
string C = subStr(S,N,1);
if(C == " ")
{
if(E == D)return 1;
E = "";
}
else E += C;
N++;
}
return 0;
}
Code: Select all
int FBO = extension("GL_EXT_framebuffer_object");
K