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
1 answer

How to check if the mouse is on one side of the screen in OpenGl?

In opengl, how would I be able to check if the mouse pointer is inside an object. So far, I can only check if its inside the screen, using glutPassiveMotionFunc.
anaksky2k19
  • 51
  • 2
  • 8
0
votes
0 answers

How to make transparent on 2D shapes OpenGL?

I am trying to make the rectangle to become 50% transparency by using alpha. But it is not working and my shapes become not appearing anymore. Any solution to fix this? (Drawing rectangle functions in object class) void Object::drawRect(GLint x1,…
0
votes
1 answer

didnot get expected output on reading /dev/fb0

I want to display present screen in an OpenGL window using /dev/fb0, I need to get faster pixel mappings, I have written some code, but unfortunately it doesn't give what I expect ? is this the problem because of using /dev/fb0 or code itself? any…
0
votes
1 answer

How to schedule function in GLUT

I have some function which are calling from main function.Below is code. int main(int argc, char *argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE); glutInitWindowSize (500, 500); …
Ajay_Kumar
  • 1,381
  • 10
  • 34
  • 62
0
votes
1 answer

GLUT not updating after CPU time changes

We had an interesting anomaly with GLUT/Intel/Linux this week. After setting the CPU time back 2 minutes, our GLUT window would not update for 2 minutes. Does GLUT use the CPU time for updating the display?
gjcamann
  • 621
  • 4
  • 14
0
votes
2 answers

UV Mapping OpenGL with OpenCV

I cannot get a image from an OpenCV image to get mapped onto a 2D plane in OpenGL. Whenever I try to render the image onto the plane using the code below, I get a yellow plane instead of the actual image on it. // My Init code cv::Mat mat(640, 480,…
Moe Bataineh
  • 1,032
  • 1
  • 12
  • 29
0
votes
0 answers

Rotate glutBitmapString around its center

Does anyone know if you can rotate the text around the middle (verical axis). with me he always turns around his left side.
user11340747
0
votes
1 answer

Displaying two different objects on same screen

I am trying to display a sphere and a torus on the same screen, but it seems like the "glutInitDisplayMode" is what is causing me to display only one. When I keep it as glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA |GLUT_DEPTH) the torus…
vs9999
  • 61
  • 4
0
votes
1 answer

Tracing a ray from the camera to the mouse pointer in GLUT

I'm not really sure if it makes sense but I need to do and there is a chance there won't be any obstacle in front.
DogDog
  • 4,820
  • 12
  • 44
  • 66
0
votes
1 answer

I tried to run OpenGl but the GLUT screen is just rendering a white screen?

I have just tried to run the Bresenham function which draws a line from 2 vertexes, but only the white screen of GLUT appear, there is no line at all. Here is my source code, can anybody help me? #include #include #include…
magicww
  • 39
  • 3
0
votes
1 answer

OpenGL - how to draw a full window rectangle

In fact, what I want to do is to show an image with identical size to the window I created. But I found the rectangle with image texture will be slightly enlarged so that the edge of the image is invisible. Thus I did the following experiment: For…
0
votes
1 answer

Pixels move when initialized on their own, but not in loop?

I'm working with OpenGL/Glut and trying to make a simple "rain" effect. I have a class for raindrops: class Drop { private: int speed; int posY; int posX; public: Drop() { // constructor speed =…
gator
  • 3,465
  • 8
  • 36
  • 76
0
votes
3 answers

glutBitmapString access violation

(OS: Windows 7, Compiler: Visual Studio 2010 C++ compiler) I've got a correctly working OpenGL program that draws some spheres and models, applies some shaders etc.. etc.. Now I thought it would be nice to add some text, so I added the following…
Roy T.
  • 9,429
  • 2
  • 48
  • 70
0
votes
1 answer

C2252 error when building GLUI with VS2017?

I downloaded GLUI 2.36 and set out to build the Visual Studio project in VS 2017, Windows 10. After getting the GLUT libraries correctly installed, I still get the following compile-time…
Joymaker
  • 813
  • 1
  • 9
  • 23
0
votes
3 answers

Why is _mainCRTStartup so slow with debugging on, but fast with debugging off?

I'm using 32-bit GLUT on 64-bit Windows 7 with Visual Studio 2010. The project just contains my C++ implementation and header files. No Win32-specific code. I do a lot of pixel drawing operations. It's instantaneous with the release configuration,…
johansson
  • 1,467
  • 2
  • 10
  • 9