Sign in to follow this  
Rakesh1987

Jogl - glut primitives - individual pixel colours

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this