Jump to content
  • Advertisement
Sign in to follow this  

glColor3f overiding colouring over my texture

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

hey have a drawScene function which draws a textured square but when i call draw_arrow() before or after the code for the texture it covers the whole texture in red. The code for my square is also inside a glPushMatrix() glPopMatrix(). How do I stop the glColor3f(RED) inside my draw_arrow function from colouring over my square? is there a way to disable it or something cos i don't understand why it's doing that.
void draw_arrow(){

glColor3f(5.0f,0.0f,0.0f); //Red Arrow
	glTranslatef(0.0f,0.0f,-5.0f);						//Move into the screen 5 units
			glVertex3f(-1.3f, 0.55f,  1.0f);   //Bottom right
			glVertex3f( -1.3f, 0.75f,  1.0f);  //Top right
			glVertex3f( -1.7f,  0.75f,  1.0f); //Top left
			glVertex3f(-1.7f,  0.55f,  1.0f); //Bottom left


			glVertex3f(-1.3f, 0.45f,  1.0f);   //Bottom 
			glVertex3f( -1.1f, 0.65f,  1.0f);  //Middle
			glVertex3f( -1.3f,  0.85f,  1.0f); //Top 




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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!