Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

How do you do text input?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Reverse_Gecko   Members   

122
Like
Likes
Like

Posted 17 October 2001 - 11:37 AM

Ive been programming in c++ since 5th grade, but im new to opengl and i was just wondering how to do text and stuff of that sort in opengl. Is the a glPrintf or glScanf or anything like that. Thanks.

#2 Jankey   Members   

122
Like
Likes
Like

Posted 17 October 2001 - 10:06 PM

i long time ago i had the same problems, i used a part of the Glut Sourcecode and manipulated it ... in a few hours ( when i am at home i will post you the Code .. )

J@n

#3 Herr_O   Members   

184
Like
Likes
Like

Posted 20 October 2001 - 12:57 AM

If youre using win32 you can use wm_char to read the keyboard input in your WndProc().

LRESULT CALLBACK WndProc(HWND hwnd,UINT msg,WPARAM wparam,LPARAM lparam){
switch(msg){
case WM_CHAR:{
label[charpos++]=(char)wparam;
return 0;
}
}
return DefWindowProc(hwnd,msg,wparam,lparam);
}

But you need some sort of print function to go with that. I suggest visiting http://nehe.gamedev.net, there are som great text/font tutorials for opengl.

Edited by - Herr_O on October 20, 2001 8:03:45 AM




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.