Jump to content

  • Log In with Google      Sign In   
  • Create Account

GLUT issues.


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
3 replies to this topic

#1 Vlion   Members   -  Reputation: 151

Like
Likes
Like

Posted 16 August 2001 - 01:57 PM

OK. I am using glut, and have it fairly well implemented. I`m 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 glut`s 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

Sponsor:

#2 Bad Monkey   Members   -  Reputation: 145

Like
Likes
Like

Posted 16 August 2001 - 06:50 PM

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
Adam

#3 bgreen   Members   -  Reputation: 162

Like
Likes
Like

Posted 16 August 2001 - 07:36 PM

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.

#4 Vlion   Members   -  Reputation: 151

Like
Likes
Like

Posted 17 August 2001 - 06:06 PM

I dug up the glutSpecialFunc() stuff and have implemented it.

Now I`ve 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 ?
I`m 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




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.



PARTNERS