OpenGL text editor suggestions

Post: #1
I'm working on a project that requires some basic text-editing to be present. I'm doing everything through OpenGL (I've got textures for the characters, etc.) and I have things working to the point where I can pop a text-editing field up on the screen and have the user type into it. However, I've been struggling to come up with a good way to allow the user to move the cursor around with the mouse, and make selections with the mouse as well. Has anybody done this? Does anybody have any suggestions as to good approaches to take (or bad approaches to avoid)?
Thanks in advance.
Quote this message in a reply
Post: #2
I got something worked out; it's not as elegant as I would have liked but it doesn't actually seem to be slowing anything down.
Quote this message in a reply
Posts: 304
Joined: 2002.04
Post: #3
I dont know how complex you want to get - but check out GLOW and GLUI. Both are open source toolkits that create a gui using opengl. Along with the sliders, menus, arcballs, etc... they both have textedit boxes that allow you to select text with your mouse. If you dont want to use either library - maybe by looking through the source you can get a better idea of how to do it yourself.

I should add that for games - we usually accept that we dont have full editing capabilities in-game. If we can type - and backspace to delete mistakes - usually thats good enough.


neither library has been updated in a while.

Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Opengl/Cocoa text rendering tesil 15 25,519 Mar 20, 2012 11:16 AM
Last Post: OneSadCookie
  SDL/OpenGL fullscreen text rendering StealthyCoin 2 8,928 Mar 26, 2009 09:47 AM
Last Post: StealthyCoin
  OpenGL Text Rendering (in Cocoa) daveh84 5 10,909 Feb 19, 2009 12:44 PM
Last Post: TomorrowPlusX
  opengl text/font drawing from CGContext fretmunky 11 18,239 Dec 7, 2008 11:29 AM
Last Post: fretmunky
  OpenGL text and other things. Talyn 7 9,056 Jul 22, 2008 02:09 AM
Last Post: OneSadCookie