ptitSeb
Serial Porter
Hi,
I'm having some difficulties with a simple call in GL. I must do something wrong, but cannot get what.
When doing glGetString to have vendor or extensions string, most of the time I have just 0 as string (sign of error, but what error?).
Here is a simple test program "test.c":
#include <GLES2/gl2.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("Test of GLES2\n");
const char *sVendor = glGetString(GL_VENDOR);
printf("Vendor = %s\n", sVendor);
const char *sVersion = glGetString(GL_VERSION);
printf("Version = %s\n", sVersion);
}
and compile it with
gcc test.c -o test -lGLESv2
I always get (null) as string. Even when putting -lGLES_CM or adding -lEGL, same.
The only change is when using libGL of lunixboch, vendor is still (null), but I have a text for Version.
*EDIT*, I have checked, glGetError return NO_ERROR.
What is wrong?
I'm having some difficulties with a simple call in GL. I must do something wrong, but cannot get what.
When doing glGetString to have vendor or extensions string, most of the time I have just 0 as string (sign of error, but what error?).
Here is a simple test program "test.c":
#include <GLES2/gl2.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("Test of GLES2\n");
const char *sVendor = glGetString(GL_VENDOR);
printf("Vendor = %s\n", sVendor);
const char *sVersion = glGetString(GL_VERSION);
printf("Version = %s\n", sVersion);
}
and compile it with
gcc test.c -o test -lGLESv2
I always get (null) as string. Even when putting -lGLES_CM or adding -lEGL, same.
The only change is when using libGL of lunixboch, vendor is still (null), but I have a text for Version.
*EDIT*, I have checked, glGetError return NO_ERROR.
What is wrong?
Last edited by a moderator: