Forseti9's picture

Few general questions


I am developing a collection of brain training application most of which can be completely made in standard WinForms or WPF, but there are few activities that will require more advanced graphics capabilities (Rubick's cube variant emulation), and WPF would be too clumsy solution for that.

After some research, i have decided that i'll use OpenTK for the graphic part of my application (i'm still not sure whether to integrate the OpenGL window inside the standard Form or to make my own GUI; i would prefer the first option, but i'm still not sure what will i do here).

Can someone tell me what would be the limits of OpenTK, ie. how complex scenes could it render, and yet maintain 30-40 fps at some average PC, what is the shader model support and complexity, what are the cons of OpenTK, what are the alternatives, and how do they compare?

Also, can you just tell me the names of some bigger projects that are using OpenTK? You just tell me some of the suspects, and i will google them to find out more about them and their implementation and integration of OpenTK into their applications.

I would just like to know more about OpenTK before i invest too much of my time into this.

I hope that i'm not too much pain in the ass with all these questions; i have tried to find as much info as i could, but these are some questions for which i need some more personalized answers.

Thanks for any help.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

[OpenTK capabilities]
OpenTK only provides bindings to OpenGL and doesn't impose any limits to the size and complexity of your scenes. The only limits are a) the hardware of the target PC and b) the capabilities of your renderer.

Now, the hardware of an average PC varies wildly in performance and features:

  • Intel GPUs are the worst of the bunch, lacking both in features and performance. If you wish to support those, you will either have to avoid important OpenGL features completely (FBOs, shaders) or code separate rendering paths.
  • Nvidia and Ati GPUs sold in the last 7-8 years are capable of OpenGL 2.1 (including shaders). Those sold during the last 2-3 years also support OpenGL 3.0+. Newer GPUs are generally faster and more flexible: R300/NV30 support shaders. R500/NV40 add dynamic branching and floating point textures. R600/NV50 add geometry shaders, transform feedback and filtered fp-textures.

In general, the older the hardware you wish to support, the more limited you are from a visual quality standpoint. It all boils down to a classic dilemma (trilemma): support for old hardware, visual effects, implementation cost - pick any two. What is your target audience?

As far as I am aware, OpenTK is the only library that a) is cross-platform and b) supports all OpenGL versions (1.0-3.1). The closest alternative is the Tao Framework which offers inferior OpenGL bindings and WinForms support.

Advantages of OpenTK (personal opinion):

  • cross-platform support for Windows.Forms
  • clean bindings to OpenGL
  • active development
  • upcoming OpenGL ES support (people from Novell have expressed interest in Android and iPhone ports)
  • upcoming OpenCL support

The last two points may or may not be of interest, but additional flexibility never hurts.


  • Relatively weak math library (parts are being rewritten to match the XNA API and improve speed)
  • There will be breaking changes between the current release and OpenTK 1.0. Most of those will affect parts of the library you are (probably) not interested in, however a few will affect the math library. Mitigating factors: upgrade paths are usually available; you are not forced to upgrade from the 0.9.8 release (important bugfixes will be backported).

Of course, these are personal opinions. Other people may like/dislike different parts of the library.

If you don't care for cross-platform support, you can also use SlimDX (DirectX 9, 10, 10.1) or XNA. That latter is higher-level, hence easier to use than either SlimDX or OpenTK, but I don't know if it can be used inside Windows.Forms applications.

Your final choice is to use a full-fledged graphics engine instead of plain bindings: Irrlicht3d and Axiom are two engines usable by .Net applications. Using a graphics engine is generally easier than plain OpenGL or DirectX, however I do not know if either engine supports Windows.Forms directly.

[Applications using OpenTK]
I am sorry, but I cannot help you here, as the only list of applications is woefully incomplete. Several posts in the forums indicate commercial use, but the names of the applications are sadly not disclosed.

Personally, I have used OpenTK successfully in my thesis project, which involved building a platform for brain-computer interfaces. The frontend is using OpenTK to drive a virtual environment and can scale all the way from laptop IGPs to one wall CAVEs with stereoscopic rendering. With the exception of the GLControl (WinForms integration), this project used the whole breadth of OpenTK APIs with no serious issues. The aforementioned disadvantages (and the focus of the current work on OpenTK) is mainly based on observations from this project.

objarni's picture


I use the GLControl on a WinForm app professionally, in a CAD/CAM program. The OpenGL1.3 API seems to work just fine to me, aswell as the WinForm integration.

This thread contains some screenshots from that app' (look for my user name, attached files).

Forseti9's picture

Objarni, i'm glad to see someone using OpenTK for such a complex project, if you're going to make a professional full-fledged CAD program. I hope that OpenTK is good enough for a large CAD/CAM solution.

TheFiddler, that answered most of my questions. Thank you.
Brain-computer interfacing... that's one very interesting subject.

I was thinking about using XNA some time ago, but i can't recall why did i eliminate XNA as an option... i think it had something to do with it's license, but i really can't recall why did i abandon that option. XNA would maybe be a perfect option for my project (it's windows only). SlimDX sounds interesting, but i have heard that it's far from complete, and can't be used in a professional application without heavy modifications and additions.

objarni's picture


No it is not for the whole CAD system, only a special visualization function. (I'm not saying a full CAD is impossible with OpenTK just clarifying what my project was about)

Forseti9's picture

I was referring to the drawing space, modeling and rendering; i'm sure that GUI was done with WinForms or WPF.

objarni's picture

Yes it is a WinForms window, integrated into a bigger C++ CAD/CAM system called IGEMS (which is the main product of the company where I am employed). Sorry for the marketing Fiddler but Forseti9 seems to want to know this. Feel free to erase this post if you think it is inappropriate.

martinsm's picture

SlimDX sounds interesting, but i have heard that it's far from complete, and can't be used in a professional application without heavy modifications and additions.
SlimDX is very complete (not 100%), but I doubt you will find any major feature missing. And if you are missing something, developers usuallly respond and implement missing features pretty fast.
And yes, you can use SlimDX on Windows.Forms. Actually all samples that comes with SlimDX usees Windows.Forms.

Forseti9's picture

Thanks for answering my questions, Fiddler, Objarni & Martinsm. I think I'll reconsider XNA, as it is a perfect choice for my project, and, judging by the number of noobs who manage to make their interactive D3D application in no time, i will have working prototypes very soon.

OpenTK will still be my first option if I ever abandon XNA. Community may not be very big here, new topics are rare, but I'm glad there are members who still frequent these forums and are willing to help other people who are using or considering using OpenTK.

Inertia's picture

The reason why I had abandoned XNA was that it required both the .Net Framework and the XNA Framework installed in order to run applications. Although people had appropriate DirectX drivers, some of my testers had issues with the frameworks and the game would crash badly. Others would simply refuse to install the beta XNA Framework, knowing that "beta" (translated from "Microsoft language" to real language) means "alpha". Mind this was XNA 1.0, maybe the situation has changed nowadays. Just a friendly warning, because according to your description of the 3D capabilities you need, you would probably be better off with OpenGL (it would even run with unextended OpenGL 1.2, without any hardware accelerator present).

Forseti9's picture

Inertia, sorry for the late reply; I thought I would get a email notification if someone replies. My current project doesn't require advanced graphics or graphical effects; it requires something just a little bit more graphics oriented/optimized than WPF. However, I have already started learning XNA, and I find it really interesting and I will certainly use it for some of my future projects and maybe for this one. I'm still in the planning phase, so I still need to decide what should I use for my graphics engine.

I'm really bad at software architecture, especially when it involves game architecture, like in this project. I'm still not sure how to make all this stuff work; I'll need to have various activities that will be implemented in WinForms or WPF since they require only some standard form elements, then I'll have some activities that require basic 2D & 3D animation, each of these activities will have various levels of details, various kinds of skins for each element, perspectives, modes of playing (this is especially confusing to implement), and each of these along with each of it's suboptions will have an option to be included in a multiple step drill sequence.


I know this may not be the best forum to ask this question in, but can you recommend me some resources (books, training materials, anything that might help me design an optimal architecture for this) related to the above paragraph (one above my 'sigh')? This kind of project is somehow too complex for my current level of experience, but I need it, and I will learn everything needed to successfully finish it. :)