CSHARPGL (17) Refactoring CSHARPGL

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.