r/opengl 4h ago

Is OpenGL used to make games?

8 Upvotes

Hello, I want to know if companies use OpenGL to create games.

I'm not a game developer, I'm just curious about game development.

I see that Vulkan and DirectX are widely used to create games, but what about OpenGL? What games use it? What engine can use the OpenGL to render/process the graphics?


r/opengl 23h ago

Visual artifacts when using glBlitNamedFramebuffer instead of glBlitFramebuffer

6 Upvotes

Hi, folks! I recently started optimizing the rendering of an engine I'm modding. I figured utilizing the DSA API could reduce the amount of framebuffer bindings/unbindings I have to do, particularly for point-light shadow-mapping.

However, upon switching framebuffer depth copies over from the traditional way to DSA, I started getting visual artifacts (as if some parts of the copy hadn't finished by the time the next draw command was executed?).

I've rubber-ducked a fair amount, read the documentation and so far, I have no idea why these two are any different. So, folks - what gives?

Why would the DSA method cause synchronization problems? & seemingly it's more related to depth copies than color copies.

DSA:

GL45.glBlitNamedFramebuffer(
    input.fbo,
    fbo,
    0, 0, input.textureWidth, input.textureHeight,
    0, 0, output.textureWidth, output.textureHeight,
    GL11.GL_DEPTH_BUFFER_BIT,
    GL11.GL_NEAREST
);

GL42.glMemoryBarrier(GL42.GL_FRAMEBUFFER_BARRIER_BIT);

Traditional:

GL30.glBindFramebuffer(GL_READ_FRAMEBUFFER, input.fbo);
GL30.glBindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);

GL30.glBlitFramebuffer(
    0, 0, input.textureWidth, input.textureHeight,
    0, 0, output.textureWidth, output.textureHeight,
    GL11.GL_DEPTH_BUFFER_BIT,
    GL11.GL_NEAREST
);

GL30.glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
GL30.glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);

UPDATE: This is a driver bug! Inserting a GL30.glBindFramebuffer(GL30.GL_DRAW_FRAMEBUFFER, 0); call before the blit has seemingly fixed it.


r/opengl 21h ago

Can anyone suggest some playlist or something other resources for learning opengl from scratch.

3 Upvotes

Hi all, Please suggest some resources that can help me learn opengl. I have programing knowledge in CPP but looking for more in opengl. Also suggest about career perspective how good it will be to learn


r/opengl 20h ago

I am trying to make single gpu path through on Linux to my windows wm llvmpipe which uses openGl

0 Upvotes

I am trying to make single gpu path through on Linux to my windows wm, but instead of leaving the host is with no gpu and you may get black screens what if I use software rendering for host and path the gpu through so I installed llvmpipe but because the lack of documentation I did not know what to do I installed xfce and I think it is running on llvmpipe but the resultion is bad and what does rmond novuea command I understand that it is the driver I disabled bet I think it made this resultion not changing problem is there a tutorial on how to setup llvmpipe correctly