38,020 questions
1
vote
1
answer
208
views
TinyGLTF-loaded GLTF file fails to render?
I'm trying to load a GLTF file using TinyGLTF:
#include <tiny_gltf.h>
#include <GL/glew.h>
#include <GL/gl.h>
#include <GLFW/glfw3.h>
#include <vector>
#include <...
3
votes
1
answer
78
views
OpenGL function calls seemingly affecting unrelated data [closed]
I have written some code that prints a pointer "playerFaces" before and after calling some OpenGL functions:
Object* object = game->scene.worldObjects[0];
Face* playerFaces = NULL;
int ...
3
votes
0
answers
140
views
Usage of OpenGL Pipeline in VBA
I am trying to implement OpenGL with VBA in Excel with more functionality than OpenGL 1.1. For that I have basically followed the cherno´s tutorial on OpenGL for C++ and implemented it in VBA.
I was ...
0
votes
1
answer
103
views
Issue with OpenGL Texture Creation for 1066x1600 Resolution [duplicate]
I am trying to load image data using stbi_load into an OpenGL texture object. I've successfully done this in multiple projects, but in my current approach, I’m encountering an access violation error (...
0
votes
4
answers
140
views
Perspective Projection Not Working Properly OpenGL C++ [closed]
I am trying to render a 3D cude on the window and observe the perspective projection.
In the vertex shader when I dont multiply the projection matrix, the cube gets rendered (but you cant observe the ...
1
vote
1
answer
72
views
Does OpenGL provide a way to know if a VAO was "erased" from the GPU?
I am wondering when a VAO ID gets 'erased' from VRAM (and whether the corresponding vertex data is also removed). Is there any way to get a notification from the GPU when it discards a VAO and its ...
0
votes
0
answers
24
views
Writing to a DEPTH24STENCIL8 depth buffer as a RGBA8 buffer from a compute shader [duplicate]
I'm looking for a way to write to the depth buffer directly from a compute shader, I have figured out how to do this, just not how to do it properly, for now, I am binding the depth buffer to binding ...
0
votes
0
answers
32
views
java.lang.NullPointerException at com.jogamp.opengl.util.texture.spi.awt.IIOTextureWriter.write(IIOTextureWriter.java:59)
I'm visualizing the file of 3d flux in xy plane projection from the file like this
VARIABLES="X","Y","Z","U","V","W"
ZONE F=FEPOINT ET=BRICK ...
2
votes
1
answer
134
views
float is overflowing in openGL despite being under 32 bits
float test_1 = 1.79450992e+38;
float test_2 = 127;
float temp = abs(test_1) / exp2(test_2);
float temp_2 = abs(1.79450992e+38) / exp2(127.0);
temp output is 0 and
temp_2 output is 1.05472
temp ...
-2
votes
1
answer
130
views
Unable to handle toggle Full Screen in OpenGL via a Window class
---------Updated---------
I am trying to create a Window class, which can take care of creating a window with basic functionalities such as toggling full screen and binding ESC to close the window and ...
1
vote
1
answer
63
views
Problem with specular lightning artifacts in OpenGL
The problem is specifically when i look at the corners of the room. When i do that the specular lightning gets brighter:
...and when i look at a flat wall doesn't:
Here i post the entire code:
#...
0
votes
1
answer
218
views
Cuda-OpenGL interops thread safety
/* This executes on a second thread */
static void do_progressive_render_gpu() {
for(sample s = 0 ; s < SOMEVALUE ; s++){
updateMeshBuffersPtrs(); //Calls cudaGraphicsResourceGetMappedPointer() ...
2
votes
1
answer
119
views
Context sharing between 2 windows in SFML
When creating 2 windows using sfml, I found out that only either of the window shows the triangle depending on window.setActive() function called in the code below. One of the window is completely a ...
0
votes
0
answers
88
views
Why does the program written in C# using OpenTK display only an empty gray window?
I'm writing a C# program to render three 3D objects: a sphere, a prism, and a hexagonal pyramid, using OpenGL with OpenTK.
The problem is that it doesn't display any errors or exceptions; it just ...
-2
votes
1
answer
88
views
Why GLSL shader program can't link correctly?
For unknown reason GLSL shader program can't link correctly, log is empty. Shaders compiled correctly.
Trying to do:
CompileShaders("Data/Shaders/ui", 0b01, MainUiShader);
...gives an error:...
0
votes
1
answer
178
views
OpenGL program is showing black screen only, while it should be showing a square
Nothing is drawn in the screen.
Only a black window is being shown and no shape or anything.
My laptop doesn't have a dedicated Graphics card, only the integrated one. But it was working fine in same ...
1
vote
0
answers
48
views
What benefit can I get from using GL_MAP_INVALIDATE_RANGE_BIT?
I don't know the aim of setting this bit when we map a buffer. We clearly know whether we're interested in the data in the buffer. So I think it is a bit flag indicating things to OpenGL. But, can we ...
-1
votes
1
answer
196
views
Visual Studio Debugger useful for debugging my OpenGL code?
Is it possible to use the Visual Studio debugger to debug my GLFW/OpenGL code? I get an exception on a glDrawElements() call which provides useless info. Obviously I have not set things up correctly, ...
0
votes
2
answers
88
views
How to properly handle negative values when calculating the difference between two images in OpenGL?
I am working on a project using OpenGL, where the server needs to render two images: a high-quality image and a low-quality image. The goal is to compute the difference image between the two and send ...
2
votes
0
answers
118
views
How do you query an Intel GPU for total memory?
I'm currently getting a GPU's total memory from GL_NVX_gpu_memory_info or GL_ATI_meminfo. However, testing this code with an Intel Arc card neither extension is supported (makes sense). However, ...
0
votes
0
answers
50
views
How can i do an hexagon? VS only shows a triangle
I'm trying to do an hexagon and learn tessellation but when i execute all i can see is a triangle.
I have a Nvidia 4080, drivers up to the date. I already did a check in the libraries and seems that ...
1
vote
1
answer
169
views
Qt and OpenGL: cannot initialize OpenGL VBOs or VAOs after the first call to paintGL?
I am writing a program using Qt5 and OpenGL. It is an interactive 3D environment that allows the user to, at any point, import a number of triangulated meshes (among other things). I was initially ...
0
votes
1
answer
155
views
Unique locations and bindings in OpenGL [closed]
I have been playing out with OpenGL and am a little bit confused about bindings and locations and their indexing.
My thinking is that locations are mostly used for primitives, that can be easily ...
1
vote
0
answers
73
views
Scanline Polygon Filling Issue in OpenGL 3
I'm trying to implement a scanline fill polygon algorithm using OpenGL3, and I'd like the algorithm to calculate the vertices of the line segments that need to be drawn to achieve the filling effect, ...
0
votes
0
answers
88
views
Sending a struct with an array as an SSBO
I am working on a voxel engine in OpenGL and want a way to send my chunks to my shader
I know there are some really efficient methods and data structures out there to send voxels such as Sparse Voxel ...