It is easy to set the ViewMatrix with glm: glm::lookAt(Position, Direction, UpVector); but if I try to use the funktion with the modelMatrix, I'll get comfusing values (the Model is not in the corr...
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 W...
My aim is to render OpenGL scene without a window, directly into a file. The scene may be larger than my screen resolution is. How can I do this? I want to be able to choose the render area size to ...
What is "immediate mode"? Give a code example. When do I have to use immediate mode instead of retained mode? What are pros and cons of using each method?
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 am trying to understand the OpenGL coordinate system. However, some tutorials say the default coordinate system is left handed (see http://www.c-sharpcorner.com/UploadFile/jeradus/OpenGLBasics111720...
I have drawn a triangle mesh with 10000 vertices(100x100) and it will be a grass ground. I used gldrawelements() for it. I have looked all day and still can't understand how to calculate the normals f...
I have a renderer using directx and openGL, and a 3d scene. The viewport and the window are of the same dimensions. How do I implement picking given mouse coordinates x and y in a platform independen...
I have seen the following macro being used in OpenGL VBO implementations: #define BUFFER_OFFSET(i) ((char *)NULL + (i)) //... glNormalPointer(GL_FLOAT, 32, BUFFER_OFFSET(x)); Could you provide a li...
I've been writing a 2D basic game engine in OpenGL/C++ and learning everything as I go along. I'm still rather confused about defining vertices and their "position". That is, I'm still trying to under...