settings up opengl with windows
I have this HDC that I got from my window and want to hook up to opengl, but its not working and I'm not exactly sure why.
this is my code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
HDC hdc = GetDC(wind);
HGLRC glRenderingCtx = wglCreateContext(hdc);
wglMakeCurrent(hdc,glRenderingCtx);
if (glewInit() == GLEW_OK)
std::cout << "glew ok" << std::endl;
else
std::cout << "glew not ok" << std::endl;
wglMakeCurrent(NULL,NULL);
wglDeleteContext(glRenderingCtx);
ReleaseDC(wind,hdc);
|
when I run it I get: "glew not ok".
could someone help please? what am I doing wrong here?
Last edited on
Topic archived. No new replies allowed.