Questions tagged [glut]

The [Open]GL Utility Toolkit (GLUT) is a utility library for OpenGL applications to put the platform-dependent details (e.g. creating windows and responding to mouse events and key presses) under one hood, in an easy and portable way.

GLUT stands for OpenGL Utility Toolkit is a utility library for OpenGL applications to put the platform-dependent details (e.g., creating windows and responding to mouse events and key presses) under one hood, in an easy and portable way.

The OpenGL Utility Toolkit is a kind of library of utilities for OpenGL programs, which primarily perform system-level I/O with the host operating system. Functions performed include window definition, window control, and monitoring of keyboard and mouse input. Routines for drawing a number of geometric primitives are also provided.

The original GLUT has been unsupported for 20 years (see GLUT - The OpenGL Utility Toolkit), but there exists a current, maintained alternative named FreeGLUT.

Tag usage:

The tag can be used for OpenGL Utility Toolkit-related programming problems. The tag can be used for installation related problems of GLUT packages.

Read more:

2271 questions
14
votes
3 answers

How to update glut window continuously?

I have a real robot that is ordering my virtual robot in open gl. I want show every movement of my master robot(real robot) in slave (virtual one in open gl) online, so i need to update my glut window continuously, actually as long as real robot…
Likak
  • 373
  • 1
  • 5
  • 19
14
votes
9 answers

Removing console window for Glut/FreeGlut/GLFW?

Under Visual C++, I have played around with Glut/FreeGlut/GLFW. It seems that everyone of these projects adds a CMD window by default. I tried removing it going under: Properties->C/C++->Preprocessor->Preprocessor Definitions From here, I remove…
Johnathan
  • 787
  • 4
  • 10
  • 21
14
votes
3 answers

Center an OpenGL window with GLUT

I have an openGL window that is 640x480 that I need to center in the middle of the screen. I previously used: glutInitWindowPosition((GetSystemMetrics(SM_CXSCREEN)-640)/2, (GetSystemMetrics(SM_CYSCREEN)-480)/2); which WORKED.…
Aaron McKellar
  • 627
  • 4
  • 10
  • 20
14
votes
2 answers

Shader can't be compiled

I'm following book "OpenGL Programming Guide 8th Edition". I just want to run the first program introduced in the book on my Mac. It's Mavericks + Xcode 4.6.1 + Intel HD graphics 4000. So the problem is, the shader can't be compiled. Shader…
Mark Zhang
  • 353
  • 2
  • 5
  • 12
13
votes
2 answers

Using OpenGL /GLUT how would I detect if two keys are held down at the same time?

Using OpenGL /GLUT how would I detect if two keys, say 'a' and 'j' are held down at the same time? (This program needs to compile with OSX GCC, Windows GCC, Windows VS2005 so no OS dependent hacks please.)
epochwolf
  • 12,340
  • 15
  • 59
  • 70
13
votes
2 answers

OpenGL GLX extension not supported

I had installed OpenGL and freeglut in Ubuntu 10.04 and it worked fine in 10.04 and 10.10. But after I upgraded to 11.04, the applications I've developed using OpenGL is not running properly. They're compiling without errors, but when I try to…
SparrowG
  • 221
  • 1
  • 4
  • 13
13
votes
2 answers

Understanding the relationship between glutDisplayFunc and glutPostRedisplay

When reading the redbook I found: glutDisplayFunc(void (*func)(void)) is the first and most important event callback function you will see. Whenever GLUT determines that the contents of the window need to be redisplayed, the callback…
andandandand
  • 21,946
  • 60
  • 170
  • 271
13
votes
5 answers

error LNK2019: unresolved external symbol

while i want to compile my opengl code i get the following errors: Error 1 error LNK2019: unresolved external symbol __imp__glewInit@0 Error 2 error LNK2019: unresolved external symbol __imp__glewGetErrorString@4 Error 3 error LNK2001:…
BulBul
  • 1,159
  • 3
  • 24
  • 37
12
votes
4 answers

What is the nicest way to close FreeGLUT?

I'm really having trouble closing my console application with FreeGLUT. I would like to know what the best way is to take every possible closing, because I don't want any memory leaks (I'm pretty afraid of those). So I already tried the following,…
Marnix
  • 6,384
  • 4
  • 43
  • 78
12
votes
2 answers

Attempt to call an undefined function glutInit

I need a glut window in python. I have the following exception using Python 3.5 and PyOpenGL.GLUT Traceback (most recent call last): File "D:\...\Test.py", line 47, in if __name__ == '__main__': main() File "D:\...\Test.py", line…
Szabolcs Dombi
  • 5,493
  • 3
  • 39
  • 71
12
votes
3 answers

Glew problems, unresolved externals

I want to start working with OpenGL 3+ and 4 but I'm having problems getting Glew to work. I have tried to include the glew32.lib in the Additional Dependencies and I have moved the library, and .dll into the main folder so there shouldn't be any…
M Davies
  • 255
  • 1
  • 3
  • 11
11
votes
2 answers

How do I use glutBitmapString() in C++ to draw text to the screen?

I'm attempting to draw text to the screen using GLUT in 2d. I want to use glutBitmapString(), can someone show me a simple example of what you have to do to setup and properly use this method in C++ so I can draw an arbitrary string at an (X,Y)…
KingNestor
  • 65,976
  • 51
  • 121
  • 152
11
votes
2 answers

How to initialize OpenGL context with PyGame instead of GLUT

I'm trying to start with OpenGL, using Python and PyGame. I'm going to use PyGame instead of GLUT to do all the initializing, windows opening, input handling, etc. However, my shaders are failing to compile, unless I specify exactly the version of…
lithuak
  • 6,028
  • 9
  • 42
  • 54
11
votes
1 answer

Using shared_ptr and glutInit causes segmentation fault

Having asked this before I tried out a lot of things and found out that the problem has to do with glutInit. Take the following code examples: main.cpp #include #include #include using namespace std; int main(int…
yonarw
  • 121
  • 7
11
votes
5 answers

How to pass a class method as a GLUT callback?

I know this thing works: void myDisplay() { ... } int main() { ... glutDisplayFunc(myDisplay) ... } so I tried to include myDisplay() function to a class that I made. Because I want to overload it in the future with a different class. However, the…
user188276