-
-
Notifications
You must be signed in to change notification settings - Fork 301
Samples
SharpGL comes packaged with many sample applications to demonstrate key features or for you to use as starting points for your own development. This page is an index of the Sample Applications. Select any Sample Application to find out what it does, how it does it, and what it teaches you about SharpGL.
Please be aware that even though each sample is written either for WinForms or WPF, the techniques applied are perfectly valid for either.
This sample shows how to use modern OpenGL features and reserved mode rendering. This sample is based on the OpenGL 4.x tutorials on Swiftless.
This sample shows how to use:
- Simple pixel and fragment shaders.
- Vertex Buffers
- Custom matrices using GlmNet.
This sample shows how to use modern OpenGL features and reserved mode rendering to draw a Trefoil Knot, either with simple per-pixel lighting or a Cel Shading effect. The sample is based on the excellent article Antialiased Cel Shading from The Little Grasshopper.
This sample shows how to use:
- Simple pixel and fragment shaders.
- Cel shading
- Anti-aliasing
- Vertex Buffers
- Vertex Buffer Arrays
- Custom matrices using GlmNet.
This basic sample shows how we can quickly create an application that uses SharpGL to render some geometry.
Want to add textures to your models? Here we see how the Scene Graph's Texture object can help us load texture data from image files, which you can then use in your applications.
If you're using the Scene Graph Texture object, there's more you can do with Textures than just load them - in this sample we investigate more advanced functionality.
If you want to really unleash the power of the Scene Graph, you need a Scene. In this sample we create a Scene and show what can be done with it.
SharpGL can handle hit-testing for you - in this sample we find out how.
Particle Systems are a great way to demo functionality - in this sample we create a simple Particle System.
Want to load geometry form *.obj or other files? No problem! In this sample we load some geometry from data files and display it in a Scene.
In this sample we create a cool radial blur effect.
Understanding how Render Contexts work is very useful - in this sample we demonstrate some of the different Render Contexts and look at how they compare to each other.
The WPF samples use the SharpGL, SharpGL.SceneGraph and SharpGL.WPF assemblies to demonstrate various features. They all use either the OpenGLControl or SceneView controls.
The Utah Teapot is a classic for 3D applications - let's show how we can render it in a WPF application!
Shaders are a powerful OpenGL feature, fully supported in SharpGL. In this sample we create, compile and use some simple shaders.
Need to render 2D or 3D text? This sample shows you how you can do that!