Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

I've read that it's possible and better to run OpenCL instead of a Compute Shader, so I've been trying to build a test app where both share a VBO. According to what i've found, step one is creating a ...
Eric W's user avatar
  • 21
Advice
0 votes
3 replies
111 views

I gave a lot of time making a custom sdl2 based graphical engine in c++ and i'd like to move to isometric view rendering. This means being able to display 3d objects and i wonder if I should stick to ...
CdS's user avatar
  • 13
-2 votes
0 answers
69 views

I have .obj files, which I load through trimesh.load, and then I prepare the vertex data and indices. However, PyOpenGL does not seem to draw the mesh correctly through glDrawElementsInstanced (the &...
Lucio's user avatar
  • 1
-3 votes
1 answer
87 views

I draw triangles in OpenGL using DrawArrays(): public void DrawTriangle( Vector2 a, Vector2 b, Vector2 c, ShapeOptions shapeOptions = null) { shapeOptions ??= PresentationConsts.Shape....
Neomaster's user avatar
Advice
0 votes
2 replies
70 views

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; ...
Eilan Laken's user avatar
2 votes
2 answers
93 views

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 ...
Ewok's user avatar
  • 23
Advice
0 votes
7 replies
110 views

I'm currently working on Voronoi polyhedra, and I already have software that generates all the vertices for me, but I haven't got any indexes to draw the polyhedra. I know how to draw polygons and ...
Diabo Veio's user avatar
0 votes
0 answers
67 views

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) ...
Muaaz Khan's user avatar
1 vote
0 answers
64 views

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 ...
Dresult's user avatar
  • 313
Advice
0 votes
3 replies
153 views

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. ...
asdbvvc's user avatar
  • 11
Advice
1 vote
2 replies
228 views

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 ...
ShizamDaGeek's user avatar
0 votes
1 answer
105 views

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: ...
14ohms's user avatar
  • 10
3 votes
2 answers
97 views

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 ...
Zebrafish's user avatar
  • 16.5k
1 vote
1 answer
109 views

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 ...
Zebrafish's user avatar
  • 16.5k
0 votes
0 answers
44 views

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 ...
Julian Varker's user avatar
0 votes
2 answers
198 views

I am trying to generate texture data manually. The texture shows in unexpected ways. So I stripped all to two simple cases for 1x1 and 2x2 texture. When I provide 1x1 texture it is ok, but it is not ...
armagedescu's user avatar
  • 2,417
2 votes
1 answer
63 views

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 ...
Zebrafish's user avatar
  • 16.5k
3 votes
1 answer
161 views

I'm trying to program a simple game in java using lwjgl and OpenGL but I'm not able to render a square to the window. Can someone help? The render function in render class is called evert frame and ...
Klaus Alles's user avatar
1 vote
1 answer
146 views

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 ...
Sijmen Mulder's user avatar
1 vote
0 answers
136 views

I have some code that is supposed to draw a flat rectangle behind a rotating cube. However, the rectangle keeps appearing in front of the cube no matter what I change in glOrtho and glVertex3f for ...
Alistair Leech's user avatar
-1 votes
2 answers
135 views

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 ...
user1785730's user avatar
  • 3,841
2 votes
2 answers
126 views

This is supposed to animate half of a clockwise circle, as though a particle was moving in a circle at constant speed: // gcc simple6.c -o simple6 -lglfw -lGL -lm // Fedora Linux 42 (Workstation ...
user2747939's user avatar
2 votes
0 answers
160 views

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 ...
Ralf's user avatar
  • 379
1 vote
1 answer
48 views

On my NVIDIA GPU these 2 shaders work fine: // VS #version 450 layout(location = 0) in vec4 inPosition; layout(location = 0) out struct { vec2 dummy; uvec4 variableInStruct; } testStruct; void ...
Rahn's user avatar
  • 5,565
1 vote
1 answer
154 views

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 ...
mr grumpy's user avatar
  • 1,591
0 votes
1 answer
146 views

I am creating an application using OpenGL (4.2). By default, the rendering is done on a panel in a window, it works without issues, but the panel can be docked/undocked, which causes the underlying ...
user29880284's user avatar
0 votes
0 answers
55 views

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 ...
Sofiane Benzait's user avatar
1 vote
1 answer
106 views

I am trying to begin working with OpenGL by drawing a quad with the simplest of shaders, but when using GL3 capabilities, I just get a black screen. I wasn't able to really debug this because (a) I ...
Mikhail Dolgopolov's user avatar
0 votes
1 answer
140 views

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 ...
PossibleMaybe's user avatar
2 votes
1 answer
86 views

I'm currently working on implementing a Gribb & Hartmann Frustum Construction algorithm into my 3D game engine for frustum culling, but I find I need more clarification on the transformations ...
bennett's user avatar
  • 63
-3 votes
2 answers
137 views

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 ...
Ayite Dalmeida's user avatar
3 votes
1 answer
96 views

I am trying to draw a kite: ...using glBegin(GL_QUADS): // g++ main.cpp -lopengl32 -lgdi32 -municode #include <windows.h> #include <GL/gl.h> #include <cstdlib> //system #include &...
timmy george's user avatar
1 vote
1 answer
92 views

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 &...
Fomantis's user avatar
1 vote
1 answer
122 views

I'm developing a C++20 application using OpenGL and SDL3, with a window_manager class that wraps windowing and OpenGL state management. Instead of writing separate member functions for each OpenGL/SDL ...
NeKon's user avatar
  • 312
3 votes
1 answer
140 views

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 ...
Zebrafish's user avatar
  • 16.5k
5 votes
1 answer
121 views

In this program the 3 triangles aren't drawn, even when I replace the texture by vec4(0.0f, 0.5f, 0.0f, 1.0f);, trying to draw the third triangle in green: #define GLFW_INCLUDE_NONE #include <GLFW/...
Bertrand125's user avatar
  • 1,054
0 votes
0 answers
75 views

I have been displaying animations: #include <GL/glew.h> #include <GLFW/glfw3.h> #include <iostream> #include <fstream> #include <sstream> #include <cmath> #include &...
Sam's user avatar
  • 494
0 votes
0 answers
78 views

I'm developing a DLL injection tool for an OpenGL application (core profile, version >3.3) to intercept geometry data. I need to call OpenGL functions like glDrawElements and glGetIntegerv from my ...
WanGuang's user avatar
1 vote
1 answer
95 views

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 ...
Siamaster's user avatar
  • 1,007
0 votes
1 answer
108 views

I need to make two independent OpenGL views in one MFC dialog-based window. This views will show different scenes with different shaders and different VAO. It's not difficult to me to make the one ...
javierMarquez's user avatar
0 votes
0 answers
158 views

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 ...
HannesScript's user avatar
1 vote
1 answer
113 views

I'm using OpenGL Pixel Buffer Objects (PBOs) with persistent mapped buffers to asynchronously update textures in my Qt app. In my render loop, I do something like this: void GLWidget::updateTextures() ...
Summit's user avatar
  • 2,328
13 votes
0 answers
704 views

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 ...
Vittorio Romeo's user avatar
2 votes
1 answer
68 views

i'm using bindless textures with glGetTextureHandleARB() + glMakeTextureHandleResidentARB(), and trying to figure out if the handle becomes invalid after calling glTexImage2D() or glTexSubImage2D() (...
J. Doe's user avatar
  • 214
0 votes
1 answer
74 views

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 ...
auraxarr's user avatar
0 votes
1 answer
90 views

I am using a GL_TEXTURE_2D_ARRAY for storing all my textures and was trying to figure out a TextureView system to see individual textures, but when I try to initialize it, it says GL_INVALID_OPERATION ...
AstralHex's user avatar
  • 111
1 vote
1 answer
110 views

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. //...
Krupip's user avatar
  • 5,356
0 votes
0 answers
59 views

I am implementing a 3d renderer in OpenGL. Here is how you would render some 3d models: Renderer3D.begin(camera); Renderer3D.setShader(shader_1); Renderer3D.render(model_1, transform_1); Renderer3D....
Eilan Laken's user avatar
0 votes
1 answer
100 views

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; ...
Draven West's user avatar
1 vote
1 answer
114 views

I need to get back a float[] of vertices which is stored in attrList in vbo in vao. I do: float[] b = new float[vertexCount]; glBindVertexArray(vaoId); long pointer; glEnableVertexAttribArray(0); ...
Maaa aango's user avatar

1
2 3 4 5
761