Tag Info

New answers tagged

0

The title of your question is different from what you're actually asking. I assume you are asking how to render a textured quad like a part of your game's HUD. Here's what you can do to have an object rendered on top of your other objects: void renderScene(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Set up matrixes in order to ...


0

my friend helped me to solve the problem, honestly, i still dont know what the problem was in the previous one, but i changed function as void keypress(unsigned char key, int x, int y) { Matrix R; HomVector a; switch(key) { ... case 'i': cam.rotation.x -=1.0f; break; case 'I': cam.rotation.x += 1.0f; break; case 'j': cam.rotation.y -= ...


0

I can't post comments yet, but.. You said that you're moving the object, but from your code it seems that you're moving the camera (not the object). I see nothing wrong with the key presses though, the only thing that comes to mind is that if your camera happens to be centered on, say, a Cube, with no lights, rotating 90 degrees won't change the image so you ...


0

You need to use a textured quad with an orthographic projection matrix. Using alpha blending will make the image partially transparent allowing for the image to not appear square.


0

You question is a little unclear, but if you asked how to render, for instance a GUI, I have an answer. Basically you need to render a textured 2d quad. Note that it should be rendered last. Heres a video tutorial: https://www.youtube.com/watch?v=vOmJ1lyiJ4A&list=PLRIWtICgwaX0u7Rf9zkZhLoLuZVfUksDP&index=24



Top 50 recent answers are included