PDA

View Full Version : How to mak cursor position visibl in opengl screen



revathy
01-20-2010, 09:29 PM
Hii Friends
I am very new to opengl. Please help me out.
I am using opengl with c on linux system.using windows thier are few tutorials but i want for linux systems..Help me out..
I have done a program which Displays a picture & then i hav created 2 text boxs which asks for input from user. Now in this textbox how to make the cursor visible so tat the user can type the input & its visible on opengl screen with cursor position also..

For Getting user input, we use keyboard func. But now i want the cursor position also to be visible on opengl screen..How is it.

Help me out i am trying it out from past few days not getting it..

Dark Photon
01-21-2010, 07:26 AM
i hav created 2 text boxs which asks for input from user. Now in this textbox, how to make the cursor visible so tat the user can type the input & its visible on opengl screen
As I mentioned in the other thread, I'd just use a simple GL_LINES primitive to draw a line where you want the cursor.

This since when you render the "_" character, that apparently isn't part of the font you're using. Another option would be to change your font to one that does have the "_" character and use that instead.