Results 1 to 3 of 3

Thread: Texture tinting

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2011
    Posts
    23

    Texture tinting

    How can I prevent glColor3f() tinting a texture?

    I have two on-screen objects, one textured and one solid colour.

    I render the solid colour and then the textured one and they are okay for the first frame - any further frames and the textured block becomes tinted a green colour (the colour of my solid block).

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Texture tinting

    glColor3f(1.0,1.0,1.0); before rendering the textured object, or after rendering the solid color object. glColor changes the current color, which then stays like that until you change it again. White is the default, that is why first frame is ok.

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2011
    Posts
    23

    Re: Texture tinting

    Ah thanks! I knew it would be something simple I just didn't think of that.

Similar Threads

  1. Replies: 1
    Last Post: 12-26-2014, 04:57 PM
  2. Replies: 1
    Last Post: 03-10-2014, 12:51 PM
  3. Replies: 2
    Last Post: 09-27-2004, 05:25 PM
  4. color filtering/tinting?? AND normals
    By tymk in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-11-2001, 05:29 PM

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