GLUT - And how to get the fu**ing hDC

Hello outhere !!!
Now I’m stuck in a disadvantige I didnt see when I began using GLUT (for me GLUT is really COOL!!, but there can be other meanings - when so, tell me).

The Problem:
How Can I get the Handle od the Device Context (hDC) when I’m using GLUT.

The Solution :
Ahhm… Sorry Mr. Officer :-/

thx for every Help!!!

you can’t

IS THIS FOR REAL ???

In fact there is no way to get the Handle of the DC when using GLUT??
miserable, paltry, pathetic, poor !!!
I cant believe…

Sure you can.

Try using wglGetCurrentDC().

Siwko

thanx Siwko
I’ didn’t try so far,
BUT where is my platform-independece , now ???
(this is a Windows-API function )

Yep!!
wglGetCurrentDC();
I could get the RIGHT hDC, it WORKED!!

(sorry):
But still Winapi

Getting the HDC has to be Windows-specific – there is no such thing as an HDC outside of Windows.

  • Matt

Absolutly right, yes.
never thought to this!
If I got to give a Handle as param, my
function itself is Winapi, hmmm. Dumb-me!

Sorry!!!