38,017 questions
-1
votes
0
answers
42
views
Honeycomb pattern GLSL
I want to make a honeycomb,
now with this code
but I have a problem that when the thickness of the honeycomb line is reduced, they are almost invisible.
line=1
At the same time, everything is fine at ...
-3
votes
1
answer
70
views
Should I reorder triangle vertices depending on their position to ensure correct winding (CW/CCW)?
I draw triangles in OpenGL using DrawArrays():
public void DrawTriangle(
Vector2 a,
Vector2 b,
Vector2 c,
ShapeOptions shapeOptions = null)
{
shapeOptions ??= PresentationConsts.Shape....
Advice
0
votes
2
replies
64
views
UI Element Detection
I am implementing a UI library, and I want to implement pixel-perfect hit detection.
For example, if a UI element is a red ellipse, when I click on a red pixel, I want a click event to be emitted; ...
0
votes
0
answers
159
views
Very strange errors in OpenGL regarding shaders [closed]
The draw function is returning an error 2182. I am failing to figure why.
Here is my main file:
#include <GL/glew.h>
#include <OpenGL/OpenGL.h>
#include <include/GLFW/glfw3.h>
#...
2
votes
2
answers
82
views
Window goes black when enabling GL_DEPTH_TEST?
I have a problem that my window:
// gcc -o minimum main.c -lglut -lGL
#include <stdio.h>
#include <unistd.h>
#include <GL/gl.h>
#include <GL/glut.h>
extern void ...
Advice
0
votes
6
replies
89
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 ...
0
votes
0
answers
57
views
wrong transformes for model loaded with assimp in opengl
Im trying to apply the model's transforms by walking the node heirarchy, but the poses are wrong (im not trying to animate it, just load it in a pose by using the transforms given in the gtlf file)
...
1
vote
0
answers
59
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 ...
Advice
0
votes
3
replies
147
views
How do I draw a line using triangles in OpenGL?
In my code, I useing draw line to draw model selection line and error edge line ,useing draw triangle to draw 3D model.
Using the model's openmesh handle, edges are recorded and drawn.
...
-3
votes
0
answers
83
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 ...
Advice
1
vote
2
replies
197
views
How do I create a raycast in C++ for a game
I have been making a 3D game from scratch using opengl and C++ and I want to know how I can make a ray casting class in C++ for my game where I can call it when ever I need to, to check for things ...
0
votes
1
answer
93
views
SDL3 + OpenGL in c++ is thowing empty SDL_Init erros when making a window in Wayland [duplicate]
I have installed the packages that I need (as far as I know), and the window throws an empty error when I run it.
Output is:
/home/bence/Programming/cpp/game1/cmake-build-debug/game1
SDL_Init Error:
...
3
votes
2
answers
91
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 ...
1
vote
1
answer
99
views
Non-uniform access by indexing vs non-uniform access from a switch case or if-else statement
This question is supposed to be in the most general sense possible, this is because I'm using the Slang shading language to apply potentially to multiple graphics APIs.
In OpenGL and Vulkan the ...
0
votes
0
answers
40
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 ...