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

Crash in GL.DrawElement()

When I try to draw a scene using GL.DrawArrays() the code runs successfully, but crashes when I use GL.DrawElements(). The input paramaters and data is valid.
kaps
  • 186
  • 4
  • 18
0
votes
1 answer

Opentk - opengl, Dispalying Mulitiple Lines in one VBO, not connected

Is there a way i can render a buffer of individual lines that are not connected to teach other, using a single buffer? At the moment i am creating one VBO for each line and I'm trying to render thousands of lines but and i don't think What I'm doing…
Dean
  • 499
  • 6
  • 13
  • 34
0
votes
1 answer

OpenTK - VBO and Mesh, Memory Exception

I have a class and I'm trying to render a single triangle with it but it keeps failing and i Don't know why, can anybody spot the problem? I've tried using static and dynamic vbo but i keep getting a memory issue. The Error i receive is: " An…
Dean
  • 499
  • 6
  • 13
  • 34
0
votes
1 answer

Diagonal lines in OpenGL texture

I'm writing my own rendering engine using OpenTK 1.0 and I'm trying to implement textures now but I have a problem. I'm following this tutorial and instead of a checkerboard-like texture I get…
Jupiter
  • 1,421
  • 2
  • 12
  • 31
0
votes
1 answer

Can OpenTK be used from within Monogame

Is it safe to use OpenTK functions from within a MonoGame project? Do I lose any portability?
Pavel Matuska
  • 776
  • 9
  • 24
0
votes
1 answer

How to paint a line from another method in OpenTk

I have a program that will draw a line as shown below. private void glControl1_Paint(object sender, PaintEventArgs e) { GL.glClear(GL.GL_DEPTH_BUFFER_BIT | GL.GL_COLOR_BUFFER_BIT); GL.glMatrixMode(GL.GL_MODELVIEW); …
RJ Uy
  • 377
  • 3
  • 10
  • 20
0
votes
3 answers

How to get the mouse coordinate inside an OpenTK.GLControl?

I have a program that uses OpenTk.GLControl. Now on my listener, every time the mouse hovers to the said control, say "glControl1", I want to get the mouse coordinates. Is that possible? sample code below. private void…
RJ Uy
  • 377
  • 3
  • 10
  • 20
0
votes
1 answer

White OpenGL texture in some graphic cards

I am using following code to render a 1D texture. But in some graphic cards it renders only a solid white one. I noticed sometimes it is fixed after installing the card's driver. byte[,] Texture8 = new byte[,] { { 000,…
melmi
  • 988
  • 3
  • 9
  • 27
0
votes
1 answer

How to manipulate the GL.bindframebuffer to target to bind GL_EXT_framebuffer

I'm trying to change the framebuffer object from GL_ARB_framebuffer and force it to use GL_EXT_framebuffer since my system is not compatible with the first one. Where in the solution do I need to implement this and how? More information on my…
Alan
  • 1,134
  • 2
  • 13
  • 25
0
votes
1 answer

OpenTK GameWindow "laggy"

I tried to create a new GameWindow in VB.NET using the OpenTK library. The game window works fine, I can maximize it or change its size perfectly fine, but it takes a few seconds for the window to appear in the taskbar and it's very laggy when I…
Abandoned account
  • 1,855
  • 2
  • 16
  • 22
0
votes
1 answer

GLKBaseEffect set Constant color

I want use GLKBaseEffect for coloring my 3DModel. I created examplar of GLKBaseEffect GLKBaseEffect effect; When i setup OpenGL i write: effect = new GLKBaseEffect(); When i draw my figure i use effect: effect.Light0.SpecularColor = new Vector4…
0
votes
2 answers

Simple color GLSL shader doesn't output anything

I'm trying to draw a sphere with just a diffuse color, but nothing shows up. All the OpenGL code should be correct, because if I swap the "color" shader with "textured" shader, everything shows up nicely. This is the shader selection code. The…
manabreak
  • 5,415
  • 7
  • 39
  • 96
0
votes
1 answer

Fragmentshader and framebuffer solid colour

Dear Stackoverflowers, Lately I have been making my first baby steps in the world of shaders, using GLSL and openGL in C# with OpenTK, and I've stumbled into some problems which I seem to be unable to solve. I started off with one shader program and…
Perry
  • 98
  • 7
0
votes
1 answer

How to color vertices?

How can I set color for vertex in opengl es 2.0? Now I use color array: float[] TriangleColors = new float[]{ 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, …
0
votes
0 answers

OpenGL Fastest way of rotating single objects

I have an unknown amount of polygons, all facing the camera (-z) with different positions. I want to rotate each polygon around its center by different angles. Would it be faster to use glRotate and glTranslate, or to calculate the rotation myself,…
timedt
  • 1,302
  • 2
  • 9
  • 14