Questions tagged [opentk]

The Open Toolkit is an advanced, low-level C# library that wraps OpenGL, OpenCL and OpenAL. It is suitable for games, scientific applications and any other project that requires 3d graphics, audio or compute functionality.

The opentk toolkit wraps OpenGL, OpenCL, OpenAL to C#. This is done using types aiming to make development less error-prone.

The project ships with additional code for instance to render OpenGL graphics on a System.Windows.Forms.Form dialog or control together with loaders for various format.

The project is licensed under the MIT/X11 license.

References

Tutorials and examples:

910 questions
26
votes
3 answers

Is the Tao framework dead?

I'm looking into experimenting with Tao but I am somewhat put-off by its dead-looking state. It hasn't been updated since 2008 and it looks like their website stopped functioning at roughly the same time. Does anyone have any information on the…
Tom Savage
  • 3,102
  • 3
  • 29
  • 31
22
votes
1 answer

C# performance profiler shows long pause, unable to determine what it is from the data provided

I am getting an unexpected spike in my C# application when rendering frames. I have been going over it in a profiler and I noticed the following: When vsync is on, the program seems to relinquish control to the OS (or does something) when swapping…
Water
  • 2,369
  • 2
  • 20
  • 44
21
votes
3 answers

How to join overlapping circles?

I want to visually join two circles that are overlapping so that becomes I already have methods for partial circles, but now I need to know how large the overlapping angle for earch circle is, and I don't know how to do that. Anyone got an Idea?
Cobra_Fast
  • 14,395
  • 8
  • 51
  • 97
12
votes
2 answers

OpenTK, SharpGL and WPF

I am about to begin a new project. Some decisions are out of my control: Using WPF and OpenGL are some of them. However, I have narrowed down my OpenGL options to two: Either OpenTK or SharpGL. SharpGL has a WPF control, while OpenTK only has a…
Gilad
  • 233
  • 1
  • 3
  • 12
8
votes
1 answer

OpenGL C# (OpenTK) Load and Draw Image functions not working

I'm trying to load and display a texture on the screen, however am receiving a black box where it is meant to be shown. The two main methods are "LoadTexture" and "Draw Image", I'm assuming the mistake is in one of them. using System; using…
Joel
  • 1,465
  • 3
  • 19
  • 29
7
votes
0 answers

OSX Custom Shaped OpenGL / OpenTK View

On OSX have a custom transparent window, with a NSView inside of it that manages OpenGL drawing: public class MyCustomOpenGLView : NSView { NSOpenGLContext openGLContext; // ... } I have set the following (using…
Bob
  • 801
  • 1
  • 15
  • 31
6
votes
1 answer

Why is my PNG texture not coming out with transparency?

The bottom right image should have a transparent background. I load my Notch's PNG via these functions: public void Image2D(Bitmap bmp, int mipmapReductionLevel = 0) { var rect = new Rectangle(0, 0, bmp.Width, bmp.Height); var data =…
mpen
  • 237,624
  • 230
  • 766
  • 1,119
6
votes
1 answer

How do I make a custom vertex format with OpenGL

I am writing my own engine using OpenTK (basically just OpenGL bindings for C#, gl* becomes GL.*) and I'm going to be storing a lot of vertex buffers with several thousand vertices in each. Therefore I need my own, custom vertex format, as a Vec3…
Azzi777
  • 157
  • 2
  • 6
6
votes
6 answers

Runtime code injection using DynamicMethod?

Consider the following trivial code: using System; class Test { delegate int FooDelegate(int i); FooDelegate Foo = FooImplementation; static int FooImplementation(int i) { return i + 1; } public static void…
The Fiddler
  • 2,566
  • 18
  • 23
6
votes
1 answer

Simple OpenTK Shader not working

I'm currently trying to get into GLSL using the OpenGL superbible and http://www.learnopengl.com/. My desired environment is OpenTK. I tried to convert the "Hello Triangle" entry level tutorial from learnopengl.com into OpenTK, it is meant to draw a…
Sors
  • 454
  • 4
  • 12
6
votes
1 answer

Don't serialize properties with no setter

I need to serialize objects (OpenTK.Vector2) containing properties with a getter but no setter. I would like these properties to be ignored in general, otherwise I end up with hugely inflated JSON from an object that has two relevant pieces of data…
Little Endian
  • 726
  • 5
  • 18
6
votes
1 answer

gdiplus.dll not found when using MonoKickstart on OSX

I have been using MonoKickstart to get our project - which is built on OpenTK - running on OSX. I got the program to work entirely, but once I removed my Mono.framework (well, actually renamed) the following error popped up: [ERROR] FATAL UNHANDLED…
Tom
  • 324
  • 3
  • 15
6
votes
1 answer

Setup of matrix for instance shader

I want to draw instanced cubes. I can call GL.DrawArraysInstanced(PrimitiveType.Triangles, 0, 36, 2); successfully. My problem is that all the cubes are drawn at the same position and same rotation. How can i change that individually for every…
fedab
  • 882
  • 9
  • 34
6
votes
1 answer

Open TK difference onRenderFrame and onUpdateFrame?

I am currently programming a Jump n' Run game in C# using OpenTK Framework and OpenGL. Open TK provides preset functions like GameWindow.Run(); or GameWindow.onUpdateFrame(); onRenderFrame(); As far as i thought through it, all actions that draw…
user3605638
  • 137
  • 3
  • 11
6
votes
1 answer

OpenGL - poor performance with high scale values

I'm observing a strange phenomenon with my OpenGL-program which is written in C#/OpenTK/core-profile. When displaying mandelbrot-data from a heightmap with ~1M vertices the performance differs dependant on the scale-value of my view-matrices (it's…
freakinpenguin
  • 801
  • 11
  • 22
1
2 3
60 61