   How to make a tooltip?
  Hi,In my OGL scene I have some objects and I know their name. What I would like to do is some kind of Tooltip i.e draw a rectangle with the object's name when I hover on it with the mouse.  Would someone have some example source code for doing this?Many thanks!   
  No source code, but how about this (pseudocode):DrawToolTip(text, xpos, ypos){boxwidth, boxheight = CalculateTextWidth&Height(text)if xpos + boxwidth > screen resolutionMoveBoxToFitOnScreen() // (or maybe just xpos = screenres - boxwidth)// same for boxheightDrawRectangle(boxwidth, boxheight, xpos, ypos)DrawText(xpos, ypos)}Or something similar. That example won't look very impressive but it's a start in the right direction.Whenever you know that the mouse is over an object (via some other part of your code), just call DrawToolTip(objectname, mousex, mousey) or something.   ;  You might also want to look at lesson 32 (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=32) if you want to know how to tell what object the cursor is over.  If you only do a selection check every second or so then the performance hit will be pretty much nothing.If your only putting tooltips on 2d stuff though, your better of doing your own checking as it will be a lot faster, especially if there are a lot of objects.