CSharpGL is a pure C# project that allows for modern OpenGL rendering in an Object-Oriented way. It meets common requirements in OpenGL rendering such as:
Object-Oriented modern rendering using GLSL shaders and vertex buffer objects.
A winform control that supports drag-drop and wraps initialization of creating OpenGL context.
structs support setting values for uniform variables in GLSL shader.
Wraps OpenGL commands like
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_DST_ALPHA);
...
glDisable(GL_BLEND);
or
glLineWidth(2.0f);
PickableRenderer supports picking primitives in multiple vertex buffer objects using Mouse.
Rendering 'Control' at fixed position with fixed size. For example, GLAxis renders an axis at left bottom corner.
'Control' binding to specified border just like winform-control.
Rendering text using glRasterPos()
and CallList()
.
Rendering text using GLText(a special GLControl).
Load True Type Font File(.ttf or .otf) to build a texture filled with glyphs, which then could be used to render text.
The project CSharpGL.Font2Picture in Infrastructure
is a quick tool converting TTF files to pictures along with a xml config file.
10000 particles with a sphere insied a cube.
An earth model that singly rotate same as real earth. It's composed of 65341 positions, normals and uvs and 130140 indexes and a 10800x5400 texture.
Billboard can be used to display health-bar, damage numbers in game application.
Useful tool to build a scene and feels how opengl's transform system works.
Check my blog here if you are familiar with Chinese.