Jump to content
  • Advertisement
Sign in to follow this  
Tommato

OpenGL Colored Quads

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

Hi All

 

I realize OpenGL draws a quad as 2 triangles with barycentric interpolation for each one. But it looks "not symmetric" (attach), that confuses users and produces unneeded questions. Is there a way to change this, or it's unavoidable?

 

Thank you

Share this post


Link to post
Share on other sites
Advertisement

Simply draw the quad by yourself and determine the color values set for each triangle or use a shader is the best bet for doing this

Share this post


Link to post
Share on other sites

Turn your quads into triangles, this might help.

 

In OpenGL, values (i.e. colours) are interpolated across triangles between the vertex and fragment shader regardless if you want it to do that or not. Am I guessing you are drawing the colour per vertex rather than per pixel?

Share this post


Link to post
Share on other sites

i can only reply to this topic, rest disables scrollbars i cant even write a messagae to anyone of the staff so the crap crap i cant write anywhere maybe its a bug with opera but it doesnt throw any uipgrades i cant even scroll for to post any message so i took this chance please report this to any staff

Share this post


Link to post
Share on other sites

i can only reply to this topic, rest disables scrollbars i cant even write a messagae to anyone of the staff so the crap crap i cant write anywhere maybe its a bug with opera but it doesnt throw any uipgrades i cant even scroll for to post any message so i took this chance please report this to any staff


Going to be a little bit before this can be fixed, but consider the problem noted. And maybe try another browser. :)

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!