Sample Applications

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.

WinForms Samples

The WinForms samples use the SharpGL, SharpGL.SceneGraph and SharpGL.WinForms assemblies to demonstrate various features. They all use either the OpenGLControl or SceneControl.

Simple Drawing Sample

This basic sample shows how we can quickly create an application that uses SharpGL to render some geometry.

Native Textures Sample

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.

SharpGL Textures Sample

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.

Scene Sample

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.

Hit Test Sample

SharpGL can handle hit-testing for you - in this sample we find out how.

Particle System Sample

Particle Systems are a great way to demo functionality - in this sample we create a simple Particle System.

Polygon Loading Sample

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.

Radial Blur Sample

In this sample we create a cool radial blur effect.

Render Contexts Sample

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.

WPF Samples

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.

Teapot Sample

The Utah Teapot is a classic for 3D applications - let's show how we can render it in a WPF application!

Simple Shader Sample

Shaders are a powerful OpenGL feature, fully supported in SharpGL. In this sample we create, compile and use some simple shaders.

Text Rendering Sample

Need to render 2D or 3D text? This sample shows you how you can do that!

Last edited Feb 24, 2012 at 11:48 AM by dwmkerr, version 5

Comments

TimJSwan Nov 10, 2014 at 10:39 PM 
Is there someone I can call to get some immediate help on this? I am trying to get some simple modern SharpGL working and I downloaded the example and all. Thanks.

joeegar Sep 17, 2014 at 12:33 AM 
NVM... found them. For anyone else looking & not finding: the samples' source code is included with the full source code on the GitHub site (download as Zip then under /source/sharpgl/..). Probably would have made sense to provide the source code for the examples & tools separately... but maybe that's just me.

joeegar Sep 16, 2014 at 6:49 PM 
Source code would be very helpful. Without, the Samples are really just Teasers...
Does anyone have access to them, know where they are?
I'm stuck on implementing a vertex buffer and see it implemented in the samples but don't know how to reproduce...

Cheers

Graham33 Jun 26, 2014 at 11:28 PM 
Where on earth can I get source-code for the samples ?
Is it some sort of secret ?

ftlPhysicsGuy Jun 6, 2012 at 12:33 AM 
One of the WPF samples is called TwoDSample, but I believe there's some sort of error in it. I posted a question in the Discussions about this, but basically while the code continually creates 10,000 random points in x, y, z and uses an ortho projection to display them, apparently only points at the z = -zNear term (from the ortho) are actually showing up. Can you confirm this? Am I missing something about how the sample works?