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

OpenGL 3.1 lighting messed up, using phong shading

After many painful hours of attempting to figure out why my lighting is messed up I am still at a loss. The OpenGL normals are correct (backface culling does not cause any of my triangles to disappear) I calculate my normals in order to interpolate…
Mike Casa
  • 451
  • 7
  • 14
3
votes
1 answer

Transparent textures being rendered as black in OpenGL

I have a texture with transparent parts, but instead of being rendered transparent they're black. To test if the RGBA values get passed on correctly to the shader, I made everything render in greyscale. And as I thought the alpha values weren't…
3
votes
0 answers

Memory leak in basic freeglut program

I'm trying to make a simple freeglut application. I have the following code: #include "GL/freeglut.h" #include "glm/glm.hpp" // global and state variables namespace globals { const int screen_width = 720; const int screen_height = 720; const…
Arrow
  • 389
  • 2
  • 12
3
votes
0 answers

freeglut failing to open display '' on M1 mac

I am running a simple application to open a window and show some points in it in xcode 13. Everything seems to work fine, no import errors, all correct includes and dynamic libraries etc... but upon running the app the error is freeglut…
3
votes
1 answer

Undefined reference to `__imp___glutInitWithExit' and others, but library is linked

I set up CLion, MinGW and added the appropriate freeglut files into MinGW. Now, I'm trying to run this code: /* * GL01Hello.cpp: Test OpenGL C/C++ Setup */ #include // For MS Windows #include // GLUT, includes glu.h and…
biatheawesome
  • 31
  • 1
  • 4
3
votes
1 answer

glutBitmapString/glutStrokeString seem to require const unsigned char* - strings don't work

Ubuntu 11.04, G++, freeglut and GLUT. I don't understand this at all. Here's the error I get: whatever.cc:315:59: error: cannot convert ‘std::string’ to ‘const unsigned char*’ for argument ‘2’ to ‘void glutStrokeString(void*, const unsigned…
PROGRAM_IX
  • 404
  • 1
  • 5
  • 21
3
votes
0 answers

OpenGL not found when building CMake project in Mac OS Catalina

I am trying to build a CMake project in CLion. When I try to load the project I receive the following error: CMake Error at /Applications/CLion.app/Contents/bin/cmake/mac/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): …
Eric Bush
  • 147
  • 1
  • 1
  • 10
3
votes
1 answer

How to make Haskell GLUT using freeglut on Windows?

How to make the Haskell GLUT binding using freeglut instead of the original GLUT on windows?
Eric Wong
  • 524
  • 9
  • 21
3
votes
1 answer

OPENGL Showing white box instead of moveable cube

Need help with this problem on opengl. It will compile but wont do anything other than create a white box instead of the cube it should be. I finally got my compiler working properly but now this is happening and am unsure what I am doing wrong.…
3
votes
1 answer

Does using Xvfb to run OpenGL effects version?

I'm trying to run OpenGL on headless ubuntu server. GPU / Driver : NVIDIA Geforce GTX 1080Ti / version 418.67 Using freeglut (installed by running apt install freeglut3-dev) Using Xvfb (Since it is a headless server.) When I run glxinfo | grep…
tink
  • 39
  • 1
  • 6
3
votes
1 answer

Why are my 3D shapes in opengl acting weird?

I tried to write an "Engine" to render shapes using OpenGL. The idea is that you can write "renderers" which are just functions that render shapes and add them to a list for the Engine class to display. So I added a cube and a pyramid (the code for…
3
votes
1 answer

OpenGL particle system

I'm trying to simulate a particle system using OpenGl but I can't get it to work, this is what I have so far: #include int main (int argc, char **argv){ // data allocation, various non opengl stuff ............ glutInit(&argc,…
w00t
  • 899
  • 1
  • 7
  • 9
3
votes
1 answer

unidentified reference to glutInit

I tried to compile a basic OpenGL program, simply just a blank window. I'm using CodeLite with the g++ compiler on Linux Mint 18.1 (Ubuntu 16.04 LTS). The code so far is: #include #include #include int…
Fons
  • 83
  • 1
  • 10
3
votes
2 answers

How does glReadPixels works?

I have just started using OpenGL i was writing a program for boundary fill algorithm ,i used glClearColor to change the background colour to red but when i am reading a pixel color using glReadPixels it gives RGB value 0,0,0 instead of 1,0,0…
Aadi
  • 154
  • 1
  • 2
  • 18
3
votes
0 answers

Visual Studio C++ 2015 project cannot be linked against glew64 static library

In my Visual Studio C++ project, I have two configurations, for 32 bit and 64 bit. I try to statically link against freeglut and glew libraries. In 32 bit configuration, I set the library search path to a folder containing freeglut.lib and…
fercis
  • 611
  • 2
  • 12
  • 26