What to use? Tao, SharpGL, OpenTK, DirectX P / Invoke, XNA, MDX, SlimDX, Windows API Codec Pack

That day was easy; You created your own 3D material, then DirectX appeared, and then OpenGL appeared. For .Net, the MDX developers were pleased. Then XNA took over MDX, but this is not the same. XNA seems to be very game oriented with the entire content pipeline and preloading fixed models, etc.

So where are we standing now? A couple of days after a second search / trial error, I feel that wherever I look, I find half of the developed libraries, overhead libraries, serious limitations, or libraries that are too complex.

I want to make “free” 3D materials. For example, displaying 200k dots on the screen in 3D and move them at a speed of 30 frames per second (Kinect depth image). I want to create 3D screensavers, plugins for sound analysis, etc. All of them are not prefabricated for the content pipeline and require high performance. And (ehm) I want to do this from .Net.

Does anyone have experience working with libraries that are easy / understandable and still give some freedom and speed?

+57
c # 3d
Feb 03 2018-11-11T00:
source share
4 answers

I seem to have landed on OpenTK . I think it gives more or less direct access to the OpenGL API and does not require dependency loads.

Relatively easy to understand. First, you need a few (and understandable) lines of code. It does not support objects for me, so I can change nothing for each pass, which is fine, because I mainly work with unsafe pointers to memory.

Of course, it is difficult to combine speed and ease of use. Speed ​​requires talking directly to the 3D API, and ease of use requires abstraction. Therefore, it should be considered as a lower level API than some of the others that I have tried. If I wanted to do some prefab character animation then XNA would probably be the best choice, but for my use (described above) this seems very promising so far (4-5 hours of hacking).

Code example:

private void Render() { // Every frame GL.MatrixMode(MatrixMode.Modelview); GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); GL.LoadMatrix(ref cameraMatrix); GL.Begin(BeginMode.Points); // Here I can add lots of points. I add 200k without any big problem. // It seems these points could have been passed in as an array pointer too, // but I'll look at that later. GL.Vertex3(x2, y2, z2); GL.End(); glControl.SwapBuffers(); } 
+13
Feb 04 '11 at 7:27
source share

If you liked MDX, SlimDX should be right up your mall. This is basically a replacement for MDX, but with a lot of dubious design decisions that have been installed, and much more functionality. Everything you had with MDX can be found in SlimDX in one form or another.

+8
04 Feb 2018-11-11T00:
source share

As an alternative, there is another C # shell package for OpenGL: OpenGL DotNet. Works great for me! Check it out at http://www.taylaninan.com/opengl-dotnet.php .

It migrates OpenGL to version 4.4 and supports over 550+ OpenGL extensions. It also supports GLU, GLUT, FreeGLUT, DevIL (image library for developers), ILU and ILUT for DevIL.

This is a low level API for the above libraries.

+3
Mar 31 '14 at 19:21
source share

We encountered a similar problem some time ago, and the following presentation presents our opinion only, of course. One of our main problems was that the library should be universal, create 3D images of very good quality, free of charge and not set loads of additional restrictions for the installer, i.e. With XNA, where you need to have the correct files installed. It seemed like a possible source of headache. In the end, we decided to use DirectX and wrote a graphical interface in C #. All necessary interaction with 3D was done using wndproc. This provided us with both the power of DirectX and the simplicity of developing a graphical interface with C #. We did not regret it at all.

+1
Feb 03 2018-11-11T00:
source share



All Articles