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

OpenTK Y is completely inverted

Hello I am using c# and OpenTK. For some reason i have my y completely inverted when using the mouse i need to set y negative to be right, but when i am rendering a map the map is inverted i have been trying to find the problem but i cant find what…
Pedro
  • 55
  • 8
2
votes
1 answer

Sprite Sheet Animation in OpenTK

I have been trying to make my first ever game engine (in OpenTK and Im stuck. I am trying to incoperate animations and I'm trying to use sprite sheets because they would greatly decrease filesize. I know that I need to use a for loop to draw all the…
2
votes
1 answer

OpenGL - Single pass cubemap yields no output

I have written a crude shadow mapping implementation which renders the scene 6 times with 6 different view matrices to create the cubemap. As an optimisation, I am trying to upgrade to the single pass approach using the geometry shader but…
livin_amuk
  • 1,285
  • 12
  • 26
2
votes
1 answer

Why is my texture interpolated after rendering it on a surface with sampler2D

I'm writing a program with OpenTK in C# and I currently tried to get a texture on a group of cubes. My problem is that when i use the given texture with 3 pixels in it and give the bitmap into my shader to a sampler2d it interpolates the colors of…
M. Mettenleiter
  • 105
  • 1
  • 9
2
votes
1 answer

Skinning with Assimp.Net and OpenTK

I'm trying to implement skeletal animation using Assimp.net and OpenTK and have been following this tutorial but I cannot get it to work. The model appears fine with identity matrices but is terribly garbled when using the transforms I generate from…
ArThor
  • 51
  • 5
2
votes
1 answer

Changing Resolution in OpenTK

I've been searching around for this, I've managed to find out out to change the size of our window, and how to change the resolution of the monitor. But I can't seem to find how to tell OpenGL where and how big my viewport is. Example: the game…
Hannesh
  • 7,256
  • 7
  • 46
  • 80
2
votes
1 answer

C# OpenTK - Textured Quad

I've recently downloaded OpenTK. I've created a basic game class and a quad. I've tried rendering a texture in my quad but it doesn't work. Here's my code. This is the loading of the texture. (The texture class contains just an ID and a Bitmap. The…
Alessandro Lioi
  • 63
  • 1
  • 12
2
votes
0 answers

C# / OpenTK, why does my sphere not look smooth?

This should hopefully be a simple question. So I finally figured out how to render stuff in 3D in OpenTK. Great! Only problem is, it doesn't quite look how I expect. I'm drawing a sphere using the Polar method, and drawing using…
applejacks01
  • 249
  • 1
  • 18
2
votes
1 answer

Should I use .NET/Mono/Tao/OpenTK/... something else?

I'm pretty confused by the multitude of frameworks to choose from: I would like to be cross platform, possible even try to make an application for my mobile phone. Probably a game, but could be something else. Can I use something else apart from…
Blub
  • 13,014
  • 18
  • 75
  • 102
2
votes
1 answer

Texture in OpenGL show as single color

I'm fiddling with OpenGL with the help of OpenTK but I can't display a simple texture. My main problem is that my rectangle don't display the texture but rather a color from it. Here is my display loop : // render…
Remy Grandin
  • 1,638
  • 1
  • 14
  • 34
2
votes
1 answer

How to avoid running out of memory with dynamic text in openTK

I've been trying to draw a timer on the screen in openTK (in c#), and to do this I have been generating new textures and deleting old ones, but my program still hogs up memory until it crashes because there's not enough space for another…
maboesanman
  • 387
  • 4
  • 15
2
votes
3 answers

Can I use both deprecated OpenGL and modern OpenGL in a single rendering window?

I am developing a project using modern OpenGL through OpenTK. I want to use Gwen dot net GUI library in my project. Unfortunately, Gwen dot net uses old OpenGL for its widget rendering. I have tried merging both modern OpenGL and Gwen dot net and so…
Syaiful Nizam Yahya
  • 4,196
  • 11
  • 51
  • 71
2
votes
0 answers

C# 2D to 3D coordinates OpenGL

I am trying to write an algorithm to convert my mouse click to 3D coordinates (to insert an object at this point). I have "ground" level where Y = 0 and I want to calculate X and Z based on my mouse click. My function currently looks like…
pzaj
  • 1,062
  • 1
  • 17
  • 37
2
votes
1 answer

Bitmap Padding Bytes in OpenGL PixelBufferObject

I have a Bitmap of size 3750x1407, it is loaded as Bitmap into memory with a padding of 2 bytes, so it is of length (3752*1407) bytes in memory. When using PixelUnpackBuffer to fill my textures, do I need to copy the padding bytes as well or can I…
Dinesh
  • 115
  • 2
  • 7
2
votes
0 answers

OpenTK - VertexBufferObject doesn't draw anything

I'm trying to learn how to draw with VBOs in C# OpenTK - following examples like http://www.opentk.com/node/2292 and VBOs Using Interleaved Vertices in C#. I'm pretty sure I want the interleaved single array method like this, with a neat struct for…
Mr Pie
  • 327
  • 2
  • 11