• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# GLUT issues.

## 3 posts in this topic

OK. I am using glut, and have it fairly well implemented. Im runninng into 2 probs. glutKeyboardFunc() only takes the first 128 keys. It does not take the arrow keys or the Insert/home/pgup key block. Also...How do I scale text ? Anyway, heres my kinda demo... 64x64 shaded polygons. keys are q,w,a,s,z,x,d,u,l,,r,n,h,ctrl-c, space, and f. q,w,a,s,z,x,d,u,l,,r,n,h are movement keys. ctrl-c is quit. Just like back in the day. space is reset the view. f switches from windowed 800x600 to gluts fullscreen and back. Oh yeah...in gluts full-screen...how do I get rid of the taskbar at the bottom. Right and left buttons when clicked zoom in/out :-) http://members.fortunecity.com/jktourn/w32.exe Thanks ~V''lion If anyone for a obscure reason desires the source code, just tell me... I came, I saw, I got programmers block. ~V''''lion
0

##### Share on other sites
Hi,

Firstly, in order to catch stuff like the arrow keys, you need to register a glutSpecialFunc(...)

Secondly, to scale text, just call glScalef(x,y,z) before rendering it, to stretch in whatever manner you desire.

As for the fullscreen thing, I can only suggest you look through the GLUT documentation here ... you''ll generally find answers about stuff like this quicker just by having a quick browse.

cheers and all that
0

##### Share on other sites
Actually, with glutKeyboardFunc(), you can use the #defined values GLUT_KEY_UP (or something along those lines, I''m at work so can''t look at at the moment) to catch the directional keys on the keyboard. This also allows trapping of the F1 through F12 keys...so, the Insert and Home keys may be in there as well.

cheers,
Brendan.
0

##### Share on other sites
I dug up the glutSpecialFunc() stuff and have implemented it.

Now Ive realized that to do what I want with my engine I need animated textures somewhere down the line.
Any ideas on how to go about that ?
Im thinking that switching textures each frame is notably inefficient. Woould multi-textureing be a help ?
Any tutorials out there that deal in animating textures ?
And to blend one texture on a polygon with another- thats multi-texturing right ?
-vlion

I came, I saw, I got programmers block.
~V''''lion
0