Hi,
I am trying to achieve something very simple, but it seems I'm still doing something wrong... I try to get the version etc what OpenGL reports.
How can I properly do this?
I have this at the moment:
which I compile via:
And which gives at my prompt:
What did I do wrong?
Thanks a lot!
I am trying to achieve something very simple, but it seems I'm still doing something wrong... I try to get the version etc what OpenGL reports.
How can I properly do this?
I have this at the moment:
Code:
#include <AGL/agl.h>
#include <stdio.h>
int main ( )
{
GLint attribs[] = { AGL_RGBA, // 1
AGL_DOUBLEBUFFER,
AGL_SAMPLE_BUFFERS_ARB, 1,
AGL_SAMPLES_ARB, 2,
AGL_SUPERSAMPLE,
AGL_NO_RECOVERY,
AGL_NONE };
AGLPixelFormat pixelFormat = NULL;
AGLContext context = NULL;
pixelFormat = aglChoosePixelFormat (NULL, 0, attribs); // 2
if (pixelFormat) {
context = aglCreateContext (pixelFormat, NULL); // 3
printf( "%s\n", glGetString(GL_VENDOR) );
aglDestroyPixelFormat (pixelFormat);
}
return 1;
}
which I compile via:
Code:
g++ -framework OpenGL -framework AGL test.cpp && ./a.out
And which gives at my prompt:
Code:
(null)
What did I do wrong?
Thanks a lot!