OpenTK is a C# library that wraps OpenGL, OpenCL and OpenAL.

learn more… | top users | synonyms

2
votes
1answer
28 views

glUniformMatrix4fv OpenTK equivalent

Very simple and quick question which surprisingly I couldn't find an answer to over the internet: what is the equivalent of glUniformMatrixfv for opentk? I've browsed all the 7 overloads of GL....
3
votes
1answer
155 views

Trying to implement forward rendering in OpenGL

I'm working on implementing forward rendering in my 2D engine, as far as I'm aware everything should be set up correctly, I've ran into some issues earlier but I'm sure I've fixed those at this point. ...
0
votes
1answer
88 views

C# OpenTK Text rendering

I've been looking everywhere for a solution on how to render/draw text for my 2D OpenTK-based game. Been trying quite a few QuickFont ones without success (either a AccessViolation exception or text ...
1
vote
1answer
72 views

Opentk hdr rendering with framebuffer white screen problem

I am trying to do hdr rendering with two shader programs: one simply draws a hdr texture on a fullscreen quad and the other one does tonemapping. I am trying either linear tonemapping colorOut = ...
0
votes
2answers
73 views

Opentk Textured Full Screen Quad

I want to display a texture on a full screen quad. What I get is a completely green quad and after a week of debugging I cannot understand why. I am currently using OpenTK 1.1.2225 and Magick.NET-Q16-...
1
vote
0answers
97 views

Turning On/Off Vsync no longer working when rendering to an offscreen buffer

I have this reaallly strange issue that as soon as I render to an offscreen framebuffer I am no longer able to toggle VSync while my application is running. I am using OpenTK as the opengl wrapper, ...
1
vote
0answers
263 views

How to use OpenTK (OpenGL) with MonoGame?

So I've been making a snake game using MonoGame (DirectX Only). I added movement, controls, feeding and growing in length. I wanted to add smooth animations to the game because the snake is just made ...
2
votes
0answers
30 views

GL.Scissor not working as expected

I have some code for rendering a button in an application and I want to clip the text if it's wider than the button itself. Here a bit of code to describe what I'm doing: GL.Enable(EnableCap....
1
vote
0answers
57 views

OpenTK crashes with Mono

I've implemented OpenTK as a secondary renderer which would let me support Mac/Linux only to realize that for some reason, even without any modifications (new MonoGame project), the application would ...
1
vote
1answer
90 views

Applying Transformation Matrices to VBOs in OpenGL

So I've recently tried to add Vertex Buffer Object Matrix transformation to an OpenGL engine I'm working on. I could go about this by applying the matrix to a copy of each vertex individually, but ...
6
votes
1answer
200 views

Dual paraboloid shadows on GLSL

I'm trying to port an XNA example to OpenTK + OpenGL, I found it here http://graphicsrunner.blogspot.com.es/2008/07/dual-paraboloid-shadow-maps.html But I'm having a really hard time, I think my maps ...
0
votes
1answer
350 views

OpenTK Ray Picking

I just can't get ray picking to work (I need to drop old working faedback mode, and replace it with color pick, but because my scene can have up to 300K+ objects it is reasonable to filter (it's a ...
1
vote
0answers
12 views

CanDraw in large hierarchical scene with rotation

I've been assigned to write small simulation visualization, that contains thousands of cubes (I know you heard that before). Now I'm working on optimization of stuff that takes place there, but ...
0
votes
0answers
71 views

Camera rotation destroy scene objects orientation

I fight with that for some time and searching internet but I don't have any answer for my problem. In few words i want to have orbiting camera on screen and objects which I want also rotate ...
2
votes
0answers
287 views

Cannot convert bitmap to texture [closed]

I'm doing a little C# / OpenGL project and I can't manage to load textures properly. So here is my texture class : public class Texture { public String Filepath; private int TextureID; ...
1
vote
1answer
601 views

OpenGL: Draw an arrow

I'd like to know how to draw an arrow to represent a vector position, length and direction. The issue is that I can't quite find an easy way to know the location and rotation of the triangle ...
1
vote
1answer
315 views

OpenGL why point's size stay the same while zooming/unzooming

i'm currently working on a game engine for a college's project. While implementing some debug tools I came across a little problem. When i'm drawing point on the ModelView Matrix the point's thickness ...
1
vote
1answer
187 views

Legal Implications of using Openal in Opentk Commercially

Myself and my friend are currently creating a game, which we plan on selling upon its completion. We are using opentk. I read over this: http://www.opentk.com/node/532 , and it pretty well describes ...
0
votes
1answer
179 views

OpenGL not rendering full scene, it is a mystery [closed]

I am trying to draw a scene in the sort of style of mock vector graphics. I've helped on a 2D game before with GLSL, but I tried to keep a simple approach to this project since I'm working by myself, ...
0
votes
1answer
392 views

OpenGL: I only see one square instead of a cube / giving information to vertex shader

I am new to OpenGL and tried to follow this tutorial. I use C# and OpenTK. So I translate the C++ Code from the Tutorial: My C#-Code: /* Hintergrundfarbe */ GL.ClearColor(0....
0
votes
1answer
249 views

GLSL: Vertex attribute to int

I'm trying to write a shader which renders a multitextured geometry wihout rerendering the geometry with each texture. In my test I'm not using textures, I just convert the texture index to a color (...
2
votes
1answer
589 views

How do I call OpenGL methods that require pointers in C#?

I have found the following C++ code in this tutorial to draw a triangle with OpenGL 4: float points[] = { 0.0f, 0.5f, 0.0f, 0.5f, -0.5f, 0.0f, -0.5f, -0.5f, 0.0f }; GLuint vbo = 0; ...
2
votes
1answer
1k views

Opentk LookAt() and 'eye' argument rotating

I'm trying to create rotating camera, which looks down by 45 deegre like this: However my code for rotating eye vector is not working properly and I achieve vertical rotation, when it should be ...
2
votes
1answer
306 views

OpenTK GL.DrawElements is never called

I found this C++ code here. It draws simple rectangle. Works great. #define GLEW_STATIC #include <iostream> #include <glew.h> #include <freeglut.h> const GLchar* vertexSource = "#...
1
vote
1answer
116 views

OpenGL - Buffer Usage

I am currently working on a little OpenGL project. At the moment I am trying to find a good solution for rendering multiple objects. I have set up a terrain with its own buffers, which works just fine....
2
votes
1answer
599 views

How to create a regular grid of triangles correctly?

I am trying to create an terrain using opentk/opengl. I have a problem with the VBO/IBO. I think a picture of the problem is the best way to show it: I dont understand why the last triangle of a ...
7
votes
1answer
1k views

How do I reconfigure my GLES frame buffer after a rotation?

Note: In order to keep the question as simple as possible, I am actively changing the body of the question to reflect the current state of affairs, instead of adding stuff at the bottom. I am ...
1
vote
1answer
5k views

OpenGL - Calculating camera view matrix

Problem I am calculating the model, view and projection matrices independently to be used in my shader as follows: gl_Position = projection * view * model * vec4(in_Position, 1.0); When I try to ...
1
vote
1answer
106 views

Why are my objects rotating with my camera?

I am working with this C# library that wraps OpenGL. I am trying to understand why my objects in the scene are rotating as I yaw my camera (view matrix). Here is an image where I have 4 separate ...
4
votes
1answer
684 views

OpenGL - What steps to take to correctly set up an Uniform Block Array

I have managed to get uniform blocks to work, but I seem to make something wrong when trying to setup an array of uniform blocks. Assume this glsl: layout(std140, binding=1) uniform LightingBlock {...
-1
votes
2answers
619 views

How to translate along Z axis in OpenTK

I am playing around with an OpenGL sample application I downloaded for Xamarin-Android. The sample application produces a rotating colored cube I would simply like to edit it so that the rotating cube ...
4
votes
1answer
309 views

OpenGL rendering looks squeezed

I am rendering bunch of cubes of unit size, but for some reason they look like they are squeezed a bit in the screen-space y axis. Why is this? My projection matrix: Projection = Matrix4....
0
votes
2answers
547 views

OpenGL UseProgram() fails

I have a rather strange exception on my application using OpenTK on Linux (ArchLinux with Mono 3.2.8) with GL.UseProgram(). I wrote a class to combine multiple files to one program: public sealed ...
2
votes
0answers
535 views

OpenGL drawing 500k triangles [closed]

I want to render big, izometric 2d map (using ortho projection). I am using OpenTK and aiming for OpenGL 3.3. Perfect option would be to draw 512x512 map of tiles, which is 262144 blocks -> 524288 ...
1
vote
1answer
922 views

GLSL - std140 uniform block - fields(vec, float, mat4) always 0.0

Ok, First of all, if just use uniforms everthing works like it should. Switching to uniform blocks nothing goes, as all values look like 0.0. I tested this with various if-then-else stuff within the ...
2
votes
3answers
694 views

How do I prevent clicking at the end of each sound play in OpenAL?

I have put together a basic sound handler class for use in my game. It uses OpenAL. It's a simple method at the moment to play sounds - here's an extract from a switch block: case "EATEN_PILL": ...
2
votes
1answer
348 views

How do I animate pieces between puzzle states?

I'm developing a simple C# puzzle game as a learning exercise, using OpenTK. It's similar to Puzzles and Dragons' puzzle part: The aim is to match 3 pieces to remove them. Removed pieces are replaced. ...
1
vote
2answers
567 views

Why swapping buffers takes different amounts of time?

When my program starts, almost nothing is on screen, just couple of lights and spheres. My FPS is at ~50. The Speed measurements looks like this: UpdateFrame took 0 ms Clearing lights queue: 0 ms ...
2
votes
1answer
650 views

Incorrect lighting results with deferred rendering

I am trying to render a light-pass to a texture which I will later apply on the scene. But I seem to calculate the light position wrong. I am working on view-space. In the image above, I am ...
1
vote
1answer
333 views

Understanding implementation of glu.PickMatrix() [closed]

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 ...
2
votes
2answers
4k views

Drawing multiple objects from one Vertex Buffer Object in OpenGL/OpenTK

I am trying to experimenting drawing method using VBO in OpenGL. Many people normally use 1 vbo to store one object data array. I was trying to do something quite opposite which is storing multiple ...
0
votes
2answers
915 views

Translate extrinsic rotations to intrinsic rotations ( Euler angles )

The problem I have is very frustrating: I am using the Jitter Physics library which gives Quaternion rotations, you can extract the extrinsic rotations but I need intrinsic rotations to rotate in ...
1
vote
0answers
529 views

Play streaming sound in OpenTK?

What's the simplest way to make a sound stream from disk and play in OpenTK?
0
votes
1answer
3k views

Draw quad with OpenGL VBO using OpenTK

I'm trying to learn how to use VBO (Vertex Buffer Objects) by putting together a simple program that draws a quad to the screen using OpenTK (C# OpenGL bindings). Unfortunately I'm not seeing ...
-1
votes
1answer
434 views

Using Shader causes triangle to disappear

The following is my rendering code. Private Sub GameRender() GL.Clear(ClearBufferMask.ColorBufferBit + ClearBufferMask.DepthBufferBit) GL.ClearColor(Color.SkyBlue) GL.UseProgram(...
5
votes
1answer
299 views

Upload vertex data for particles

I am kind of beginner with opengl. I am using point sprites (currently without any texturing) for my particles. I seem to fail to get them uploaded to the GPU memory correctly. I have readed lots of ...
0
votes
1answer
102 views

Normals not rotated correctly

While rendering a cube to the gbuffer (diffuse, normal, depth) I noticed something odd when applying rotations. I build a world matrix for the cube as follows: Yaw = Yaw % MathUtil.PI2; Pitch = Pitch ...
1
vote
3answers
6k views

How can I convert screen coordinatess to world coordinates in OpenTK?

I'm making a windows forms application with opengl view. I need to get the mouse coords converted to the opengl world coords. Well, my Y coord gets converted wrong. It's hard to explain, so here is ...
4
votes
1answer
123 views

What OpenCL video cards (or FPGAs) features are needed for high speed multiplication? [closed]

I'm benchmarking some cryptographic related software and am looking for video cards that are better at parallel multiplication vs parallel addition. Is there any prior work that would graph video ...
-1
votes
1answer
1k views

Problem rendering VBO [closed]

I'm developing a game engine using OpenTK. I'm trying to get to grips with the use of VBO's. I've run into some trouble because somehow it doesn't render correctly. Thus far I've used immediate mode ...