CSharpGL

Welcome to CSharpGL

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:

Modern Rendering

Object-Oriented modern rendering using GLSL shaders and vertex buffer objects.

GLCanvas

A winform control that supports drag-drop and wraps initialization of creating OpenGL context.

Uniform Variables

structs support setting values for uniform variables in GLSL shader.

♋GLSwitch

Wraps OpenGL commands like

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_DST_ALPHA);
...
glDisable(GL_BLEND);

or
glLineWidth(2.0f);

Color-Coded Picking

PickableRenderer supports picking primitives in multiple vertex buffer objects using Mouse.
CSharpGL_第1张图片

➰GLControl & Text

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.

Some Cool Demos

Image Processing Using Compute Shader.

Raycast Volume Rendering.

Particle Simulator Using Compute Shader.

Order-Dependent Transparency VS Order-Independent Transparency.

Point Sprite.

10000 particles with a sphere insied a cube.

Earth.

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

Billboard can be used to display health-bar, damage numbers in game application.

Scene Editor

Useful tool to build a scene and feels how opengl's transform system works.

❓Support or Contact

Check my blog here if you are familiar with Chinese.

你可能感兴趣的:(CSharpGL)