XYZ coordinates on the bottom right corner of the screen

What is the best way to draw XYZ coordinate system on the bottom right corner of the screen.

Should you do this with OpenGL or with gdi?
Does anyone know of source code to do this?

Thanks,

Billy.

Try something like this:

glGetIntegerv glgViewport, vp(0)

glClear clrDepthBufferBit 

glMatrixMode mmProjection
glPushMatrix

  'create orthographic box for axes
  glLoadIdentity
  glOrtho -3, 3, -3, 3, -3, 30
  
  glMatrixMode mmModelView
  glPushMatrix
  
    'get the camera angle relative to model
    'to properly postion the axes
    glLoadIdentity

    gluLookAt 0, 0, 5, 0, 0, 0, 0, 1, 0 

    GetCurrentRotMatrix m16()
    glMultMatrixf m16(0)

    'place axes in the corner 
        glViewport vp(2) - vp(3) * 0.325, 0, vp(3) * 0.325, vp(3) * 0.325

    'draw axes here
  
  glPopMatrix
  glMatrixMode mmProjection
  
glPopMatrix
glMatrixMode mmModelView

'restore viewport
glViewport vp(0), vp(1), vp(2), vp(3)

Thanks Pat.

I will certainly try this.

Sorry Pat.

I implemented your code and it is working quite ok. I just have one problem. I need to erase the transformation matrix before I call the existing matrix.

This is becuase I want to isolate only the rotation and not the whole transformation which includes translations.