WPF 3D Or SharpGL??

Sep 27, 2012 at 12:09 PM

What is the difference between  WPF 3d And SharpGL???

which one is easier and better? 

Coordinator
Sep 27, 2012 at 1:15 PM

WPF 3D is native WPF code that uses Direct3D to render geometry to the screen. It is designed to be easy to use, fast and functional. SharpGL is a wrapper around the popular OpenGL library. OpenGL is a cross-platform library that provides low-level functionality to render geometry, with a large number of extensions provided by the developers and graphics cards manufacturers.

When making a decision between the two, here's what you should know:

WPF 3D

If you're just targeting WPF it is a good choice. It will give you what you need for most scenarios. It's easy to use. It may change and evolve structurally over time however, and the long-term plans for WPF from Microsoft aren't 100% clear.

SharpGL

If you're porting existing OpenGL this is a sensible choice. If you need to run the same code in WinForms or WPF then it will support both. If you need access to advanced functionality like the latest pixel shader extensions, they're available. There's not a lot of information on SharpGL available on forums etc, but there is a HUGE amount on OpenGL, which is very easily ported.

Basically the decision comes down to what your target user is going to need and the API you prefer. OpenGL uses a state machine API and is quite different from DirectX (which WPF 3D is wrapped around). 

Hopefully this clears up some of the confusion, easier and better is a tough one to call - I personally find SharpGL easier because I know OpenGL and wrote SharpGL. DirectX coders will be more happy with WPF 3D (or just DirectX). Better is also tricky - SharpGL is a protected developed actively by two guys, WPF 3D is supported by many more.

If you give some details of what you're trying to achieve it'll be easier to help make the decision. I've got no qualms about recommending other systems over SharpGL if they're better at getting the job done :)

Sep 27, 2012 at 2:20 PM

Thank you very much ......

Actually I am student and I dont have much experience basiclly I have done some work in C# &WPF 

but what I am up to do now is  a simple simulation to the solar system (project for the collge)

I am wating for your advice......

 

and by the way I ask about a problem that i have (

I can't use the  OpenGLControl , it throws an exception right in the designer and writes out "Object reference not set to an instance of an object. Stack trace: at SharpGL.OpenGLControl.OnPaint(PaintEventArgs e)". I tried all this with the SharpGL 2.0 Beta 1.

what can I do?)

if you could help me I would be thankfull....

forgive my poor english  I am working on it