OpenGL text editor suggestions
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.
Thanks in advance.
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.
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.
GLOW <http://glow.sourceforge.net/>
GLUI <http://www.cs.unc.edu/~rademach/glui/>
neither library has been updated in a while.
hth,
Codemattic
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.
GLOW <http://glow.sourceforge.net/>
GLUI <http://www.cs.unc.edu/~rademach/glui/>
neither library has been updated in a while.
hth,
Codemattic
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Opengl/Cocoa text rendering | tesil | 15 | 14,612 |
Mar 20, 2012 11:16 AM Last Post: OneSadCookie |
|
| SDL/OpenGL fullscreen text rendering | StealthyCoin | 2 | 5,454 |
Mar 26, 2009 09:47 AM Last Post: StealthyCoin |
|
| OpenGL Text Rendering (in Cocoa) | daveh84 | 5 | 6,705 |
Feb 19, 2009 12:44 PM Last Post: TomorrowPlusX |
|
| opengl text/font drawing from CGContext | fretmunky | 11 | 11,497 |
Dec 7, 2008 11:29 AM Last Post: fretmunky |
|
| OpenGL text and other things. | Talyn | 7 | 3,988 |
Jul 22, 2008 02:09 AM Last Post: OneSadCookie |
|

