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
22
votes
2 answers

xcode 5 deprecation warning about glut functions

I just upgrade my mac os x 10.6.8 to 10.9 this morning. Everything goes fine except the Xcode 5 with OpenGL Glut APIs. Whenever I run my program involving glut functions, I got 30 deprecation warns, like: 'gluErrorString' is deprecated: first…
make217
  • 231
  • 1
  • 2
  • 3
20
votes
3 answers

How to draw a single pixel in OpenGL?

Can someone tell me how to draw a single white pixel at a coordinate, say (100,200)? I am using GLUT and so far have figured out how to open a blank window. Once I figure out how to draw pixels, I will use that to implement the Bresenham line…
quantumbutterfly
  • 1,815
  • 4
  • 23
  • 38
20
votes
3 answers

Segmentation Fault before main() when using glut, and std::string?

On 64-bit Ubuntu 14.04 LTS, I am trying to compile a simple OpenGL program that uses glut. I am getting a Segmentation Fault (SIGSEV) before any line of code is executed in main; even on a very stripped down test program. What could cause this? My…
MikeMx7f
  • 927
  • 6
  • 13
20
votes
2 answers

Difference between OpenGL files glew.h and gl.h/glu.h

I've built an OpenGL program with my glu and gl header files default included in windows 7 professional edition. Now, I've bought a book that describes OpenGL game development. The author of this book said, I have to include the glew header into my…
SKiD
  • 441
  • 1
  • 3
  • 16
19
votes
1 answer

Using GLUT bitmap fonts

I'm writing a simple OpenGL application that uses GLUT. I don't want to roll my own font rendering code, instead I want to use the simple bitmap fonts that ship with GLUT. What are the steps to get them working?
Ashwin Nanjappa
  • 76,204
  • 83
  • 211
  • 292
19
votes
5 answers

How to load a bmp on GLUT to use it as a texture?

I've been searching all around for a simple solution to add sprites to my OpenGl GLUT simple moon lander game in c++ and it appears I must use bmp's since they're easiest to load and use them as textures on a rectangle. How exactly can I load the…
Patricio Jerí
  • 528
  • 2
  • 5
  • 15
18
votes
4 answers

opengl glutmainloop()

i just started off using OpenGL and it seems it is not easy to understand the working of the glutMainLoop() what really happens there? Does it stay there doing nothing till any of the function calls responds?
codemax
  • 457
  • 3
  • 8
  • 11
17
votes
3 answers

can a bmp image format handle transparency

I am making this C++ program that has buttons, button containers, chat boxes, etc., and I want to wrap it around by textures. I want to generate a smooth edge for all the rectangles I made, and I don't want vertex plotting method to do the work for…
mr5
  • 548
  • 1
  • 5
  • 14
16
votes
1 answer

Creating buttons and icons in OpenGL

I'm trying to make an editor using OpenGL similar to MS Paint, with a panel and all. Where can I find material on how to create buttons and icons? P.S - I did find out about GLUI that provides such entities, but I am not allowed to use anything…
Sneha
16
votes
6 answers

In OpenGL, can I draw a pixel that exactly at the coordinates (5, 5)?

By (5, 5) I mean exactly the fifth row and fifth column. I found it very hard to draw things using screen coordinates, all the coordinates in OpenGL is relative, and usually ranging from -1.0 to 1.0. Why it is so serious to prevent programmers from…
xzhu
  • 5,675
  • 4
  • 32
  • 52
16
votes
3 answers

Is GLUT dead for graphics programming?

After reading a discussion on Ubuntu Forums concerning GLUT vs. FreeGLUT. Is GLUT dead for graphics programming? Is SDL all the rage now for OpenGL programming?
KingNestor
  • 65,976
  • 51
  • 121
  • 152
16
votes
4 answers

How to apply texture to glutSolidCube

I can find tutorials about mapping textures to polygons specifying vertices etc. but nothing regarding how to apply a texture to a cube (or other stuff) drawn with glut (glutSolidCube). I am doing something like: glTexEnvfv(GL_TEXTURE_ENV,…
JohnIdol
  • 48,899
  • 61
  • 158
  • 242
16
votes
1 answer

X Error of failed request: GLXBadFBConfig

I'm trying to do a Sierpinski gasket as specified in "INTERACTIVE COMPUTER GRAPHICS A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL®" 6th edition. I have this code Sierpinski.cpp #include #include #include…
asdrubalivan
  • 1,149
  • 2
  • 9
  • 17
15
votes
2 answers

Minimize mouse input lag on GL desktop app?

I think this is a common problem which relates to the OpenGL pipeline and how it queues rendered frames for display. How it looks like An extreme example of this can be seen in this video on Android. Mouse latency is present on the simplest desktop…
15
votes
2 answers

Background colour in opengl

I want to change the background color of the window after pressing the button, but my program doesn't work, can somebody tell me why? int main(int argc, char* argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); …
lego69
  • 767
  • 1
  • 12
  • 20