1
vote
1answer
63 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 ...
1
vote
1answer
92 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 ...
1
vote
1answer
211 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
80 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
88 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
112 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
204 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 = ...
2
votes
0answers
235 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
247 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 ...
1
vote
2answers
217 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 ...
1
vote
1answer
160 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
798 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
225 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
1answer
859 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
329 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) ...
4
votes
1answer
216 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 ...
4
votes
1answer
108 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
540 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
169 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 ...
1
vote
2answers
352 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
203 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
160 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
444 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 ...
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
799 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
598 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
323 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 ...
1
vote
2answers
772 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
191 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 ...
4
votes
1answer
708 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 ...