CSHARPGL (17) Refactoring CSHARPGL
CSHARPGL use up I feel the tedious, this is the time to refactor.
Download
CSHARPGL has open source on GitHub and welcomes students interested in OpenGL to join (Https://github.com/bitzhuwei/CSharpGL)
Core N Oneness
To understand the decoupling, I split the CSHARPGL core into 5 DLLs. And find that this only brings trouble. The use of the time to refer to multiple DLLs, the development of the time there is no benefit. So all n one, become a CSharpGL.dll.
The current version content is as shown.
Demo:glcanvas
This demo randomly replaces a background color every second. Demonstrates how to use GLCanvas (Drag-drop) to clearly demonstrate GLCanvas's most basic rendering capabilities.
Demo: Beidou Seven Stars
This demo demonstrates how to use CSHARPGL for modern rendering.
The vertex position of the Beidou seven-stars model is as follows:
1[0] {-2.5000, +1.0000, +0.0000}2[1] {-1.5000, +1.0000, +0.0000}3[2] {-0.5000, +0.5000, +0.0000}4[3] {+0.5000, +0.2500, +0.0000}5[4] {+1.0000, -1.0000, +0.0000}6[5] {+2.0000, -1.0000, +0.0000}7[6] {+2.5000, +0.0000, +0.0000}
The vertex color of the Beidou seven-stars model is gradually over-colored from red to purple.
Rotate, scale
The ability to rotate and scale models is achieved through camera and satelliterotator.
Pickup
The mouse moves to the Beidou seven-Stars model and displays the elements picked up on the Bulletinboard window.
Glswitch
Sometimes you need to use Gl.linewidth (); Set the line width; sometimes you need to use Gl.pointsize (); Set the size of the point. CSHARPGL provides Glswitch objects, which can be dynamically deleted for each Irenderable object.
Beidou seven-Stars demo, you can dynamically delete Glswitch in the PropertyGrid window.
Uniformvariables
CSHARPGL provides a visual editing method similar to Glswitch to dynamically delete and change the uniform variables in shader.
DrawMode
You can also modify the rendering mode dynamically.
Other types are not mapped.
In addition, under different drawmode, the entities that are picked up are different.
Summarize
Other features of the original CSHARPGL (UI, 3DS parser, ttf2bmp, CSSL, etc.), I will step into the new CSHARPGL.
Welcome to OpenGL interested students (Https://github.com/bitzhuwei/CSharpGL)
CSHARPGL (17) Refactoring CSHARPGL