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
0
votes
0 answers

How to close and reopen a GLUT window in a loop?

I am doing a simple OpenGL freeglut project where I need to close an OpenGL window and when given a command, reopen it in the initial state (Like a game staring again when the replay button is pressed). I want to do something like this - while (c…
Whittaker
  • 63
  • 1
  • 5
0
votes
1 answer

How to get clip distances and textures on green dragon rendering

The source is of a green dragon rendering. My question is how to get the clip distances working on it? Also, the textures are not appearing as the expected output. Any ideas what can be modified in the source code to render the program as…
Stan S.
  • 237
  • 7
  • 22
0
votes
1 answer

running into roadblock with opengl function glBeginTransformFeedback

So I'm having problem with the opengl function glBeginTransformFeedback When I uncomment the lines, an error is occurring. It says 1282 invalid operation though that's quite vague. My question is what should be done with the source code to…
Stan S.
  • 237
  • 7
  • 22
0
votes
0 answers

I failed to compile C++ code on Visual Studio Code

I'm using "glut" library and trying to compile code by gcc compiler, but it gives undesireble result. When I try to build command (Ctrl+Shift+B) on Visual Studio Code, The Terminal returns below error messages. Executing task: gcc -I…
ZawaZawa
  • 13
  • 4
0
votes
1 answer

Modern opengl python program has cube appear but no textures

The latest code below is a ported python program of the tunnel.cpp program from Superbible OpenGL 7th edition. The cube appears, however the textures do not. There is also supposed to be slight movement toward the tunnel, and that's not happening…
Stan S.
  • 237
  • 7
  • 22
0
votes
1 answer

Bresenham line drawer crashes after certain loop before rendering anything?

I am trying to draw histogram using Bresenham Line drawing algorithm using OpenGL in CodeBlocks. When arguments to drawLine are changed (manually/ hardcoded) the program crashes. The code is not complete and I am just trying to experiment around.…
iheathers
  • 371
  • 6
  • 13
0
votes
1 answer

glRotate() keeps zooming in and out my view without me doing anything

I'm using pyopengl and glut for this project. I just added a mouse event handler in order to rotate the object. What it does is when the cursor reaches the edge of the window, it rotates. However, when I move the cursor back to the center of the…
Hung Do
  • 63
  • 1
  • 9
0
votes
1 answer

Undefined reference to 'addVectors(Vector,Vector)'

I can not solve these "undefined reference to" problem. There error could be in my header file. my IDE is CodeBlocks #include #ifdef __APPLE__ #include #else #include #endif #include #include…
0
votes
0 answers

Codeblocks project won't compile for the second time

Okay, so I am working on opengl in codeblocks. My programs compile and run correctly when I build a project for the first time. But if I try to compile the program for the 2nd time it throws man errors like "undefined reference to…
Stacky
  • 1
0
votes
1 answer

OpenGL GLUT left mouse click overrides holding right mouse

I'm adapting some skeleton code to learn how OpenGL works and have in SphericalCameraManipulator.cpp which allows me to pan and tilt the camera while I hold down right mouse: void SphericalCameraManipulator::handleMouseMotion(int x, int y) { …
Weaver
  • 145
  • 8
0
votes
1 answer

How I can use Keyboard interaction in this code

i want to use keyboard key to move the object on the path but after using keyboard function the object is not moving.Please help me with this.after applying keyboard function the object is not moving from its place. i want to add 3 different…
0
votes
1 answer

GLUT animation leads to 100% utilization of 1 core when the window is invisible

I developed a Python program that uses PyOpenGL and GLUT for window management to show an animation. In order to have the animation run at the fastest possible framerate, I set glutIdleFunc(glutPostRedisplay) as recommended e.g. here. That works…
A. Donda
  • 8,381
  • 2
  • 20
  • 49
0
votes
0 answers

glutSolidSphere fails to color

I am reviving some openGL/glutcode from over 10 years ago. It looks like freeglut has taken over from glut, and something is not quite the same. This code used to color the sphere: void DrawRider() { glDisable(GL_TEXTURE_2D); …
Joymaker
  • 813
  • 1
  • 9
  • 23
0
votes
1 answer

Why aren't the figures appearing in the screen?

My last work consists of adding a 3D cube with texture to the center of the circle I've already made, but the screen just appears black for some reason, no figures or anything; I know it's probably something I added in the wrong place or something…
escobarveras
  • 69
  • 2
  • 8
0
votes
1 answer

How to draw different colored line strips with Legacy OpenGL?

So, I have a matrix of pairs of x and y coordinates, each line in the matrix represents a route, which I would like to represent as a GL_LINE_STRIP in OpenGL. The thing is I would like to draw the lines with different colors each time. I thought my…