All Questions
233 questions
0
votes
2
answers
190
views
How can I efficiently render lots of moving objects in a game?
I'm using OpenGL but this question should apply generally to rendering.
I understand that for efficient rendering in games, you want to minimize communication between the CPU and GPU. This means pre-...
0
votes
1
answer
82
views
OpenGL doesn't render even though all Objects and Data seems to be correctly set up
No shape seems to show up on screen even though I have meticulously verified everything.
The data set I use which is parsed by my code CORRECTLY(I checked that) to be loaded into a generic array ...
1
vote
0
answers
54
views
glBufferData on GL_DRAW_INDIRECT_BUFFER causes rendering isues
I've been writing a renderer in C++ using OpenGL. Recently I wanted to implement indirect batch rendering using glMultiDrawElementsIndirect. When I try to test this ...
1
vote
0
answers
54
views
Cannot transform vectors from viewport to world
I started working on a small raytracer project, and i decided to reuse my already existing openGL renderer to do this, i'm using GLM to manage transforms/positions.
However, i stumbled upon a very ...
3
votes
0
answers
351
views
Avoiding z-fighting when reimplementing Freescape games
I need to avoid z-fighting in exactly co-planar surfaces that are too close to the other solids. I'm re-implementing the Freescape engine in ScummVM (all my code is open-source, available here), and ...
0
votes
1
answer
202
views
Textures still show as opaque even when alpha is multiplied by zero
I'm having a some problems with blending in OpenGLES2.0
I'm drawing a texture above a framebuffer (with ARGB channels). When I draw a transparent texture over a solid color, the alpha channel is ...
0
votes
2
answers
311
views
Correctly packing an RGBA color to a single float
I am trying to render a colored quad with LWJGL and OpenGL.
The vertices array is specified in interleaved format and look like this:
...
0
votes
0
answers
199
views
Order-independent rendering of 2D sprites
I am using OpenGL to render sprites, using an orthographic projection.
Each sprite has a position: (x, y, ...
0
votes
1
answer
524
views
Is instanced rendering any different from indexing seperate buffers using div and mod in the shader?
As far as I can tell instanced rendering is simply a way to separate a single vertex buffer into a buffer for vertex-specific data and instance-specific data. This could be useful for rendering ...
0
votes
1
answer
80
views
Front faces are transparent after setting glEnable(GL_DEPTH_FUNC) and glDepthTest(GL_LEQUAL)
I've been learning OpenGL over the past year or so, and I've never face this issue before, I've been refactoring the old version of my renderer to make it cleaner now that I'm more confident with ...
1
vote
0
answers
64
views
Why opengl code in a lib doesn't renderer?
I am experimenting with opengl using c99 on windows and vs 2022 i tried to create an window using glfw in one project and put a function that supposed to generate a texture in another project that is ...
0
votes
1
answer
293
views
Recommended approach to image rendering on quads for OpenGL-backed canvas
I am working on a vector graphics rendering library for OpenGL in Rust. Currently, the library's API is as follows:
...
0
votes
1
answer
96
views
Texture gets botched when loads in?
I got this weird issue with my block texture,it gets botched after loading the block, the issue though doesn't affect other textures as the the paddle texture gets rendered properly:
I tried ...
0
votes
1
answer
566
views
What is the advantage of using Element Buffer Objects, if any?
I'm following the amazing LearnOpenGL tutorials and noticed that Element Buffer Objects, which were mentioned and used in the Hello Triangle chapter, never appear again. So my question is, is using ...
0
votes
1
answer
437
views
Efficiently pass one uniform value per polygon or quad to the fragment shader in a single batched draw call in WebGL?
I want to render multiple colored quads, with one solid color per quad, using WebGL 2.0 and Javascript. However, this question is probably generalisable to other OpenGL implementations as well.
The ...