Skip to content

Avogadro and GLSL

Last night I finally found a little time to look at GLSL shaders and how best to integrate some into Avogadro. I had been meaning to do this for quite some time but there is always so much to do and so little time! First problem I had was actually accessing the functions to use GLSL shaders. In the end I found a great little library called GLEW that lets me test for OpenGL 2.0 and then ensures all the functions are available.

Avogadro rendered atoms without any special shadersAvogadro rendered atoms with an OpenGL 2.0 phong shader

Both of the images were rendered using medium quality. The one on the left is not using any GLSL shaders and the one on the right is using a phong style GLSL shader. I am not sure it is very optimised, and right now the code needs cleaning up a little before I can commit it. I think it is another great option to use on higher end systems while maintaining compatibility with older systems.

Hopefully I will have more time to play with shaders soon. I wrote a flattening shader that looks pretty cool too. I think that shaders introduce a level of flexibility to our rendering pipeline but I have so much to learn. Being able to effectively ray trace on the GPU is great!

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

Benoit Jacob on :

Benoit JacobThanks for reminding me why I love you

Donnie Berkholz on :

Donnie BerkholzI just had ssuominen bump glew to 1.5.1, which handles OpenGL 3.0 too.

Marcus D. Hanwell on :

Marcus D. HanwellI saw the updated version. To be honest I am not sure I have anything that claims to support OpenGL 3.0. Glew certainly makes handliing OpenGL and its extensions a lot simpler. Some of the new effects I have been playing with are very effective.

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA 1CAPTCHA 2CAPTCHA 3CAPTCHA 4CAPTCHA 5


You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.