All Questions

12
votes
1answers
2798 views

How do I compose a rotation matrix with human readable angles from scratch?

The one thing that has always hindered me from doing 3D programming is failing to understand how math works. I can go along with math fine in programming flow using methods and functions, then its all...
44
votes
1answers
9026 views

Rendering meshes with multiple indices

I have some vertex data. Positions, normals, texture coordinates. I probably loaded it from a .obj file or some other format. But each piece of vertex data has its own index. Can I render this mesh da...
4
votes
1answers
1422 views

OpenGL - vertex normals in OBJ

I want to know how can I use the vertex normals for lightning effect? Currently what I have is I can send both vertex and texture coords to the shader and use them but with normals, I don't know how t...
78
votes
8answers
38008 views

How to make an OpenGL rendering context with transparent background?

Rendering contexts usually have a solid color on the background (black or whatever, see the image below): I'm wondering if it's possible to setup a window, with no decorations AND with the transpar...
6
votes
4answers
6353 views

How to render depth linearly in modern OpenGL with gl_FragCoord.z in fragment shader?

I read lots of information about getting depth with fragment shader. such as http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=234519 but I still don't know whether or ...
3
votes
2answers
1938 views

OpenGL - Index buffers difficulties

I have a custom file format that has all the needed information for a 3D mesh (exported from 3ds Max). I've extracted the data for vertices, vertex indices and normals. I pass to OpenGL the vertex da...
3
votes
1answers
1434 views

Rotating a Group of Vectors

I am trying to rotate a group of vectors I sampled to the normal of a triangle If this was correct, the randomly sampled hemisphere would line up with the triangle. Currently I generate it on the Z-...
19
votes
6answers
83906 views

Creating a 3D sphere in Opengl using Visual C++

I am not able to create a simple 3D sphere using the OpenGL library function glutSolidSphere() in C++. Here's what I tried: #include<GL/glu.h> void display() { glClear(GL_COLOR_BUFFER_B...
70
votes
4answers
24253 views

How does OpenGL work at the lowest level?

I understand how to write OpenGL/DirectX programs, and I know the maths and the conceptual stuff behind it, but I'm curious how the GPU-CPU communication works on a low level. Say I've got an OpenGL ...
3
votes
2answers
1320 views

Normal mapping gone horribly wrong

I tried to implement normal mapping in my opengl application but I can't get it to work. This is the diffuse map (which I add a brown color to) and this is the normal map. In order to get the tangen...

Previous Next