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
0
votes
1 answer

opentk / C# keyboard state

Using OpenTK, I'm having issues with the Keyboard State. I'm trying to use Keyboard.GetState() but it fails. Basically what I'm trying to achieve is a single 'click'. Because the state-check is in UpdateFrames, the checks are milliseconds apart,…
David Torrey
  • 1,335
  • 3
  • 20
  • 43
0
votes
2 answers

GL.Rotate and Matrix4.CreateRotationX different ouputs

I tried to rotate some vertices using different ways of rotation - GL.Rotate, Matrix4.CreateRotationX and Matrix4.RotateX. To my surprise they gave different outputs. Here's the function that creates the three matrices and outputs them to the…
0
votes
1 answer

OpenTok: archiving and archive stream metadata

I've been using OpenTok (http://www.tokbox.com/opentok/api) to record web chats and save them on OpenTok servers everything works fine but now I want to save additional metadata (username, firstname lastname etc.) for each stream when recording…
sultan
  • 5,978
  • 14
  • 59
  • 103
0
votes
1 answer

helping for opengl or opentk in c#

I'm working with OpenGL in c# with OpenTK tools. My problem is :first, We want to draw some shape with lines in glwindows , we start drawing line, with button MouseDown event and finish it with key(e), when we finished drawin lines and in the…
reza gh
  • 41
  • 1
  • 6
0
votes
1 answer

How to render a 3D model/graphic of a building in a ASP.Net MVC webapplication

I am researching the possibility to render a 3D model or graphic from a building described by data in a ASP.Net MVC webapplication (C#). Most posts on forums and on stackoverflow and articles on blogs and websites I find about things related are old…
Daniël Tulp
  • 1,745
  • 2
  • 22
  • 51
-1
votes
1 answer

GTK# & OpenTK libraries

How to join this two things? How to create a widget (or any canvas) to draw in it from another thread?
itun
  • 3,439
  • 12
  • 51
  • 75
-1
votes
0 answers

Is there a way to use GLUtesselator in C# wpf(.Net framework 4.8) OpenTK 3.3.3?

I want to migrate MFC project to C# wpf project. but OpenGL doesn't support on C#. so i used OpenTK. but in openTK, there is no GLU Tesselation Function like gluTessCallback, gluTessBeginPolygon, gluTessBeginCoutour ... etc. i want to know about…
tyjjh
  • 29
  • 1
-1
votes
1 answer

I'm writing an algorithm to determine if someone has been hit by a bullet or not

Bullet I've been thinking about it for a while, but I can't find an answer, so I'm asking a question. I'm making a game with C# opengl(opentk). At first, I tried to search the coordinates of the bullet for each pixel to see if it hit the enemy.…
Neo
  • 27
  • 4
-1
votes
1 answer

Draw wire cube using OpenTK

I am trying to draw a wire cube (edges only) using ElementBufferObject. I have set the coordinates of the eight vertices of the cube and an array of indices. Next, I initialize VAO, VBO and EBO for the future cube. Then I try to draw it, but I don't…
Dezrhog
  • 28
  • 6
-1
votes
2 answers

What is the proper way to upload a uniform array to a shader using OpenTK?

I am trying to render multiple instances of a mesh, each with a different float offset. To do this I am passing a uniform float array to the shader, which will then be indexed with gl_InstanceID. But I am getting an InvalidOperation error and…
-1
votes
1 answer

opengl transparency not working as desired

I want to render a 3D scene whit some transparent objects in it, This is an example of my output (I am using opentk in c#) But the transparency is not working as i desired, I need something like this: Here is my settings in code: // before…
mrbm
  • 1,136
  • 1
  • 12
  • 36
-1
votes
1 answer

Why OpenGL drawing area disappears on its resize?

The problem was in my application and now I found it on same opengl demo from net. My app uses OpenTK and OpenTK.GlControl in C#. Pc: all works fine, Nvidia 1080 ti Laptop: Dell, inspiron 7505, win 10, Nvidia 940m + Intel UHD. When I try to resize…
szamil
  • 684
  • 5
  • 17
-1
votes
1 answer

OpenGL Terrible performance

When I finnaly consider my game engine done, this happens : rx480, i3 7100 rendering 40 * 25 quads with 29 fps. I am using OpenTK and this is my render Engine code: public static void Render(Entity model, int x = 0, int y = 0, int sx = 0, int sy =…
Gizego
  • 17
  • 5
-1
votes
1 answer

Detecting when there is no geometry at a pixel location when reconstructing depth

I'm reconstructing the fragment position from a depth texture to perform lighting calculations efficiently. The problem is that in areas with no geometry (for example the floor, ceiling, and window in the image below) the fragment output colour is…
livin_amuk
  • 1,285
  • 12
  • 26
-1
votes
1 answer

Textures are not being displayed right using OpenGL

So I am trying to display a texture in OpenGl that is beeing roated to the mouse, but i can't get it to running the way I want to. First i tried to display the texture via 2 Triangles that build a Quad. Like this: Matrix4 modelViewMatrix = …
ZulluF
  • 1
  • 5