OpenGL problems compiling through Linux distributions

I recently wrote a labyrinth game in opengl (using freeglut) that works great when building on Ubuntu or Cygwin, but when it is built on Fedora Core 12 with freeglut, the game is falling apart and my professor doesn't see anything, he builds it on his machine (OS about which he did not disclose).

Also, in previous assignments, I flickered, even though I implemented double buffering, and I flush the buffer after each display. Flickering occurs on my Fedora machine, often on my Ubunutu machine, and not cygwin at all.

Finally, on a Fedora machine, the fog is extremely dense and seems to ignore the call to glFogf (GL_FOG_DENSITY, 0.1). However, on Cygwin and Ubuntu the fog works flawlessly.

Are there many differences between freeglut implementations between OSs that this will be a problem? My professor seems that he is ready to abandon me on these projects, but I do not know why opengl is acting in this situation with an error between operating systems.

Please let me know if you have an understanding and appreciation for your time.

+3
source share
2 answers

I received the following two calls in order. It should be like that.

glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); glutCreateWindow ("My window");

It was like this for me:

glutCreateWindow ("My window"); glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);

, , .

Red Hat, size_t int, Ubuntu unsigned int. fread(), -1 Fedora static_cast (-1) Ubuntu, , , :/. , Ubuntu.

+2

, OpenGL, , -, . / , - , . .

, , - glutPostRedisplay .

- , , .

, , , , , - .

0

Source: https://habr.com/ru/post/1756612/


All Articles