Jump to content
  • Advertisement
Sign in to follow this  

ATI_fragment_shader + GL_ARB_multitex ... problem

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

I'm new to ATI_fragment_shader. I've got a problem similar as Dragon's Strike from "texture 1+ doesnt work in shader". I can only get GL_TEXTURE0(default) to shader(ATI_fragment_shader). When I try to send GL_TEXTURE1+ to GL_REG_0_ATI it renders only black screen.
   /// Loading texture - At least trying to:)
  glGenTextures(1, &texture[0]);
  glBindTexture(GL_TEXTURE_2D, texture[0]);
  glTexImage2D(GL_TEXTURE_2D, 0, 4, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE,       pixelsRGBA);

  /// initializing ATI_fragment_shader
  fragShaderName = glGenFragmentShadersATI(1);

  /// it does nothing, I was trying to see can I get something to 

  ///drawing geometry
  glBindTexture(GL_TEXTURE_2D, texture[0]);
    glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);

So problem is when I use glSampleMapATI(GL_REG_0_ATI, GL_TEXTURE0, GL_SWIZZLE_STR_ATI); it renders fine but when i put GL_TEXTURE1+ instead I get only black screen. I don't now where is the problem. Maybe I haven't bind texture corectly or something? It's killing me because I'm wasting time and I don't have a clue!

Share this post

Link to post
Share on other sites
Sorry if I sound retarded but that stuff about uniforms, is it GLSL related? I'm not using GLSL because it's unsupported by my hardware and I want maximum compatibility so I use only low-level API, which requires GL_ATI_fragment_shader and GL_ARB_multitexturing. I was looking at some older code with frag. shaders and havent found that uniforms...

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!