Sign in to follow this  

ATI_fragment_shader + GL_ARB_multitex ... problem

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this