This project is read-only.

Shader Support

Mar 23, 2012 at 9:58 PM
Edited Mar 23, 2012 at 10:56 PM

David, what a fantastice thing SharpGL is! Thank you!

  1. What is the current functionality of the glsl shaders? I can't seem to get the simple shader sample working, but no errors are thrown.
  2. Also, what of SharpGl will run in the gpu hardware?
  3. Claims on the web are the sharpgl is a memory hog... true? fixed in 2.0?
  4. Why not OpenTK?

Thanks, Dave and Community!

Mar 26, 2012 at 11:27 AM

Hi hcavra,

Thank you very much for your kind comments! Here's the lowdown on your questions:

  1. GLSL shaders - all the functions for the them are there if you want to use them 'raw' - there's also some basic helper classes if you want to use those to speed up dev/test.
  2. None of SharpGL runs on the GPU - however all the heavy work is done by OpenGL, so if you have a graphics card then the vast majority of work is done on the GPU. The only time stuff runs on the CPU is if you don't have OGL drivers for a graphics card, it reverts back to Windows' software implementation.
  3. SharpGL did have some memory problems up to v 2.0, these are all resolved now and it quite frankly screams along with no problems :)
  4. OpenTK is a good choice if you are going to use OpenAL audio, as you have it all in a single library. SharpGL gives you much more help with the things like polygon loading, picking, true WPF support, bitmap/texture management etc.

If shaders are not working for you - check the OpenGL driver you're using. If it's the Windows one (which is OpenGL 1.1) it won't handle it - make sure you're graphics card drivers are up to date and use a hardware accelerated render context provider, such as an FBO Render Context Provider.

If there's anything else I can help with, please do let me know!

Apr 4, 2012 at 3:04 PM

thanks, David! my gpu is an nvidia quadro fx 3800M (full spec here http://gpuz.techpowerup.com/12/04/04/8f.png), and I can see the shader extensions are all what they should be. I've loaded your simple shader sample in the source solution, set the frag color to red on the shader and still see gray on the teapot thank you for your help in advance!