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

learn more… | top users | synonyms

0
votes
1answer
42 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
120 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
101 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 ...
0
votes
1answer
72 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
100 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. ...
0
votes
0answers
200 views

Use opentk window handle to host wpf control - Monogame

well my boss asked me to try and get wpf controls rendered in Monogame. From what I understand this was easly doable in Xna, however in monogame it fails. Is there any way to make the window hadle ...
1
vote
2answers
193 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
180 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
117 views

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 ...
1
vote
2answers
391 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
0answers
174 views

OpenTK (OpenGL) Rotation around fixed axes?

How would I go about rotating things in 3-dimensional space along fixed axes? As OpenTK only seems to have rotation that modifies the other rotation, as in X affects Y & Z Y affects Z Z affects ...
0
votes
2answers
292 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 ...
0
votes
0answers
129 views

Play streaming sound in OpenTK?

What's the simplest way to make a sound stream from disk and play in OpenTK?
0
votes
0answers
14 views

Grab mouse input in OpenTK? [duplicate]

I've searched a lot on the Internet but I can't seem to find any code that works with the current OpenTK, that "grabs" the mouse input (just gives the delta-x and delta-y, for camera rotation for ...
0
votes
1answer
523 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 ...
0
votes
1answer
273 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) ...
3
votes
1answer
177 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
71 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 ...
0
votes
3answers
690 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
106 views

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

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
459 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 ...
1
vote
2answers
160 views

Point[] and Tri not “could not be found”

Hi I'm trying to learn how to load a .obj file using OpenTK in windows Forms. I have seen a lot of examples out there, but I do see almost everyone uses List, and Point[]. Code example show these ...
2
votes
3answers
1k views

Is OpenTK Dead?

Looking at OpenTK, I notice some disturbing signs: The last news item was posted on December 31st, 2010 The main forum gets about one post a day On SourceForge, the last nightly build was in March, ...
0
votes
2answers
760 views

OpenTK 2D Engine [closed]

I'm looking for a 2D gaming engine for C#/Windows. OpenTK seems reasonable, albeit made for 3D. I didn't find anything (other than an old thread from 2008) that talks about a 2D game engine. Are ...
1
vote
1answer
304 views

Does OpenTK work in Windows 8?

While looking up OpenTK, I found a couple of references to threads that talk about Windows 8 support: This one from 2011 claims that OpenTK works on a Win8 preview A newer one from 2012 leaves the ...
1
vote
2answers
317 views

I enabled and setup glBlendFunc, but my texture has a white outline. What am I doing wrong?

You can see most of my source code in this question: Instead of the specified Texture, black circles on a green background are getting rendered. Why? Now I have the problem, that my texture has a ...
3
votes
2answers
191 views

Instead of the specified Texture, black circles on a green background are getting rendered. Why?

I'm trying to render a Texture via OpenGL. But instead of the texture black circles on a green background are rendered. (They scale, depending what the rotation of the texture is) Example: The ...
2
votes
1answer
158 views

Why do I have to divide the origin of a quad by 4 instead of 2?

I'm currently transitioning from C#/XNA to C#/OpenTK but I'm getting stuck at the basics. So I have this Sprite-Class: public static bool EnableDebugDraw = true; public float X; public float Y; ...
0
votes
4answers
402 views

Missing triangles in model

I am having an issue where triangles in a model aren't being shown. The left is wireframe, the right is the finished image. For some reason a bunch of the triangles aren't being shown. The project ...
1
vote
1answer
205 views

OpenAL seems to ignore sound attentuation/orientation for long sounds

I don't know how else to describe it in the title, sorry. My sound engine currently works perfectly with listener positioning and sound positioning to create the attentuation and panning effects. At ...
2
votes
3answers
2k views

C# 2D Game Library?

I'm looking for a C# 2D game library based on something like OpenTK which wraps OpenGL for C# Basically something like Slick2D (2D game library for Java) which is based on LWJGL which is an OpenGL ...
0
votes
2answers
703 views

Can't render to FBO using a shader

I've added functionality so that I can render to a framebuffer (for post-processing and stuff). I can successfully render to my framebuffer and then render that framebuffer, but anything with a ...
1
vote
1answer
572 views

C# OpenTK - Getting world coordinates of points that are altered by matrices

I have written a skeletal animation system for a game i am working on. To draw lines that represent a skeleton, i use the GL matrix, and multiply it by each bone a long the body. For example before ...
1
vote
1answer
1k views

Why doesn't my texture display with this GLSL shader?

I am trying to display a DXT1 compressed texture on a quad using a VBO and shaders, but I have been unable to get it working. All I get is a black square. I know my texture is uploaded properly ...
1
vote
1answer
284 views

Input in OpenTK

How to use Input in OpenTK 1.0? There is not much info around, some classes are unfinished. What I want to achieve, is to be able to use input not only in OnUpdate function, but also in other classes ...
13
votes
3answers
5k views

How do I implement a quaternion based camera?

UPDATE The error here was a pretty simple one. I have missed a radian to degrees conversion. No need to read the whole thing if you have some other problem. I looked at several tutorials about this ...
0
votes
2answers
691 views

Using multiple indexes with buffer objects in OpenTK

I've got multiple buffers in OpenGL holding data on position, normals and texcoords. I also have an equal number of buffers holding distinct index data for each of those buffers. I quite like this ...
2
votes
2answers
187 views

Collisions between players at spawnpoints

I am working on a FPS/MMORPG and ran into a problem at spawnpoints, when I enabled collision detection between players. Neither player would be able to move if both spawned at the same time, because ...
6
votes
2answers
2k views

How do I draw anti-aliased holes in a bitmap

I have an artillery game (hobby-learning project) and when the projectile hits it leaves a hole in the ground. I want this hole to have antialiased edges. I'm using System.Drawing for this. I've tried ...
4
votes
1answer
682 views

In an artillery game how do I mask out the part of the terrain that was hit

Let's say I want to make a really simple artillery game, something like Gorillas. I don't have any experience in games, just some basic understanding of OpenGL. I want to do this for fun and to learn ...