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

Can't get Freeglut to work with Haskell on Windows

Here is my source code I'm trying to get to work: In Main.hs: import Graphics.Rendering.OpenGL import Graphics.UI.GLUT import Bindings import Data.IORef main = do (progname,_) <- getArgsAndInitialize createWindow "Hello World" …
Student
  • 182
  • 1
  • 7
8
votes
0 answers

How to sync using glutSwapBuffers in Wayland?

I noticed that my animation suffers from artifacts that look like missed vblanks. No visible tearing, but sometimes the frame halts for a split second and then visibly jumps. I decided to measure the time between buffer swaps: void draw_cb() { …
The Vee
  • 11,420
  • 5
  • 27
  • 60
8
votes
4 answers

Callback function in freeglut from object

I'm using MSVC++ and freeglut in order to use openGL. Now, I have a class called Camera, which is pretty simple, but it also holds the function for the reshaping of my window. My question is: how can I set glutReshapeFunc(void (*callback)(int,int))…
Marnix
  • 6,384
  • 4
  • 43
  • 78
8
votes
3 answers

Linking error in OpenGL using freeglut in CLion

So, I am using freeglut to try to do some openGL stuff, but I keep getting errors saying that references are undefined: CMakeFiles\texture_mapping.dir/objects.a(TextureMapper.cpp.obj): In function…
Cache Staheli
  • 3,510
  • 7
  • 32
  • 51
8
votes
4 answers

Why is Visual Studio Trying to Link 'freeglutd.lib'?

I'm trying to compile an OpenGL program using Visual Studio 2013, but I get the following error: Error 1 error LNK1104: cannot open file 'freeglutd.lib' ... For reference, I have FreeGLUT installed and have configured VS to search the…
someguy
  • 7,144
  • 12
  • 43
  • 57
8
votes
1 answer

using freeglut instead of GLUT

I am learning OpenGL with the help of tutorials found online. Many of them use GLUT library, even though it is generally recommended to use freeglut instead. How will replacing GLUT header file with freeglut header affect the compilation ? Is such a…
James C
  • 901
  • 1
  • 18
  • 38
8
votes
2 answers

How do I draw a rainbow in Freeglut?

I'm trying to draw a rainbow-coloured plot legend in openGL. Here is what I've got so far: glBegin(GL_QUADS); for (int i = 0; i != legendElements; ++i) { GLfloat const cellColorIntensity = (GLfloat) i / (GLfloat) legendElements; …
quant
  • 21,507
  • 32
  • 115
  • 211
8
votes
1 answer

Ubuntu 13.10 C++ OpenGL GLUT - linking issues - undefined reference to `glClearColor'

I am running Ubuntu 13.10 and trying to compile that portion of sample OpenGL code: #include "GL/freeglut.h" #include "GL/gl.h" /* display function - code from: http://fly.cc.fer.hr/~unreal/theredbook/chapter01.html This is the actual usage of…
Tom Raganowicz
  • 2,169
  • 5
  • 27
  • 41
8
votes
1 answer

Error: functions that differ only in their return type cannot be overloaded

I'm using mac os 10.9, I have a C++ program that uses freeglut library. When I try to make the project. It gives an error which I don't know if it's my fault or not. This is the message: In file included from…
Xitrum
  • 7,765
  • 26
  • 90
  • 126
8
votes
1 answer

Freeglut, OpenGL and memory

I've started practicing OpenGL with Glew and Freeglut. I have a question about my application and was wondering if anyone ran into the same problem (if it is one)? When I initially execute my application, the memory used is around 22,000 KB. After…
8
votes
3 answers

GLFW opens OpenGL 3.2 context but Freeglut can't - why?

I am working on a Mac, I've got FreeGlut compiled and installed, but I can't seem to get the OpenGL 3.2 context with it. However, I can get it without any problem while using GLFW. So in GLFW, this code works perfectly fine: …
gambiting
  • 365
  • 2
  • 9
8
votes
2 answers

installing Freeglut on Linux

I am trying to install freeglut on my computer running Linux Mint. I follow the steps on this website: http://freeglut.sourceforge.net/docs/install.php. When I do make all in the src directory, it gives the following error: fatal error: GL/gl.h This…
rurouniwallace
  • 2,027
  • 6
  • 25
  • 47
7
votes
1 answer

Where is the documentation for glutInitContextVersion?

The FreeGLUT API documentation does not include an entry for glutInitContextVersion and when I google for it, all I find are a list of questions which don't directly address its usage or effects. Is it documented anywhere?
Nathan Ridley
  • 33,766
  • 35
  • 123
  • 197
7
votes
1 answer

Why does OpenGL act this way when I use color values greater than 1.0f?

I was working on learning OpenGL and I was tasked with creating the figure below: This is what my intention was, but the first time I wrote it I buffered the colors as floats from 0 - 255 instead of 0.0 - 1.0. Clearly that was wrong, but this is…
Fsmv
  • 1,106
  • 2
  • 12
  • 28
7
votes
3 answers

Linking against NuGet Libraries in Visual Studio 2013

Hi: In Visual Studio 2012 Professional, Update 4, I can create a new OpenGL project pretty easily by creating a new Visual C++ project (using the blank template) and going into the NuGet Package Manager Console and typing: Install-Package…
1
2
3
40 41