PDA

View Full Version : Hacking GLUT



04-16-2003, 04:37 AM
I'm trying to hack glut inorder to get the MS-windows HDC.
I can't get this code to go on:
in file glut_win.c

HDC APIENTRY myglutGetHDC(int win)
{
GLUTwindow *window;


window = __glutWindowList[win - 1];

return window->renderDc;
}

and adding the prototype to glut.h.

GLUTAPI HDC APIENTRY myglutGetHDC(int win);

if you can help me
1) retrieving HDC without hacking code
2) tell me what's wrong with my code

I'll be more than thankful.
Yoav

Deiussum
04-16-2003, 05:04 AM
Why do you need to hack glut to get your HDC? Just use wglGetCurrentDC().