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

How to compile for Windows on Linux with gcc/g++?

I have written some effects in C++ (g++) using freeglut on Linux, and I compile them with g++ -Wall -lglut part8.cpp -o part8 So I was wondering if it is possible to have g++ make static compiled Windows executables that contains everything…
Louise
  • 6,193
  • 13
  • 36
  • 36
61
votes
1 answer

What is the difference between FreeGLUT vs GLFW?

My university started teaching a course which includes OpenGL programming. They make us use FreeGLUT to create a window and a context for OpenGL, but I found an online course at lynda.com about OpenGL in which they use GLFW instead of FreeGLUT. So I…
varun
  • 1,473
  • 1
  • 9
  • 15
50
votes
11 answers

How do you install GLUT and OpenGL in Visual Studio 2012?

I just installed Visual Studio 2012 today, and I was wondering how can you install GLUT and OpenGL on the platform?
wasabiman
  • 529
  • 1
  • 5
  • 4
44
votes
7 answers

Initializing OpenGL without GLUT

every introduction and sample that I can find seems to use GLUT or some other framework to "initialize" OpenGL. Is there a way of initializing OpenGL with just what is available in GL and GLU? If not, then what is GLUT doing that is not possible…
TholePin
34
votes
2 answers

GLUT exit redefinition error

In my simple OpenGL program I get the following error about exit redefinition: 1>c:\program files\microsoft visual studio 8\vc\include\stdlib.h(406) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs 1> c:\program…
Ashwin Nanjappa
  • 76,204
  • 83
  • 211
  • 292
34
votes
3 answers

Using the mouse scrollwheel in GLUT

I want to use the mouse scrollwheel in my OpenGL GLUT program to zoom in and out of a scene? How do I do that?
Ashwin Nanjappa
  • 76,204
  • 83
  • 211
  • 292
33
votes
14 answers

PyOpenGL glutInit NullFunctionError

I am running Anaconda Python 2.7 on a Win7 x64 machine and used pip install PyOpenGL PyOpenGL_accelerate at the Anaconda command line to install PyOpenGL. I have some code (not my own I must confess) that makes use of glutInit import sys import…
DrBwts
  • 3,470
  • 6
  • 38
  • 62
32
votes
1 answer

Cmake link library target link error

Hi I have problem with linkg Glfw and other libraries using cmake. From command line i compile like this g++ main.cpp -lGL -lGLU -lGLEW -lglfw But I wanted to use cmake for compiling. I tried to use target_linkg_libraries but this produce error…
Luffy
  • 677
  • 1
  • 6
  • 19
30
votes
2 answers

Why does my color go away when I enable lighting in OpenGL?

I am developing a graphics application in C++ with the OpenGL API and GLUT. To add lighting, I made the following changes in my modelview matrix: glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); // Create light components. GLfloat ambientLight[] = {…
dangerChihuahua007
  • 20,299
  • 35
  • 117
  • 206
30
votes
2 answers

Why does glGetString(GL_VERSION) return null / zero instead of the OpenGL version?

I'm on Linux Mint 13 XFCE. My problem is that when I run in terminal the command: glxinfo | grep "OpenGL version" I get the following output: OpenGL version string: 3.3.0 NVIDIA 295.40 But when I run the glGetString(GL_VERSION) in my application…
lyra42
  • 365
  • 1
  • 3
  • 11
27
votes
6 answers

How to use GLUT/OpenGL to render to a file?

I have a program which simulates a physical system that changes over time. I want to, at predetermined intervals (say every 10 seconds) output a visualization of the state of the simulation to a file. I want to do it in such a way that it is easy…
Alex319
  • 3,818
  • 9
  • 34
  • 40
27
votes
3 answers

Getting smooth, big points in OpenGL

I started playing around with OpenGL and GLUT. I would like to draw some points, but the problem is that they turn out to be squares, and I would like them to be round dots (filled circles). This is what I do: void onInitialization( ) { …
Tamás Szelei
  • 23,169
  • 18
  • 105
  • 180
26
votes
6 answers

Error with GLUT compile in ubuntu

I try to compile some "hello world" glut application: #include #include #include #include GLint Width = 512, Height = 512; const int CubeSize = 200; void Display(void) { int left, right, top,…
G-71
  • 3,626
  • 12
  • 45
  • 69
25
votes
2 answers

How do I draw text with GLUT / OpenGL in C++?

How do I draw a text string onto the screen using GLUT / OpenGL drawing functions?
KingNestor
  • 65,976
  • 51
  • 121
  • 152
24
votes
5 answers

glCreateShader is crashing

I should have the newest version of Glew and Glut so that shouldn't be the problem. Everything should be linked, and I'm using MS visual studio 2010. My program compiles but when I get to glCreateShader(GL_FRAGMENT_SHADER) it show an error:…
Parker Olson
  • 315
  • 1
  • 3
  • 7
1
2 3
99 100