Jump to content
  • Advertisement
Sign in to follow this  

OpenGL using tex2D in vertex shader

This topic is 4589 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

Hi, I am using opengl and cg. I need to use a 2d texture in my vertex shader, and use a 1d texture in my pixel shader. My vertex shader profile is vp40. But my mesh becomes totally black. I think maybe something wrong with the multitexturing, so I did this: //environment texture glActiveTexture(GL_TEXTURE0); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, m_texture[0]); cg_env_texture = cgGetNamedParameter(cg_vertex_program_2, "environmentMap"); cgGLSetTextureParameter(cg_env_texture, m_texture[0]); cgGLEnableTextureParameter(cg_env_texture); //1d texture glActiveTexture(GL_TEXTURE1); glEnable(GL_TEXTURE_1D); glBindTexture(GL_TEXTURE_1D, gl_gauss_texture); cgGLSetTextureParameter(cg_gauss, gl_gauss_texture); cgGLEnableTextureParameter(cg_gauss); But still don't work. Please help me out. [Edited by - william7ba on March 31, 2006 9:58:04 AM]

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!