lid6j86's picture


So I know (and have referenced many, many times) there is a Documentation page on OpenTK,

but is there any 'Master Book' that explains every OpenTK function, how to access it, what its options are, and when/how/why to use them? Or am I just stuck with reading OpenGL books and then having to figure out how it translates into OpenTK?

A decent amount of the time the conversion is very intuitive and obvious, but there have been at least an equal number of times that I've felt frustrated and exhausted trying to find the OpenTK equivalent for OpenGL examples in the books that I've been reading.


Comment viewing options

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

It's a great idea, that could be interesting. To make OpenTK accessible (to any programming level) and practical (recipes that simply work, not tons of theory). In the same spirit I find the PHP language documentation very effective, in comparison to MSDN (where you get informed for the command but you shalt not get an example - most of the times). In PHP documentation is community driven and tested on deep waters, so there are some "catches" and "hints" reported by users.

The real deal, is that if this going to work there must be users who want it. How about conduct a survey with wanted features to give feedback to the developers?

Inertia's picture

I'll gladly improve the book, if someone points me at the flaws. But feedback has be scarce and from my experience people only talk about something if they're unhappy with it. So after fixing the issues I left it be and continued working on something else.

Remember though, the book is not about teaching programming itself or C#. It's goal is to introduce someone familiar with .Net to OpenGL/AL using OpenTK (I try to picture someone coming from ASP.Net or SQL background - not necessarily DirectX experienced!)

If you want to teach C# too, that should probably get it's own book (and be completely decoupled from OpenTK and only use console and winforms).

lid6j86's picture

right, the point I suppose isn't really to teach C#, but more about OpenTk as it pertains, and its specific functions. By no means should it be there necessarily to teach someone how to program. I'm thinking of a Big reference book that just goes through the funtions and options, with a short little excerpt of what each option actually means when its used. As an example:

Function: GL.Ortho(double left, double right, double bottom, double top, double znear, double zfar)

Multiplies the current matrix with an orthographic matrix

used to set X Y and Z ranges for clipping (viewing) volume, where anything rendered outside of the volume is not rendered

double left - minimum viewing range, x value
double right - maximum viewing range, x value
double bottom - minimum viewing range, y value
double top - maximum viewing range, y value
double znear - minimum viewing range, z value
double zfar - maximum viewing range, z value

Something like that, and perhaps its OpenGL equivalent (for an easy 1 to 1 reference so that if someone shows me OpenGL, it's extremely easy to convert to OpenTK format). It doesn't go into coding, and is purely descriptive and reference in nature. I used to have a huge book of Windows APIs like this, and it always helped me out so much in figuring out exactly what to use.

Only show minimal amount of theory when necessary (like you said, that, along with its association w/ C# would be a completely separate book). Anyways, thats my thought

Where this would be REALLY useful is functions or arguments that take different types of buffers available within OpenTK, or whatever. For instance, the difference between ClearBuffer.Stencil, ClearBuffer.Depth, and ClearBuffer.Color. Or for instance, all the different TexBuffer, TexCoord, etc... and a short blurb about what each one's function is for.

Then flop, like you said, a short little code experpt of it in action, just a few lines long.

the Fiddler's picture

Do check out the reference pdf that accompanies OpenTK. You can find it in the start menu, if you use the windows installer, or the "Documentation" folder in the zip archive.

It's not perfect, but it lists all OpenTK functions and explains what they do and what their parameters are.