Results 1 to 4 of 4

Thread: Tetture matrix defaults?

  1. #1
    Member Contributor
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    59

    Tetture matrix defaults?

    I'm having the following problem:

    One shader I wrote uses texture matrix 7. When I start my program the matrix is not initialized.

    Running my program on a Geforce I get the expected behavior of the matrix being initialized to the identity matrix.

    However, when I start the same program on an ATI card nothing gets rendered, as if the matrix defaults to 0.

    Which one is correct according to GL specs?

  2. #2
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,675

    Re: Tetture matrix defaults?

    I'm pretty sure matrices are initialized to identity. However, have you considered that texture matrix 7 may not be supported on the hardware in question? You only have as many texture matrices as GL_MAX_TEXTURE_UNITS, and the minimum for that is 2.

    I'm rather surprised that what you did works on NVIDIA hardware, since they only support 4 fixed-function texture units.

  3. #3
    Member Contributor
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    59

    Re: Tetture matrix defaults?

    The hardware in question are ATI HD 5770 and HD 4850 so it's recent models. It doesn't matter which texture matrix I use here, they all produce the same glitch.

    Also, why should the number of fixed function texture units have any effect on shaders?

  4. #4
    Senior Member OpenGL Lord
    Join Date
    Mar 2015
    Posts
    6,675

    Re: Tetture matrix defaults?

    Also, why should the number of fixed function texture units have any effect on shaders?
    That's where texture matrices come from. You set glMatrixMode(GL_TEXTURE), and that's the texture matrix for that texture unit. The fact that GLSL can access this matrix doesn't change the fact that it is a fixed-function parameter.

    I checked the specs, and it turns out that the number of texture matrices is based on the number of texture coordinates, not texture units. Which has a minimum of 8.

Similar Threads

  1. Replies: 0
    Last Post: 09-16-2015, 03:27 PM
  2. Return to defaults - glMaterialFv?
    By fiooer in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 05-02-2010, 09:04 AM
  3. Replies: 3
    Last Post: 04-03-2010, 03:10 PM
  4. Resetting texture blend values to their defaults
    By halo in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 11-24-2004, 01:43 PM
  5. GLFW fullscreen defaults to 60fps always
    By soconne in forum OpenGL: General
    Replies: 3
    Last Post: 01-13-2004, 03:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean