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

bumpmapping OpenTK GLcontrol

I have to make shaders in GLSL, I'm using OpenTK, and I'm writing in C# Windows Forms. And i have some problems with using this shaders in my GLControl this is my vertex shader attribute vec3 tangent; attribute vec3 binormal; varying vec3…
johns
  • 183
  • 1
  • 14
0
votes
1 answer

Index Buffer Object and UV Coordinates don't play nice

This generates the 25 main vertices. For x As Single = -1 To 1 Step 0.5F For y As Single = 1 To -1 Step -0.5F Dim pt1 As New Vector3(x, y, 0) tFloats.Add(pt1) Next Next This is the indices, which…
0
votes
0 answers

how to draw on buffer?

I want to draw a Wireframe of an 3d object, using OpenTK, but i don't want to draw it by opentk method, but by my own I guess i have to do it by drawing on opentk buffor, but don't know how to start. I mean, i have a method to draw, but how to…
johns
  • 183
  • 1
  • 14
0
votes
0 answers

How to use more than 1 texture with a VBO

I currently have an image that is 16384px x 16384px I have broken this into 16 smaller images with the size of 4096px x 4096px and compressed them into DDS. I have a 4x4 grid made up of 32 triangles (16 squares). At the moment I can assign 1 of the…
0
votes
1 answer

Can I make OpenTK and Tao.FreeGlut work together?

I'm trying to init window with Tao.FreeGlut 2.1.0 and drawind with OpenTK 1.1, so I make simple program: public static void Main() { Glut.glutInit(); Glut.glutInitDisplayMode(Glut.GLUT_DOUBLE | Glut.GLUT_RGBA); …
Nyan Cat
  • 303
  • 1
  • 5
  • 14
0
votes
0 answers

Benching Intel 4000, Radeon 7670m and 4850

I am trying to benchmark GPUs. I have a Radeon 7670m (480 x 600 MHz), Intel 4000 (16? x 1100 MHz) and Radeon 4850 (800 x 625 MHz). I throw in a 4096 x 4096 Rg32f-texture and receive a Red-texture. Each pixel takes 400 - 800 ns. The 7670m is around…
0
votes
1 answer

OpenGl BindBuffer to array

I have this code snippet from OpenTK using Open GL, which is used to draw texture on screen and works completely fine; GL.BindBuffer(BufferTarget.PixelUnpackBuffer, glOutputBufferID); GL.BindTexture(TextureTarget.Texture2D,…
user2426290
  • 382
  • 2
  • 14
0
votes
1 answer

Unexpected result when rotating a triangle

//my triangle let vertdata = [| new Vector3(-1.0f, -1.0f,0.0f) new Vector3(1.0f, -1.0f,0.0f) new Vector3(0.0f, 1.0f,0.0f) |] //VertexShader .. uniform mat4 mview; ... gl_Position = mview * vec4(vPosition, 1.0); .. Rendered with…
Maik Klein
  • 15,548
  • 27
  • 101
  • 197
0
votes
1 answer

Detect if a quad is actually visible 2D in OpenGL

I currently have 16 tiles, with individual images that make up 1 big map. I pan by transforming right at the beginning before any actual drawing with this: GL.Translate(G_.Pan(0), G_.Pan(1), 0) Then I zoom by doing this: GL.Ortho(-G_.Size * 1.5 ^…
0
votes
1 answer

Asyncronous loading of GLControl with C#, WinForms and OpenTK

I'm trying to make a cross-platform WinForms software, with a GUI and a 3D window inside of it. Currently, I have a TabControl with two tabs, and the second one needs to contain the GLControl (3D Window). However, when I switch to the second tab,…
0
votes
0 answers

Understanding implementation of glu.PickMatrix()

I am working on an OpenGL project which requires object selection feature. I use OpenTK framework to do this; however OpenTK doesn't support glu.PickMatrix() method to define the picking region. I ended up googling its implementation and here is…
stoney78us
  • 195
  • 2
  • 5
  • 17
0
votes
1 answer

OpenTk texture not display the image

OpenTk texture not display the image It shows only a white triangle, but not with the image i try to load. Here is my code: using System; using System.Collections; using System.Collections.Generic; using System.Drawing; using…
timi_fazekas
  • 1
  • 1
  • 2
0
votes
1 answer

Draw a line in 3d using OpenTK

I have the following code to create a line in 3d. GL.glClear(GL.GL_DEPTH_BUFFER_BIT | GL.GL_COLOR_BUFFER_BIT); GL.glMatrixMode(GL.GL_MODELVIEW); GL.glLoadIdentity(); GL.glBegin(GL.GL_LINES); …
RJ Uy
  • 377
  • 3
  • 10
  • 20
0
votes
1 answer

OpenGL 2d sprite not rendering (OpenTK)

I have been working on a render and it has been working OK for one texture but would not render a second. I seemed to have changed something and it stopped rendering anything but the background color. I am not sure what I changed and I cannot get it…
Serguei Fedorov
  • 7,763
  • 9
  • 63
  • 94
0
votes
1 answer

OpenTK OpenGL texture not drawing

I am having issues drawing a texture onto my quad but it remains white. I have looked through a number of guides and I don't seem to be doing anything different from them. To load the texture: Bitmap bitmap = new…
Serguei Fedorov
  • 7,763
  • 9
  • 63
  • 94