Skip to main content
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 (...
Maximus Minimus's user avatar
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/...
Maximus Minimus's user avatar
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 ...
Nick NaSvlishvili's user avatar
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 ...
Theraot's user avatar
  • 27.5k
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 ...
Maximus Minimus's user avatar
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 ...
Tyron's user avatar
  • 213
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 ...
Bálint's user avatar
  • 15k
2 votes
Accepted

OpenGL frustum extraction

In openTK you need to transpose matrices to make it work. Green lines are frustum in world space. ...
some rand's user avatar
  • 118
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 ...
Andy A's user avatar
  • 43
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: ...
CaptainLupa's user avatar
1 vote
Accepted

C# NanoVG Transparency issue

Finally found a solution. For Anyone Having this problem just Add GL.Enable (EnableCap.StencilTest); ...
David Neves's user avatar
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)#...
Ivan P.'s user avatar
  • 111
1 vote

How do I enable FSAA in OpenTK?

It's in the constructor of GraphicsMode: ...
JBeurer's user avatar
  • 467
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 ...
amitp's user avatar
  • 6,066
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 ...
wondra's user avatar
  • 4,930
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 ...
Bram's user avatar
  • 3,734
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 ...
Raedok's user avatar
  • 21
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/...
Maximus Minimus's user avatar
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 ...
Splash's user avatar
  • 11
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 ...
Alex V-P's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible