Hi Largo,
a)
It should work, but you need to create font first. To do so, just modify the WM_InitDialog to:
Case %WM_INITDIALOG
Control Handle CBHNDL, %lCanvas To hCtrl
' -- Init OpenGL
TBGL_BindCanvas(hCtrl)
TBGL_BackColor 22, 84, 128
' -- Builds Arial font, size 12pt
TBGL_BuildFont(TBGL_FontHandle("Arial Black", 12))
... and then for printing, you can modify part before TBGL_DrawFrame in RenderMyImage:
' -- Draw gridbackground for fun
RenderGrid(width, height, 40)
TBGL_Color 255, 255, 255
' -- Prints at 100, 100
TBGL_PrintFont "Ciao Largo!", 100, 100
TBGL_DrawFrame
b)
TBGL is pure Win32 API and low level OpenGL. I don't like the GLUT concept very much, that is one of the reasons I created TBGL
c,cc)
For defining cube I would do it as following:
- click 1 = place upper left corner of cube (let's call it PointA)
- moving mouse now means drawing rectange with upper left corner fixed at PointA, and lower left corner based on mouse position in space
- click 2 = place lower right corner of cube (let's call it PointB), now base is defined
- moving mouse on your table could be handled as moving in Z, instead of tracking X, Y as usually
- click 3 = end of definition
Petr
Bookmarks