Advertisement

displaying opengl coordinate to a window

Started by March 06, 2002 01:02 PM
0 comments, last by ogl 22 years, 11 months ago
Hi I have an opengl application with a few objects in a scene which you can move with the mouse. I would like to display the x, y z , tilt and rotate coordinates in a window so when the objects are moved you can see at what position they are numerically. I have a controlbar like dev studio in my application -it just that I''m stuck on this data out put part. Any ideas? cheers
If this is a Windows application, then you could probably do the following:

  char text[256];sprintf(text,"X: %.2f  Y: %.2f  Z: %.2f  Tilt: %.2f",x,y,z,tilt);SetWindowText(mainwindow,text);// orSetDlgItemText(parent_window,child_id,text);  


When you create a child window, you can stick it''s id in the HMENU part, i.e.,


HWND child = CreateWindow("window class","window title",WS_VISIBLE | WS_CHILD,0,0,200,200,parent_window,(HMENU) child_id,instance, NULL);


I think. I hope that helps.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.

This topic is closed to new replies.

Advertisement