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

Get the bounds of the plane visible at a specific z coordinate

Using OpenTK, I've created a window (800x600) with a vertical FOV of 90°. I want to make a 2D game with a background image that fits on the whole screen. What I want is the plane at a variable z coordinate as a RectangleF. Currently my code…
timedt
  • 1,302
  • 2
  • 9
  • 14
0
votes
1 answer

OpenTK ClearColor not working properly when I use a second userform

My program is CAD type software in which I use OpenTK for graphics. The program works as intended - with one exception. I want to allow the user to change the color of things rendered starting with the background color. To do this I created a second…
Todd
  • 23
  • 6
0
votes
1 answer

Port OpenGl buffer to XNA

I am trying to port an application with some OpenTK (C# Opengl implementation) to XNA/MonoGame and I have come to a buffer, but I cannot figure out how to port this because there does not seem to be any direct equivilant of the buffer functions. I…
Gerharddc
  • 3,921
  • 8
  • 45
  • 83
0
votes
1 answer

OpenTK Picking sample crashing

I am going through OpenTK (opentk-2010-10-06.exe) sample code which is provided with the OpenTK installation. I am interested on picking example, but it crashes. but other samples are working. What is the problem? Does anybody come across this…
RobinAtTech
  • 1,299
  • 3
  • 22
  • 48
0
votes
1 answer

Save cube in variable and apply scale/rotate/move OpenTK

I am creating simple 3D editor. I now can draw simple primitives like cube but, I don't know how to save this object to som variable and then copy it to other coordinates. I also don't know how rotate/scale/move this cube and save this new shape to…
Frees
  • 139
  • 1
  • 7
0
votes
1 answer

GL.getUniformLocation Specular Lighting returning a negative value

I'm basically attempting Specular Lighting in OpenTK (c# implementation of OpenGL) and I've managed to get Ambient and Diffuse lighting working, but now my calls to GL.getUniformLocation are returning -1 with the specular vector values (And I'm not…
0
votes
3 answers

How to make a billboard spherical

Following this turorial here I have managed to create a cylindrical billboard (it utilizes a geometry shader which takes points and produces quads). The problem is that when i move the camera so that it's higher than the billboard (using gluLookat)…
Timur Nuriyasov
  • 359
  • 2
  • 16
0
votes
1 answer

Translate and rotate image outside of glControl1_Paint using OpenTK?

I am making CAD type software in VS2010 Pro using a C# Windows Form Application and OpenTK. Nothing fancy; I just want to be able to read in some basic shapes and draw them. I'm not sure if this makes a difference to the answer, but I am drawing in…
Todd
  • 23
  • 6
0
votes
2 answers

How to use GL.Ortho in OpenTK correctly?

I paint some figures using GLControl (OpenTK) in Windows forms. However, the problem is that I cannot figure out, how to use GL.Ortho() method. Here is the code I have written: public partial class Form1 : Form { public Form1() { …
zmockus
  • 329
  • 1
  • 5
  • 12
0
votes
1 answer

Drawing points in top of texture openGL

I have a texture drawn in a GLcontrol and I want to draw points on top of it. Instead, I get the full texture set to the colour of the point I want to draw. I guess that I have to disable the texture format and enable the points drawings, but cant…
Ander Biguri
  • 35,140
  • 11
  • 74
  • 120
0
votes
1 answer

Transparent faces causing faces behind them to disappear

I'm programming a game with the .NET library OpenTK. I'm trying to create a fog effect near certain areas by drawing a series of transparent faces. However, the faces turn everything behind them to the sky color, as seen at…
0
votes
1 answer

How to print OpenTK (OpenGL) or change device context?

With OpenTK / OpenGL I can draw onto the Winforms all fine. But how do I draw on to the printer? I worked on a ganttchart and used this piece of code for printing but I am not sure how to get the device context to get into GLControl. private void…
Jake
  • 11,273
  • 21
  • 90
  • 147
0
votes
1 answer

Wierd sounds & beeping when rendering with vbo

im using C# and Opentk to render voxels, i used display list which were fine but slow, so i switched to VBO, since then every time im rendering something with vbo, there are wierd sounds and beeping from my computer (very low volume). sounds like…
SharkDX
  • 86
  • 1
  • 5
0
votes
2 answers

OpenTK basic triangle not drawing as it should

I am trying to draw the triangle with the colours and verticies specified but currently it seems like its picking some colour numbers for the positions and is not doing what its supposed to do using System; using System.Collections.Generic; using…
Sweeney
  • 3
  • 2
0
votes
1 answer

Depth texture and fbo issues on opentk c# with intel hd 3000

I'm currently facing a problem with intel hd graphics hardware to implement shadow mapping effects. I think that the code isn't far from what i want to have as results because this code snippet works fine on ATI Mobility Radeon 5650 and Nvidia NVS…
nabil
  • 21
  • 1
  • 3