Jump to content
  • Advertisement
Sign in to follow this  
DerTherion

OpenGL multi texturing question

This topic is 3539 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, i play with the multi texture in opengl/jogl my question is, is it possible(without use of shaders) to get any kind of texture noise when combine textures & states (like bump / displacement mapping or something) in multi texturing? // the texture bump is a grayscale bumpmap picture gl.glActiveTexture(GL.GL_TEXTURE0); gl.glEnable(GL.GL_TEXTURE_2D); texture[bump].bind(); //bind first texture /* gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_COMBINE); gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_COMBINE_RGB, GL.GL_DOT3_RGBA); gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_SOURCE0_RGB, GL.GL_TEXTURE); gl.glTexEnvi(GL.GL_TEXTURE_ENV, GL.GL_SOURCE1_RGB, GL.GL_PREVIOUS); */ gl.glTexEnvf (GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_COMBINE); gl.glTexEnvf (GL.GL_TEXTURE_ENV, GL.GL_COMBINE_RGB, GL.GL_DOT3_RGBA); gl.glActiveTexture(GL.GL_TEXTURE1); gl.glEnable(GL.GL_TEXTURE_2D); texture[1].bind(); //bind secondary texture gl.glTexEnvf (GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_COMBINE); gl.glTexEnvf (GL.GL_TEXTURE_ENV, GL.GL_COMBINE_RGB, GL.GL_ADD);

Share this post


Link to post
Share on other sites
Advertisement
If you are going to combine 2 textures and generate noise, you could use 2 textures that already contain noise and just GL_MODULATE them.

Share this post


Link to post
Share on other sites
bump / displacement* mapping takes place only in the shader, so no.

*) if you set up your mesh right, you could modify it as your drawing based on a offset, but this would be a pain and slower then a shader, dont do it.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!