Jump to content

View more

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Jagged Edges with Anti-Aliasing LWJGL

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 minibutmany   Members   

1998
Like
0Likes
Like

Posted 17 June 2014 - 01:58 PM

I am using 

Display.create(new PixelFormat(0, 8, 0, 2));

to create anti-aliasing in my LWJGL project, and it is having an strange effect:

With PixelFormat:

Screenshot 2014-06-17 15.50.49.png

Without PixelFormat:

Screenshot 2014-06-17 15.51.15.png

 

Here is what I am using to init openGL:

 

glMatrixMode(GL_PROJECTION);

glLoadIdentity();
gluPerspective(90f, (float)width / (float)height, 0.001f, 70f);
glMatrixMode(GL_MODELVIEW);
glEnable(GL_DEPTH_TEST);
 
The cubes are rendered with the solid cube slightly smaller than a wireframe cube.

Stay gold, Pony Boy.

#2 TheChubu   Members   

9323
Like
2Likes
Like

Posted 18 June 2014 - 02:45 AM

new PixelFormat(0, 8, 0, 2)
*checks javadocs*

 

So you're trying to create a context with 0 bits for alpha, 8 bits for depth, 0 bits for stencil and 2 samples? 8 bits for depth is awfully low. Try with 24 bit for depth, 8 bit for stencil. Which is the standard setup.

gluPerspective(90f, (float)width / (float)height, 0.001f, 70f);
Your near plane is awfully small too. Try something higher, 0.5 or 1.0.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

 

My journals: dustArtemis ECS framework and Making a Terrain Generator


#3 minibutmany   Members   

1998
Like
1Likes
Like

Posted 18 June 2014 - 10:15 AM

Thank you very much!

All hail the chubu!


Stay gold, Pony Boy.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.