Jump to content
  • Advertisement
Sign in to follow this  
Rakesh1987

Jogl - glut primitives - individual pixel colours

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

I am using jogl and have created a glcanvas I have loads of cones in random positions using: glut.glutSolidCone(0.5, 0.5, 20, 10); each cone is coloured with a unique colour. I use the depth buffer to work out what part of the cones to draw where they intersect: gl.glClearDepth(0); gl.glEnable(GL.GL_DEPTH_TEST); gl.glDepthFunc(GL.GL_GEQUAL); I'm getting about 800ish different unique colours even though I only draw 100. The reason for this is because the edges(base) of the cone has some different shaded pixels to the actual cone, also where the cones intersect, the colour doesn't belong to either 1 of the cones. At first I thought this was because of distance but made cones shorter(closer to camera) and was still getting this problem. I believe its some sort of auto anti aliasing which I don't want. I need every pixel colour to belong to 1 of the cones, and not to be slightly diff shades. Thanks in advance for your help, Rakesh

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Rakesh1987
I believe its some sort of auto anti aliasing which I don't want.
I need every pixel colour to belong to 1 of the cones, and not to be slightly diff shades.


I assume you're not specifying a number of samples when creating the gl canvas - have you checked your computer's control panel to make sure you've not got antialiasing forced on in the driver?

Share this post


Link to post
Share on other sites
Quote:
Original post by OrangyTang
Quote:
Original post by Rakesh1987
I believe its some sort of auto anti aliasing which I don't want.
I need every pixel colour to belong to 1 of the cones, and not to be slightly diff shades.


I assume you're not specifying a number of samples when creating the gl canvas - have you checked your computer's control panel to make sure you've not got antialiasing forced on in the driver?



Thanks a lot for that.

I changed the driver settings to turn off antialiasing and worked fine.

Thanks again :D

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!