English 中文(简体)
Detecting Ctrl-<Number> in GLUT
原标题:
  • 时间:2009-12-29 21:13:19
  •  标签:
  • glut

I use GLUT to handle keyboard input for Bitfighter. I ve built a nice little keyboard event abstraction layer, which works great for most things, but I ve run up against a few frustrating limitations.

For example, when Ctrl is pressed, the number keys, plus, minus, and the quote key don t seem to trigger the glutKeyboardFunc() callback.

I realize that GLUT is very limited in some ways, but I was wondering if anyone knows if it is possible to detect the number keys or plus/minus when Ctrl is pressed.

I would consider switching to FreeGLUT if it helped work around this limitation.

最佳回答

I did a lot of research on this, and concluded it simply doesn t work.

For this reason, and other frustrations, we eventually ported our code from GLUT to SDL.

问题回答

暂无回答




相关问题
Drawing many spheres in OpenGL

I want to draw many spheres (~100k) using OpenGL. So far, I m doing something like for (int i=0; i<pnum; i++){ glPushMatrix(); glTranslatef(bpos[i].x, bpos[i].y, bpos[i].z); ...

OpenGL gluUnProject object section

I m using gluUnProject to cast a ray into the scene and adding a primitive there. What I m trying to do is now accurately pick existing primitives, so if I have 3 spheres I could click on one to ...

Detecting Ctrl-<Number> in GLUT

I use GLUT to handle keyboard input for Bitfighter. I ve built a nice little keyboard event abstraction layer, which works great for most things, but I ve run up against a few frustrating limitations....

Hide command line / shell when using GLUI

I m working on an openGL project and have chosen to use GLUI for my interface. Was just wondering if anyone knows how to hide the command line / shell when running? Cheers!

How to Wrap a Commad Line Executable In a .app Package?

I wrote an OpenGL+GLUT game for Mac OS X that s currently launched through the command line. I d like to make opening the game more user-friendly by putting it into a .app package, so regular users ...

OpenGL for space simulators [closed]

with a few friends we started this amateur platform-independent java-based project for a space combat simulator game (something like the long dead saga of wing commander). None of us though is a 3D ...

repeatedly render loop with Qt and OpenGL

I ve made a project with Qt and OpenGL. In Qt paintGL() was repeatedly call I beleive, so I was able to change values outside of that function and call update() so that it would paint a new image. I ...

热门标签