38,020 questions
2
votes
0
answers
129
views
Confusing problem with local vs class variables and rendering with silk dot net and OpenGL
I'm trying to learn/implement OpenGL using the silk.net library and I've got a rendering framework functioning. I can add a shape to the render list from my Layer update method, and I can add a shape ...
0
votes
1
answer
51
views
Only one texel rendering during mass batch rendering using SSBOs
First, this is my second time asking this question. The first time, I was given many different tips that I applied into this new question.
Currently, I am working upon a 2D tile renderer. Switching ...
1
vote
1
answer
151
views
How does one test a Kivy App on GitHub actions MacOS Runner?
I am trying to use GitHub actions to test my Kivy application on various operating systems. I am having trouble however running the app on MacOS operating systems and keep getting this error:
INFO ...
5
votes
1
answer
202
views
OpenGL depth test with unclamped range
I'm using a OpenGL pipeline with a vertex and fragment shader, which is such that early fragment tests need to be enabled.
So the depth test is always done with the vertex shader output gl_Position.z ...
1
vote
0
answers
197
views
How to setup light source position and shading: with Pyqtgraph: GLMeshItem?
I am using pyqtgraph.opengl for graphics and display of STL files on my UI. I am using phong shading technique called 'shaded' param with pyqtgraph.opengl.GLMeshItem API. But I am having a dark color ...
0
votes
1
answer
85
views
Frag Y coord goes from -600 to 0 after adding frame buffer?
After adding a frame buffer and then drawing to it, the default frame buffers frag coordinate y becomes -600 at the bottom and the top is 0, rather than bottom being 0 and top being 600.
I've messed ...
1
vote
1
answer
99
views
Prevent pyglet shapes from blending
I have the following code.
import pyglet
window = pyglet.window.Window(fullscreen=True)
batch = pyglet.graphics.Batch()
rectangle1 = pyglet.shapes.Rectangle(100, 100, 80, 80, color=(128, 0, 0, 128), ...
0
votes
1
answer
89
views
Interaction between function pointers and device drivers in OpenGL
I've been learning more about OpenGL recently, and there's one aspect about retrieving function pointers to the OpenGL function implementations in your local drivers that I can't quite understand (...
0
votes
1
answer
165
views
GLSL input/output variables with same name in different sources
I have a GLSL program that contains 3 fragment shader sources that would get linked together, like this:
1.
#version 460 core
void RunA();
void RunB();
void main() {
RunA();
RunB();
}
#version 460 ...
-2
votes
1
answer
53
views
. Quad disappears once i moved it into a seperate class [duplicate]
I finally got a quad working with textures, and to clean up my code, I decided to move it into a separate class, but now it disappeared without any error message.
Main file:
#include <glad/glad.h&...
0
votes
0
answers
56
views
How to retain bits on lowp float when using `imageLoad` and `imageStore`
I would like to use all 8-bits as flags on a lowp float stored in an image. However, for some reason the data is never retained when I read it back. I use uintBitsToFloat and floatBitsToUint like so.
(...
0
votes
0
answers
102
views
Displaying text in OpenGL (2024 update wanted)
I am trying hard to get text to display in OpenGL in any way, shape, or form. To start from something very simple, I grabbed this example from GeeksForGeeks. It runs, it displays a green circle. Then ...
0
votes
1
answer
94
views
Draw a cube with OpenGL?
I need to draw a cube with OpenGL in C:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
...
0
votes
0
answers
98
views
Reading from GLSL image and then rendering to framebuffer
I have a GLSL fragment shader that should render pixels into a texture, and blend the value at each pixel with the one that has been in the texture before.
Instead of using GL blending operations, it ...
1
vote
1
answer
93
views
Difference between C++ and OpenGL objects
unsigned int VBO;
glGenBuffers(1, &VBO);
glBindBuffer(GL_ARRAY_BUFFER, VBO);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
I thought objects are created by ...
0
votes
1
answer
86
views
For instanced draw calls, does the vertex count make a difference to performance?
Example: One wants to render a 100,000 x 100,000 grid. For the sake of argument the grid cannot be loaded as a model and must be manually created during runtime, i.e. a nested for-loop.
Obviously ...
0
votes
1
answer
315
views
FLTK: When and how does Fl_Group::add take effect?
The code below, with these two lines in this order
tab1.add(glWindow2);
window->show();
produces this image:
But if I put the add call after window->show:
window->show();
tab1.add(glWindow2)...
0
votes
1
answer
123
views
Visual Studio 2019 is importing the (supposedly) wrong headers despite manually specifying include path
I'm using VS2019 to build a visual SLAM project that uses Pangolin for creating visualizations.
I've successfully built Pangolin from source and verified that it works (included examples are running).
...
1
vote
1
answer
165
views
Custom quaternion to Euler giving NaN
I am writing a game + game engine for a college class, and I've decided to store rotations / orientations as quaternions to prevent gimbal lock. The game is a spaceship game with rotational controls, ...
2
votes
1
answer
101
views
OpenGL: Cannot find GL_MAX_UNIFORM_BUFFERS and similar macro definitions
In OpenGL Superbible 5th edition, at the Uniform Buffer Objects part, it says this:
There is fixed maximum number of uniform blocks that can be used by a single program, and a maximum number that can ...
2
votes
1
answer
84
views
Fl_Gl_Window sample program fails to draw in that window
I got this program to build and run:
#define GL_SILENCE_DEPRECATION
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Gl_Window.H>
#include <FL/gl.h>
#include <...
0
votes
1
answer
37
views
Why program crash when destroy QOffscreenSurface subclass?
I want to render textures offscreen by using QOffscreenSurface and QOpenglContext class.Here are my codes:
OffscreenRender.h
class OffscreenRender:public QOffscreenSurface,protected ...
0
votes
2
answers
265
views
Difference between world-normal calculated by sampling view-normal texture and world-normal texture
I have a custom renderer feature that create normal texture and using that.
Normal texture can be view or world space.
If I create view space normal texture and sample with the uv node of the full ...
0
votes
1
answer
90
views
C makefile with multiple archives
I have a directory that contains both headers and source for a small collection of hobby OpenGL programs. My goal is create two main header files: "toolbox.h" and "geometry.h". ...
0
votes
1
answer
88
views
Frustum Culling Not Utilizing Entire Bounding Sphere in OpenGL [closed]
My frustum culling is detecting an object as culled even though not the entire object's bounding sphere is out of the frustum yet. It's like it believes the bounding sphere's radius is smaller than it ...