Questions tagged [freeglut]

freeglut is an open-source alternative to the OpenGL Utility Toolkit (GLUT) library.

freeglut is an open-source alternative to the OpenGL Utility Toolkit (GLUT) library ().

Resources:

610 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
53
votes
2 answers

difference of freeglut vs glew?

I've recently started learning OpenGL (> 3.3) & I've noticed a lot of examples & tutorials use both freeglut & glew, but don't really explain the difference at all. The best description I've found, after googling & reading ad nauseum, has been this…
ReturnVoid
  • 1,106
  • 1
  • 11
  • 18
31
votes
5 answers

gluPerspective was removed in OpenGL 3.1, any replacements?

I'm trying to read some OpenGL tutorials on the net. the problem is that I found some old ones that use gluPerspective(). gluPerspective was deprecated in OpenGL 3.0 and removed in 3.1. What function can I use instead? I'm using C++ with latest…
ufk
  • 30,912
  • 70
  • 235
  • 386
23
votes
2 answers

OpenGL: glGetError() returns invalid enum after call to glewInit()

I use GLEW and freeglut. For some reason, after a call to glewInit(), glGetError() returns error code 1280, even with glewExperimental = GL_FALSE. I cannot compile the shaders, glGetProgramInfoLog() returns "Vertex shader(s) were not successfully…
Martin
  • 1,877
  • 5
  • 21
  • 37
17
votes
1 answer

Silencing OpenGL warnings on macOS Mojave

My code is full of warnings like 'glTranslatef' is deprecated: first deprecated in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings) I did #define GL_SILENCE_DEPRECATION but that didn't fix the…
Alexander
  • 303
  • 1
  • 2
  • 5
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
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
3 answers

FreeGLUT on Mac OS X Lion

Some context: I am going through a tutorial on using OpenGL. The tutorial requires a couple libraries in order to work. One of those libraries is FreeGLUT. I am on OS X using Lion. I've downloaded FreeGLUT and followed the instructions for…
jasonaburton
  • 2,941
  • 7
  • 34
  • 48
11
votes
6 answers

How can I implement an accurate (but variable) FPS limit/cap in my OpenGL application?

I am currently working on an OpenGL application to display a few 3D spheres to the user, which they can rotate, move around, etc. That being said, there's not much in the way of complexity here, so the application runs at quite a high framerate…
Breakthrough
  • 2,444
  • 2
  • 23
  • 37
11
votes
1 answer

freeglut (something): failed to open display ''

I compiled a C++ code under Linux (Ubuntu) and everything is fine as far as I connect a monitor to my PC. My code shows some graphics and then it saves their screenshots. The runtime graphic is not important to me but the screenshots. But if I run…
ar2015
  • 5,558
  • 8
  • 53
  • 110
11
votes
3 answers

CMake is dropping the item c++

I work on windows with QtCreator .I try to use freeglut/opengl2 all libs have been build and install properly But have undefined references to all glut components certainly due to : Targets may link only to libraries. CMake is dropping the…
Otha
  • 121
  • 1
  • 1
  • 6
10
votes
1 answer

What's the point of glutidlefunc() in freeglut

I get how glutdisplayfunc() makes the display loop and Iv read in some places that you should put the game mechanics in glutidle instead of the display; why can't you just put them in a while (gameisrunning) loop?
Jim Jones
  • 2,568
  • 6
  • 26
  • 43
9
votes
1 answer

CMake can't find freeglut-3.0.0

Freeglut-3.0.0 is build with cmake (MinGW makefiles) and mingw and then successfully installed with mingw32-make install to C:/Program Files (x86)/freeglut. My CMakeLists.txt is: cmake_minimum_required(VERSION 3.7) project(math_tests) …
slavust
  • 138
  • 1
  • 1
  • 7
9
votes
1 answer

undefined reference to `GlewInit' - OpenGL

I get this error when trying to make the executable, the code compiles correctly and yet when I hit the make command I get this error message: gcc -c helloworld.c lewis@lewis-desktop ~/Desktop/Dev/gl $ make gcc -o hello-gl helloworld.o…
TheBlueCat
  • 1,147
  • 5
  • 19
  • 38
1
2 3
40 41