13
votes
Should I use retained mode or immediate mode
Immediate mode in OpenGL consists of glBegin/glEnd calls, with one or more glVertex calls (...
7
votes
Accepted
What's the DSA version of glTexImage2D?
GL_ARB_direct_state_access.
There is none.
Issue 5 in the DSA specification reads (in part):
This extension omits TextureImageND (mutable texture definitions)...
Specifically, glTexImage/...
5
votes
Accepted
Why are quads not rendering with OpenTK 4.7.5 when similar code works with OpenTk 3.3.3?
The issue with the code is that PrimitiveType.Quads is not supported in OpenGL 3.0 and above, which is used by OpenTK 4.7.5. Instead, use ...
4
votes
OpenTK immediate mode on net core doesn't work?
OpenTK is discouraging the use of immediate mode. But it is still supported. To use it, you need to set NativeWindowSettings.Profile to ...
3
votes
Accepted
uniform matrix not being assigned to shader
This is happening because in OpenGL uniform values (set by glUniform calls) are part of program object state, i.e. specific to the currently bound program.
If you wish to change a uniform value you ...
2
votes
Accepted
glClearBuffer takes 1 second on a Geforce 9500GT
The problem was that I used ushorts in one of my VBOs to save a bit on memory, but seems to be very costly when doing lookups on certain AMD cards. After switching back to full integers the ...
2
votes
2D HUD over 3D scene
GL.Ortho creates a screen that is as wide and tall as you specified it. In your case both the width and height is 1 unit.
Because your screen is wider than taller, a width unit is bigger than a ...
2
votes
Accepted
OpenGL frustum extraction
In openTK you need to transpose matrices to make it work.
Green lines are frustum in world space.
...
2
votes
Accepted
OpenGL Texture from Raw Data Not Rendering Correctly
Turns out there are a couple issues with my code: the fact that it doesn't generate a rainbow box but a grey gradient as user1118321 said in a comment; the wrong pixel type, byte, not uint8888; and ...
1
vote
Yaw rotation not translating to Quaternion
Thanks to DMGregory for correcting my quaternion understanding. All is working fine now. I just make a quaternion for pitch and yaw then multiply them with my existing oreientation quaternion like so:
...
1
vote
Accepted
C# NanoVG Transparency issue
Finally found a solution.
For Anyone Having this problem just Add GL.Enable (EnableCap.StencilTest);
...
1
vote
Multiple glControl on same winform is not working - OpenTK C#
I may assume that this happens due to fact that OpenTK opens OpenGL context on its creation. It is clearly stated here: https://www.khronos.org/opengl/wiki/Creating_an_OpenGL_Context_(WGL)#...
1
vote
1
vote
OpenTK Terrain - Triangle strip issue
You need to start a new triangle strip per y value.
If I remember right, a triangle strip draws one new triangle for each vertex you give it, reusing the previous two. It's trying to make one very ...
1
vote
The largest vector in an array
Linq method of solving this would be using MaxBy coupled with a method mapping vector to a scalar type, e.g. LengthSquared or ...
1
vote
Multiple Indices Problem
You are assuming that the number of normals and number of positions is the same. This may not be true.
If there are more positions than normals, then you are accessing newnorms out of bounds.
Before ...
1
vote
OpenGL scissor odd behaviour
Turns out the Scissor function uses the y value wrong for whatever reason. In my case I would need to alter the y value to
windowHeight - scissorHeight - y
The ...
1
vote
How to use texelFetch
I'm not sure about C#/OpenTK, but in OpenGL when specifying an integer vertex attribute you must use glVertexAttribIPointer, not glVertexAttribPointer; see https://www.opengl.org/sdk/docs/man4/html/...
1
vote
How to apply bindpose for vertex skinning?
I think the bindpose matrix you are referring to is also the bone offset matrix, which is related to its parent. It transform the bone from the mesh space to its local space.
A final transformation ...
1
vote
OpenTK crashes with Mono
Although you haven't provided many specific details about the crash, I would highly recommend using the Mono Migration Analyzer to find any problems.
The Mono Migration Analyzer (MoMA) is a tool ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
opentk × 109opengl × 75
c# × 68
glsl × 10
vbo × 8
shaders × 6
textures × 5
rotation × 5
camera × 4
lighting × 4
matrix × 4
optimization × 4
.net × 4
2d × 3
3d × 3
mathematics × 3
rendering × 3
transformation × 3
quaternion × 3
openal × 3
c++ × 2
collision-detection × 2
monogame × 2
terrain × 2
opengl-es2 × 2