A simple comparison of four kinds of open-source packet SharpGL C # libraries in developing OpenGL program, CsGL, OpenTK, Tao framework: OpenTK study notes

  Recently to develop in C # language environment OpenGL program, refer to the online blog forum http://www.cnblogs.com/hanyonglu/archive/2012/06/12/2546581.html , summarized as follows:

       1. Direct calling OpenGL functions in C # relatively cumbersome, is generally not used directly;

       2. The general method is developed by a third party open source library, such SharpGL, CsGL, OpenTK, Tao frameworks. Tao framework in which the framework has stopped updating and maintenance, and can be OpenTK alternative, not presented here.

       Compare the following about SharpGL, CsGL, OpenTK three development framework:

       1.SharpGL

       SharpGL home page: http://sharpgl.codeplex.com/

 

     Just download the download page SharpGL Visual Studio Extension file, and then click directly to extract the installation will be integrated in Visual Studio 2010 project templates SharpGL, as shown below:

     After a new SharpGL Windows Forms Application project, will automatically create a project, you can directly run, run effect is as follows:

 

     Summary of SharpGL as follows:

    (1) installation deployment convenience, can be very easily integrated into Windows Forms and WPF in to use;

    (2) a memory leak problem, even run a simple program memory is growing, when there would be too much to increase the growth of a certain time, because the routines have such a problem, for our own programming, It should be due consideration;

    (3)目前SharpGL已经支持到OpenGL4.2(http://sharpgl.codeplex.com/discussions/431042),在所有的第三方库中,其支持的OpenGL版本应该是最高的;

    (4)不支持Linux和Mac平台(http://sharpgl.codeplex.com/discussions/356490

 

      2. CsGL

     CsGL的主页:http://csgl.sourceforge.net/

     CsGL也是一个比较方便的库,运行时占用资源较少,响应速度较快。在下载了之后只需要将csgl.dll和csgl.native.dll这两个库拷贝至system32文件夹内即可。但在运行程序时,会报以下错误:

 

     解决的方法是将csgl.native.dll拷贝至程序运行路径下。

     对CsGL的总结如下:

     (1)是一个较为轻量级的库,运行时占用资源少,响应速度快;

     (2)官方已经至少十年没有更新,原因是官方认为CsGL已经足够稳定,能够支持大多数的程序了,不需要继续更新了(Development of CsGL has essentially stopped. CsGL has proven to be stable and good enough for most applications),正因为如此,CsGL支持的OpenGl版   本最低;

     (3)CsGl只支持32位的程序,无法支持64位,网上并没有提供64位的dll,这在很大程度上影响了其使用。

 

     3.OpenTK

  OpenTK home page:  https://opentk.net/  . The original official address http://www.opentk.com/ has failed, inaccessible.

  GitHub Source Address: https://github.com/opentk/opentk

 

     After downloading the installation file OpenTK installed directly OpenTK ready to use.

     Summary of OpenTK as follows:

     (1) easy installation and deployment can be directly referenced in the program;

     (2) to support cross-platform development, especially to support OpenGL ES;

     (3) Support for 64-bit Windows application development;

     (4) on the resource consumption and speed of response although not CsGL, but better than SharpGL;

     (5) support for OpenGL version 3.3 or higher.

Guess you like

Origin www.cnblogs.com/rainbow70626/p/12001304.html