Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Reflection / glTexGeni Question (with Image)

This topic is 3616 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello @all, i work with java/jogl(OpenGL extension) and i got a little Problem working with Texture Generate. I use the init of Cubemapping without Enable it to produce an reflection from the FBO (see Code below) the FBO mirror Texture is rendered,but its wrong. The Side is in the middle and the Middle of the FBO is show at the sides.. what can i do to correct it? thanks for any help :) Water Reflect Code: //fbo texture contains a mirror of the scene gl.glBindTexture(GL.GL_TEXTURE_2D, fbo_texture.get(0)); gl.glTexGeni(GL.GL_S, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP); gl.glTexGeni(GL.GL_T, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP); gl.glTexGeni(GL.GL_R, GL.GL_TEXTURE_GEN_MODE, GL.GL_REFLECTION_MAP); // i tested GL.GL_REPEAT /CLamp /Clamp to Edge gl.glTexParameteri(GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT); gl.glTexParameteri(GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT); gl.glTexParameteri(GL.GL_TEXTURE_CUBE_MAP, GL.GL_TEXTURE_WRAP_R, GL.GL_REPEAT); gl.glEnable(GL.GL_TEXTURE_GEN_S); gl.glEnable(GL.GL_TEXTURE_GEN_T); gl.glEnable(GL.GL_TEXTURE_GEN_R); this is how the quad strips are made ... ->loops gl.glColor4f(1.0f,1.0f,1.0f,0.8f); gl.glNormal3f(0,-1,0); //for test all normals to the sky gl.glVertex3f( t,3.0f,tt+si ); ... p.s.: the screenshot comes from an older Notebook with shared memory GPU (so do not look at the fps ;) The Problem

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!