38,020 questions
Advice
0
votes
1
replies
29
views
How to have a hover Sound in Dear ImGui
How do I add:
menuSound.loadSound("hover_sound", "Audio/Sound/button_hover_sound1.wav", 0.5f);
sound effect to all button in ImGui, so that when the mouse hover over them it will ...
-1
votes
0
answers
81
views
OpenGL Window won't display [closed]
I am having issues getting this to run:
main file:
//
#include <iostream>
#include <GL/glew.h>
#include <OpenGL/OpenGL.h>
#include <GLFW/glfw3.h>
#include <fstream>
#...
Advice
0
votes
6
replies
85
views
Polyhedra from its vertices in OpenGL
I'm currently working on Voronoi polyhedra, I already have a software that generates all the vertices for me, but a got no indexes to draw the polyhedra.
I know how to draw polygons and 3d shapes ...
1
vote
0
answers
56
views
QComboBox popup not visible when placed in an overlay over QVTKOpenGLNativeWidget in fullscreen on Windows
I'm embedding a VTK rendering widget inside a Qt 6 app using QVTKOpenGLNativeWidget.
The window contains a QVTKOpenGLNativeWidget used for 3D rendering, wrapped inside a QFrame.
On top of it, a ...
-3
votes
0
answers
72
views
No context is current or a function that is not available in the current context was called
I'm trying to learn Nuklear. I have seen others with this issue, but I have added both GL.create capabilities and glfwmakecontextcurrent, as well as set up version_major and version_minor. So I don't ...
-2
votes
0
answers
74
views
What is the OpenGL profile used by SDL2? [duplicate]
I've noticed something very curious: if I use these functions to define a lower version of OpenGL than my video card supports, I can still use higher shader versions. Example.
SDL_GL_SetAttribute(...
3
votes
2
answers
89
views
What does a min filter do on the same mip level?
In a graphics API like Vulkan, you have VkFilter, which can be NEAREST or LINEAR. Leaving aside the mipmap filtering, which is another thing altogether, I'm trying to understand what the point of the ...
0
votes
0
answers
38
views
pyglet window disappearing on second monitor
I can create a simple window on my main monitor, but when I try to perform the same function on a secondary monitor, the window appears for a second or so, then disappears.
Initially, I was attempting ...
2
votes
1
answer
56
views
Are storage buffers bounds-checked by default?
I found a comment on Reddit saying:
SSBO accesses are bound checked at runtime by the shader to prevent
segmentation faults (which is why the descriptor of a SSBO is a
pointer and size). I think this ...
1
vote
1
answer
110
views
Why is eglCreateContext() giving me EGL_BAD_ALLOC?
Preface: I'm aware fixed-function OpenGL is obsolete, I'm just using it for fun and learning.
I'm trying to set up a classic fixed-function OpenGL context with Xlib and EGL. However, I'm getting ...
-1
votes
2
answers
133
views
Instead of a texture atlas, dump all images in one buffer
In a texture atlas the individual images are arranged geometrically. The texture atlas itself is an image that can be viewed in any image viewer.
I was wondering if it was possible, to simply dump all ...
2
votes
0
answers
150
views
deltaTime jitter with OpenGL in SDL2?
When running a simple SDL2/OpenGL demo with VSync on Windows 10, I noticed that deltaTime between frames fluctuates by 1–4 ms at 60 Hz. I expect some jitter from OS scheduling, but 4 ms seems large ...
1
vote
1
answer
132
views
glMemoryBarrier and compute shaders clarification
I've read the Khronos wiki Memory_Model page and the glMemoryBarrier
docs, and I'm still confused.
I have two buffers for vertex data (A and B) that I glMapBufferRange, memcpy into them, then ...
0
votes
0
answers
54
views
OpenGL 4.6 and context sharing with GLFW3 [duplicate]
I have recently moved on newer hardware (laptop with rtx 5070) and so with new nvdia driver (version 575). I am now using OpenGL 4.6 rather than 3.3 I used before and now I am struggling ...
0
votes
1
answer
135
views
Segfault when calling OpenGL functions from other file
I am creating a small abstraction layer for an engine, but when I call any OpenGL API functions from a class, the code segfaults. I'm using glad and glfw and there aren't any errors from either, and ...
-3
votes
2
answers
117
views
cannot determine which instance of overloaded function "Init::Init" is intended [closed]
currently working in c++ trying to create an Init class to initialize some of the behavior in GLFW and GLEW. Basically I'm moving the whole setup portion to a new class called Init. Init will have ...
1
vote
1
answer
92
views
Why isn't this program correctly texturing models?
I'm trying to basic 3D rendering working using OpenGL 1.1:
#define GLFW_INCLUDE_GLU
#include <GLFW/glfw3.h>
#include <gl/GL.h>
#include <gl/GLU.h>
#include <stdio.h>
#include &...
3
votes
1
answer
133
views
Is there a way to get the index of a draw call?
I know there's gl_VertexIndex and gl_VertexID, but let's just say I have an index buffer that looks like:
[3, 0, 4, 1, 2, 3]
The first vertex processed in the vertex shader with an indexed draw ...
0
votes
0
answers
75
views
GLSL Program crashing when attempting to include a textured background [duplicate]
I have been displaying animations:
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <cmath>
#include &...
1
vote
1
answer
95
views
Opengl stencil buffer bleeding [closed]
I have an opengl problem but the minimal code for showcase became 450 lines of code so I uploaded it to github instead:
https://github.com/Siamaster/opengltest
What I'm trying to do here is to define ...
0
votes
0
answers
143
views
SDL_GL_CreateContext() fails without an error message
I'm building an OpenGL 4.6 application using SDL3 and GLAD, compiled with g++:
// g++ -Wall -Ofast main.cpp include/glad/glad.c -Iinclude/SDL3 -Linclude/SDL3 -lSDL3 -lopengl32 -o build/program
#define ...
13
votes
0
answers
649
views
Forcing non-exclusive borderless fullscreen with SDL3 + OpenGL on Windows 11
Creating a borderless OpenGL window with SDL3 on Windows at the native display resolution results in the window unexpectedly switching to an exclusive fullscreen mode.
This happens specifically after ...
0
votes
1
answer
74
views
Lightened mesh "ribs" while smooth rendered [closed]
I recently faced a problem I still cannot overcome for the reason I don't understand its nature.
I created a sphere, assigned vertices and normals and indices and built DSA vao (Opengl 4.5). Having ...
1
vote
1
answer
109
views
Can't get GL_NV_gpu_shader5 to work in QT 5 when hasExtension is true
I have the following code, QT doesn't explain how to use extensions like this, like at all (just a default page when you go to QtOpenGLExtension page), so I assume I'm supposed to inherit from it.
//...
0
votes
1
answer
94
views
Legacy OpenGL Display Issue
I am using Legacy OpenGL to make a fish tank:
#include <GL/glut.h>
#include <stdio.h>
float fishPosX = 0.0f;
float fishDirection = -1.0f;
float rotationAngle = 0.0f;
int rotating = 0;
...