Posts: 41
Threads: 21
Joined: Apr 2007
Hi Gintaras:
I was looking for some information in OpenGl, it worked, but i don't know why it does not clear the window when I move the mouse
Here it is the entire code, it was borrowed from a DevC Sample.
Thank you
Regards.
Attached Files
opengl.qml (Size: 24.09 KB / Downloads: 319)
Posts: 12,072
Threads: 140
Joined: Dec 2002
Some dll declarations incorrect.
Macro
dll gdi32 # ChoosePixelFormat int ' hdc PIXELFORMATDESCRIPTOR * ppfd
dll opengl32 # glClear mask
dll opengl32 # glLightfv int ' light int ' pname float * params
dll opengl32 # glEnable int ' cap
dll opengl32 # glClearColor float ' red float ' green float ' blue float ' alpha
dll opengl32 glPushMatrix
dll opengl32 glPopMatrix
dll opengl32 glRotatef float ' angle float ' x float ' y float ' z
dll opengl32 glBegin int ' mode
dll opengl32 glEnd
dll opengl32 glColor3f float ' red float ' green float ' blue
dll opengl32 glVertex2f float ' x float ' y
dll opengl32 wglDeleteContext int ' hglrc
I tested with 10 ms timer. First thread OK, but other threads eat whole CPU time. 50 ms OK. Don't know how to fix it. Tried the C++ sample, in raw C++ threads, the same. If possible, run the macro in separate process.
Posts: 41
Threads: 21
Joined: Apr 2007
Thank you Gintaras, i will try it
Regards.