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
2 answers

OpenTK ES 1.1 texture rendering

I have a method that I use to render little map using tiles, but when I finish rendering and I want to make a translation changing "transY" variable using different method nothing happens, so I must call RenderTesture() again to make it. How can I…
Bube
  • 31
  • 5
0
votes
1 answer

Pass colors and positions to shader from separate VBO

I am trying to draw VAO from separate VBO. My goal is to get different colors for each vertex of my geometry. But with my code it still all red. I think my error is this code fragment. Please, help me to find it. (I have skipped program and…
frankie
  • 728
  • 1
  • 10
  • 28
0
votes
1 answer

Weird OpenGL cube

I just tried to use VBOs. So I render a cube, and here's what's appening. If I don't rotate it, everything is OK : But when I rotate it, this thing appens : It looks like the cube is translucid and... I don't really know, it's messing with my…
Phito
  • 281
  • 1
  • 2
  • 12
0
votes
0 answers

openTK transparent texture

I have a problem to make my texture transparent. I'm new to OpentTK so can please someone help me. I'm using ES11. Here is my code where i load texture. GL.BindTexture (All.Texture2D, tex_id); GL.TexParameterx (All.Texture2D,…
Braca
  • 3
  • 4
0
votes
1 answer

opentk pitch rotation deforms the shape

I'm using opentk in c# to render a 3d surface and rotate it. The yaw works fine, but the pitch rotation (tilting the object towards the camera) causes the surface to deform. The image on the left is what I'm rendering which is deformed and the one…
max
  • 9,708
  • 15
  • 89
  • 144
0
votes
1 answer

Open TK translate or change primitives coordinates

I am coding a sidescrolling Jump n' Run game in C# using the Open TK Framework. In order to enable a sidescrolling effect, i would add a fixed value to all X coordinates of my Vector3 which is part of an PrimitiveType.Quad. All my platforms, which I…
user3605638
  • 207
  • 1
  • 5
  • 11
0
votes
0 answers

SimpleOpenGlControl tab switching strange behaviour

I have a strange "flickering" problem with Tao' SimpleOpenGlControl control. I have 3 tab pages of a System.Windows.Forms.TabControl. The first and the second pages are filled with a SimpleOpenGlControl while on the third page there is a…
stenio
  • 297
  • 1
  • 10
0
votes
2 answers

Generic solution for setting uniform parameters in openGL (C#)

I would like to have a generic solution for adding parameters to shaders via openTK. OpenTK offers implementations for different types of parameters (float, int, double...) via SetUniform(). Now in my program I would like to do something like…
pixartist
  • 1,137
  • 2
  • 18
  • 40
0
votes
1 answer

Apply Shader to a surface (texture)

I'm working on a little OpenTK based 2D graphics library and I'm trying to apply a shader to a Surface object: public void ApplyTo(Surface surface) { using (Surface pong = new Surface()) { pong.Create(surface.Width,…
pixartist
  • 1,137
  • 2
  • 18
  • 40
0
votes
1 answer

Acceleration using Game Time

I was wondering if there is any elapsed gametime method that I could add acceleration to a entity. I want to use something like XNA's elapsed gametime code. The amount of seconds that pass by through each frame is all I need to get acceleration…
William Lew
  • 485
  • 6
  • 17
0
votes
1 answer

OpenGL API, how to draw a image as background instead of color

I am coloring my 3D control with background color , instead i want to have a Background image. Is it possible? Below is the code used for background…
Rolwin Crasta
  • 4,219
  • 3
  • 35
  • 45
0
votes
1 answer

Loading a png in opentk does not work as expected

I'm trying to load a PNG with OpenGL (via OpenTK) and the Image is extremely pixelated and has the wrong color. The code: private void Create(SurfaceFormat format) { textureHandle = (uint)GL.GenTexture(); //bind…
pixartist
  • 1,137
  • 2
  • 18
  • 40
0
votes
1 answer

OpenTK C# model wont show through alpha transparency

My model viewer in C# is having issues with textures. if i draw a texture that is transparent, instead of showing the model through the transparent part and just putting a texture over the model, it completely covers the model and makes the model…
user3441843
  • 137
  • 1
  • 7
0
votes
1 answer

Beginner troubles with 2D projection and textures in OpenGL

Lately I have been trying to learn/use OpenGL 3+. I have looked through tutorials and examples but I've run into a wall trying to get textures and 2D projection to work without problems. The goal for now is to have a function which can draw a…
Mervin
  • 1,103
  • 4
  • 18
  • 26
0
votes
1 answer

The renderer is not using the texture in Open TK

Hi I'm trying to use Textures in OpenGL using Open TK. I got a basic example from the official page of OpenTK Framework, but didn't work. I searched here on stackoverflow for some help and changed some parts of the code, but still is not working.…
Jonny Piazzi
  • 3,684
  • 4
  • 34
  • 81