All Questions

0
votes
1answers
113 views

Transform the modelMatrix

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...
66
votes
7answers
95306 views

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 W...
30
votes
5answers
43534 views

How to render offscreen on OpenGL?

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 ...
67
votes
2answers
23677 views

What does "immediate mode" mean in OpenGL?

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?
16
votes
5answers
20075 views

How to use GLUT/OpenGL to render to a file?

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....
67
votes
6answers
39301 views

Is OpenGL coordinate system left-handed or right-handed?

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...
31
votes
3answers
34234 views

Calculating normals in a triangle mesh

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...
28
votes
6answers
22215 views

Implementing Ray Picking

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...
14
votes
4answers
3816 views

What is the result of NULL + int?

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...
22
votes
5answers
17086 views

OpenGL define vertex position in pixels

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...

Previous Next