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

8-bit brightness values bitmap to a Texture in OpenTK

I am receiving an 8-bit brightness data from a detector (Leap Motion). Here is some info about the Leap Motion camera images. I want to load those images to a Bitmap and then to a texture every frame so I can create the illusion of a see-trough…
tovida
  • 21
  • 2
0
votes
1 answer

OpenGL ES 2.0 sprite batcher is drawing one texture for all batches

I've been working on porting some existing game framework technology to Android and, consequently, I've been working in OpenGL ES 2.0. I have set up a sprite batching class very similar to XNA's SpriteBatch. While the class works correctly when used…
Nathan Runge
  • 303
  • 2
  • 10
0
votes
2 answers

OpenTk with f# issue ("namespace or module OpenTK)

I know f# with opentk is very translatable from c#, however my problem is slightly less obvious because of the fact that f# isn't incredibly popular as it is. From writing open OpenTK right of the bat I get The namespace or module 'OpenTK' is not…
novasniff
  • 13
  • 2
0
votes
1 answer

Proper method of creating a Side-On orthographic view matrix

I'm trying to create an Orthographic view matrix viewing the scene from the scene (90 degree angle from a top-down view). This is my current code attempting that: ortho = Matrix4.CreateOrthographicOffCenter(-500f / side_zoom +…
mcmonkey4eva
  • 1,359
  • 7
  • 19
0
votes
1 answer

Run OpenTk dependent exe on TeamCity throws AccessViolationException

What's happening? TC build step via either Command Line (tried custom script as well as Executable with parameters)or .Net process runner What I am trying to run is an application that uses OpenTk. When I run the application by calling it con cmd…
roundcrisis
  • 17,276
  • 14
  • 60
  • 92
0
votes
0 answers

OpenGl c#: Is this speed acceptable?

I'm making a 2d engine in OpenGl c# using opentk. i draw 36500 sprites @ 45 fps and 50000 sprites @ 30 fps. Im on a laptop, but with good specs. it can run crysis3 on very high smooth. specs: i7 4810mq quad core @ 3.8 ghz 6mb cache, gtx 870m, 8gb…
cody b
  • 3
  • 4
0
votes
1 answer

glDrawElements doesn't draw the second time it's called, using the same vertex array object and the same shader program

I'm very new to opengl and I'm getting this really unexpected behavior. I'm implementing a basic scene graph and trying to add the ability to reuse shaders and mesh data. I have a GeometryData object which contains the references to the vertex array…
Elias
  • 175
  • 8
0
votes
1 answer

OpenGL with OpenTK wrapper cannot get projections to work

I have created a simple program that creates a cube and makes its rear plane move in a circle. When i use GL.Ortho() to view it it works fine, I can see the cube but to my belief GL.Ortho() is for 2D projections and i want to make a 3D game, so I've…
James T
  • 1,155
  • 4
  • 17
  • 39
0
votes
1 answer

Rotating about a Point in a Voxel Game Engine (C#)

I am continuing to build upon a voxel-based game engine made in OpenTK (a .NET/Mono binding of OpenGL). In this engine, there is a basic class called Volume which possesses traits such as position, rotation and scale, as well as rules to edit these…
Alex V-P
  • 49
  • 7
0
votes
0 answers

How to read pixel from a rendered texture (colorattachment)

I rendered color and position textures to colorattachment0 and colorattachment1 in a fbo. The color texture is being drawn onto a cube for differed rendering. I need to read from the position texture though, which I sent to colorattachment1. Here is…
Deniz Cetinalp
  • 901
  • 1
  • 18
  • 34
0
votes
0 answers

Converting c++ OpenGL code to C# OpenTK

I've messed with OpenGL in c++ a little but I'd like to test it in a language I'm more familiar in. I've taken an example from the OpenGL red book (the very first one as far as I'm aware) which is the following: #include main()…
James T
  • 1,155
  • 4
  • 17
  • 39
0
votes
1 answer

Trying to constrain what's being drawn using OpenTK in Visual Studio

I have a problem where I have to read in some 3 dimensional coordinates and translate those to 2 dimensional and draw the resulting points. I don't have a problem doing that, but I also have to constrain the drawing area and window to the resulting…
donkee
  • 1
  • 3
0
votes
1 answer

OpenGL 4.1 Indexed drawing problems

I am trying to render a quantity of cubes like in "Minecraft" a chunk with C# + OpenTK + OpenGL 4.1. To do that, I create a buffer with type "ElementArrayBuffer" for indices and a buffer with type "ArrayBuffer" to store the vertices. But I think to…
0
votes
1 answer

Rendering using VBOs/VAOs in OpenGL4

I'm trying to update some old-style OpenGL code to modern OpenGL4. I have a huge textured and pre-tessellated cube model to render. Instead of that, I'm now getting this: That's a field of semi-arbitrary black triangles on a white background. My…
mcmonkey4eva
  • 1,359
  • 7
  • 19
0
votes
1 answer

Normals are inverted

I am computing my modelview matrix, and normal matrix in my main program: private void setMV() { modelViewMat = Matrix4.Mult(modelMat,viewMat); // model * view because opentk is row major order …
Deniz Cetinalp
  • 901
  • 1
  • 18
  • 34