We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Custom anti-alias, bitdepth etc.
Page Index Toggle Pages: 1
Custom anti-alias, bitdepth etc. (Read 902 times)
Custom anti-alias, bitdepth etc.
Nov 30th, 2005, 5:56am
 
Hey,

I'd like to tweak obscure openGL parameters as referenced to in the FAQ. Smiley

What I want to do is to edit the accelerated anti-aliasing and bitdepths settings per sketch in Processing without having to do it manually in the graphics card settings. Can this be done?

From what I've learned by browsing this is done in openGL per object drawn on screen, not for the entire scene (as the hardware driver settings suggest). Is this correct? Can this be controlled from within Processing or is it one of those things not supported?

Re: Custom anti-alias, bitdepth etc.
Reply #1 - Dec 1st, 2005, 2:51pm
 
I think to do custom AA and the like, you have to set some options before creating the GL canvas, and since processing does all this for you when you call size( , ,OPENGL); I don't think you'll be able to do so, without getting the processing source and patching it yourself.
Re: Custom anti-alias, bitdepth etc.
Reply #2 - Dec 1st, 2005, 3:33pm
 
i think you just need to track down the opengl options you want to use and give them a shot. from there we can figure out if you actually have to patch anything or if they'll just work.

lots of the card-specific options are only editable via their display properties dialog boxes, not necessarily from gl itself. so in fact you may be out of luck on lots of things.
Re: Custom anti-alias, bitdepth etc.
Reply #3 - Dec 1st, 2005, 4:01pm
 
I had a bit of a search around on javagaming.org and some OpenGL sites about this and similar things, and as far as I can tell, you need to add a few options into the GLCapabilities object you pass into GLDrawableFactory.getFactory().createGLCanvas

I think the options that need enabling are:

 capabilities.setSampleBuffers(true);
 capabilities.setNumSamples(2); //number of AA samples

Then to activate you use gl.glEnable(GL.GL_MULTISAMPLE_ARB);

But you need to check out the hardware features, to see if it supports multisample before enabling them, or it'll fail when creating the canvas I think.

Edit: Oh, and I saw some mentions of pixelFormat too, but that looked windows specific I think.
Page Index Toggle Pages: 1