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:

972 questions
4
votes
1 answer

Can't identify error in my matrix calculation?

So, I tried to use matrices in OpenTK, my "Transform" class has a Rotation (a quaternion) and a Vector3 for the position. It offers the folling fields: public virtual Vector3 Right { get { return…
pixartist
  • 1,137
  • 2
  • 18
  • 40
4
votes
1 answer

OpenGL: how to unbind and delete buffers properly

Im learning opengl and wrote a simple program that uses buffer object(colors,positions, normals, element indices) to draw a shape like below. Even with the deleting and unbinding, GPU monitor program shows increasing memory usage after each button…
huseyin tugrul buyukisik
  • 11,469
  • 4
  • 45
  • 97
4
votes
1 answer

Sprite/Texture Atlas: GDI+ Bitmap.MakeTransparent for color-key with OpenTK

I am writing a support class for sprite/texture atlas functionality, using C# with OpenTK. Most functionality is working fine thus far (simple 2D tiles on an orthographic view). My problem relates to unexpected display results when calling the GDI+…
Sam Glasby
  • 43
  • 4
3
votes
2 answers

OpenTK - How to rotate object by given angle

I was using tutorial on http://viewport3d.com/trackball.htm to program trackball. I have axis and angle computed but because I am just beginner to OpenTK and OpenGL, I don't know how to apply rotation to object. Any help please? code consist of…
ousko
  • 41
  • 1
  • 5
3
votes
1 answer

Applying modeling matrix to view matrix = failure

I've got a problem with moving and rotating objects in OpenGL. I'm using C# and OpenTK (Mono), but I guess the problem is with me not understanding the OpenGL part, so you might be able to help me even if you don't know anything about C# /…
TomsonTom
  • 742
  • 7
  • 22
3
votes
1 answer

How do I create an OpenGL GrContext for SkiaSharp?

I'm trying to render a SkiaSharp element in my WPF application using an OpenGL backend in the hopes of making it faster. I found this documentation explaining how to work with the resulting surface created, but it has this extremely unhelpful…
Inglonias
  • 468
  • 1
  • 5
  • 18
3
votes
1 answer

OpenGL - Using Bindless Textures on sampler2D disables TextureCubeMapSeamless

I am using Cubemaps in my renderer and have TextureCubeMapSeamless enabled to filter between the 6 images. Works fine. Currently I am experimenting with ARB_bindless_texture on sampler2D. My problem is that as soon as I make use of this extension,…
BoyBaykiller
  • 109
  • 1
  • 7
3
votes
1 answer

How to set OpenGL API version in OpenTK .NET Core?

How to set OpenGl version in OpenTk 4.6.4 using .NET Core 5.0 using NativeWindowSettings class? and how to implement it correctly in this code var nativeWindowSettings = new NativeWindowSettings { Size = new Vector2i(width,…
3
votes
1 answer

Save to Wav file the audio recorded with .NetCore C# on Raspberry pi

I am finding very difficult to find a way to store the audio captured using OpenTk.NetStandard into a proper .WAV file in NetCore C#. What I am looking for is a solution which will work when running on a Raspberry pi, so NAudio or any Windows…
bre_dev
  • 562
  • 3
  • 21
3
votes
1 answer

OpenTK texture works only if its not bound

I don't usually work with low level binds so this might be something silly that I'm overlooking, but I wouldn't know. When I create a texture from a file like this public Texture ( List pixels, int width, int height ) { handle =…
Peri
  • 574
  • 1
  • 3
  • 19
3
votes
1 answer

How do I draw a triangle using OpenTK?

I'm not sure why this code isn't simply drawing a triangle to screen (orthographically). I'm using OpenTK 1.1 which is the same thing as OpenGL 1.1. List simpleVertices = new List(); simpleVertices.Add(new…
meds
  • 21,699
  • 37
  • 163
  • 314
3
votes
2 answers

Showing OpenTk.GLControl in winforms

I've been experimenting with showing OpenGl graphics in C# winforms, and I stumbled upon a very useful NuGet package called OpenTK. I followed the introductory tutorial on OpenTK's Learn tab, and was able to render some simple shapes. The tutorial…
InigoMontoyaJr
  • 159
  • 4
  • 11
3
votes
1 answer

How to pass attributes directly to the fragment shader in OpenGL?

I'm using OpenTK for C#. I'm kinda new to graphics programming. Is there a way to pass an attribute directly to the fragment shader and skip the vertex shader? It'd be useful when working with uvs. I want to pass the uv to the fragment shader…
gutyina70
  • 33
  • 4
3
votes
2 answers

i'm trying to implement index buffer object in opentk but don't know how to actually use it when drawing things

I'm trying to use an index buffer but have no idea how I really am stuck in a wall as to what I'm supposed to even try so. none of the tutorials really show anything similar to my code which is mostly why I'm having problems. I might have to rewrite…
jklw10
  • 117
  • 7
3
votes
1 answer

Change the intensity of an image by comparing intensity of another image - OpenTK

I have two images. I have to found the points of first image which have intensity greater than 0.8. At the same time I have to found the intensity of second image on same points and need to adjust the light on second image on same points with a…
H.NS
  • 75
  • 7