Questions tagged [opengl]

OpenGL (Open Graphics Library) is a graphics standard and API which is platform-independent and available for desktop, workstation and mobile devices. It is designed to provide hardware-accelerated rendering, and hence gives greatly improved performance over traditional software rendering. OpenGL is used for applications like CAD software and computer games. The OpenGL standard, as well as OpenGL ES, is controlled by the Khronos group.

Filter by
Sorted by
Tagged with
2
votes
1answer
560 views
0
votes
0answers
21 views

SSAO with reconstructed depths yields strip artifacts

I wrote an ssao algorithm with compute shaders and view-position-reconstruction from the depth buffer. It works great for objects near by but results in strip or banding artifacts for large planes ...
0
votes
1answer
115 views

Efficiently transferring only needed parts of the vertex data to the GPU (C++/OpenGL)

I have a situation, where I have an array of vertices on the CPU side, for which, besides rendering-relevant data, like their position, I have a lot of other data at each vertex. All vertex data is ...
0
votes
1answer
69 views

Keep constant number of visible circles in 3D animation

I have created a 3D animation with a perspective projection of white circles moving randomly in a fake 3D space projected on a 2D computer screen (GIF 1). Since I need to keep the same number of ...
2
votes
1answer
214 views

What are the type constants that the documentation for glGetProgramResourceiv() refers to?

Quoting the Khronos OpenGL documentation pages for the glGetProgramResourceiv() function: For the property GL_TYPE, a single integer identifying the type of an ...
0
votes
1answer
27 views

If a GPU supports OpenGL ES 3.2, does it also support OpenGl 3.0?

At the moment I am looking for a tablet to use the bike simulator app "BKOOL". The Samsung Galaxy Tab S6 Lite is my current favorite and it meets almost all app requirements (https://www....
3
votes
0answers
58 views

Renderdoc reports incorrect OpenGL API usage, can't figure out why

I'm rendering some UI using an immediate-mode UI library, so each frame it produces some meshes, which I then load into buffers and render, only to get some strange errors from Renderdoc: You can see ...
1
vote
1answer
112 views

Problem using Decaling with Stencil to avoid Z-fighting

I need to create a decaling into a surface like a mesh, and to avoid Z-fighting I've been using Stencil Buffer to Turn-off depth test and make the decaling over the surface the Stencil Op permits. In ...
2
votes
2answers
81 views

How does a Vertex Buffer manage memory?

I'm learning OpenGL and I'm trying to understand things properly. If my understanding is incorrect at any point, please correct me. Introduction So let's say we have a triangle. This triangle has its ...
3
votes
1answer
36 views

How to Achieve Radial Rendering

I'm making a POV fan and would like to display some simple graphics in real-time on it. I have a working naive solution with OpenGL, but I'm maxing out at 7 fps rending a simple cube on a raspberry pi ...
0
votes
1answer
310 views

Unity: Pass texture pointer from OpenGL to Unity

I'm working on a scene in Unity where I have textures loaded at runtime. As a result of that, the scene is being slowed down (even with co-routines), so I thought maybe I could move the texture ...
0
votes
1answer
543 views

Drawing a cube and wireframe opengl

I'm trying to render a cube and it's wireframe together using OpenGL The main function is this: ...
0
votes
1answer
92 views

How to render fog in OpenGL

I have a simple question just because I can’t find any good example in the internet. How to create fog without using particles? How to make for with different density on different locations and in ...
1
vote
1answer
93 views

OpenGL transparency - object behind is not rendered

I'm trying to implement voxel world using OpenGL (Core 3.3). I've come across a problem with transparency. It looks like sometimes GPU decides to not render stuff that would be important. Can you help ...
0
votes
1answer
82 views

OpenGL state management

I am working on a software with lots of different shaders, which require different states in OpenGL. My problem is the following: The different models with different shaders are not rendered in the ...
0
votes
1answer
88 views

Trying to understand how to render a volumetric point light

My goal is to render a volumetric point light as explained in this book's chapter 10: FGED Rendering The book explains the math pretty well, but I'm not sure I understand what is the required setup ...
1
vote
0answers
47 views

"Interleaved rendering" in fragment shader

Intro I'm trying to render multi-channel images (more than 4 channels, for the purposes of feeding it to a Neural Network). Since OpenGL doesn't support it natively, I have multiple 4-channel render ...
3
votes
1answer
81 views

Compute Shader shared average value

Short Question: How can i integrate a buffer variable in a compute shader over each pixel i.e. how can i ensure memory coherence in such a case? Long Question: I've written a deferred renderer with ...
0
votes
1answer
26 views

How OpenGL handles assigning the same state multiple times in a row

I wonder what happens when functions that change OpenGL states, ex glBindVertexArray or glBindTexture are called with the same ...
-1
votes
1answer
29 views

Passing non-interleaved data to glBufferStorage without using glBufferSubData

I would like to use glBufferStorage to load data once into the vertex buffer. However sometimes I want to pass non-interleaved data from separate arrays like shown ...
1
vote
1answer
148 views

PNG textures render correctly in Blender, but not in OpenGL program

I've been following the OpenGL tutorials from ThinMatrix and I've been able to load and render his stall.obj model along with his stall.png texture just fine. But when I try with my own models and ...
0
votes
1answer
492 views

Translate an arcball camera upwards or left-right

This problem is giving me a really hard time. I'm always looking at the origin and have a camera that moves around it in an arcball mode. That part works beautifully: I'm calculating the camera ...
0
votes
2answers
41 views

glsl passing data array from vertex to tessellation control shader

I am trying to pass a vec3 array from vertex shader to tessellation shader. passing just one value works fine, but how to pass an array? Vertex shader ...
0
votes
1answer
44 views

optional geometry shader

I am looking for an easy solution for passing information between shader stages when adding additional shader stages. Right now I am using the "out" keyword to pass data from for example ...
1
vote
1answer
79 views

Stripping unnecessary data from C++ data structures before sending to GPU

I've recently been working on a particle system in my renderer and I've encountered a situation where my particle class on the C++ side has data I need to maintain my particle on that end, but that I ...
1
vote
1answer
57 views

Mesh-Shader and layered rendering

In the usual pipeline (vertex, tessellation, geometry and fragment shaders) the geometry can be deformed and in the geometry shader it is possible to copy the generated and deformed geometry in order ...
0
votes
2answers
63 views

Is BSP the right tool for my game?

I am brushing up on the fundamentals of OpenGL. Things are going great. I am looking at BSP for maps/levels. I understand that Doom uses BSP, but I worry. Can BSP be used with complete 3D world and ...
1
vote
1answer
104 views

What is the Viewport?

Can someone please explain to me what the Viewport is. I've read the OpenGL wiki and doc.gl but they give me a definition that I don't understand at all. The definition they gave me is "...
0
votes
1answer
102 views

OpenGL on mac gives me an error when calling glGenVertexArrays

I have been developing a c++, openg, glfw3 and GLEW project on ubuntu and everything has worked so far. Recently I moved to a mac computer (chip M1 if it's important) and things stopped working. I ...
1
vote
1answer
58 views

is doing transform feedback while rendering vertices not possible?

I've written a program that uses OpenGL and GLFW to display some simple geometric shapes. I'm now trying to add some transform feedback capability to it and I find that as soon as I do so, the program ...
0
votes
1answer
80 views

rendering a triangle has no color

I wrote a program to render a simple triangle with colors, the triangle is there but there's no color. ...
0
votes
0answers
69 views

opengl and glxinfo

I have a question about reading glxinfo. I'm running a Fedora 31 virtual machine. When I look at glxinfo (using softpipe) with this command: ...
0
votes
1answer
20 views

Unexpected INVALID_OPERATION on glClearNamedBufferData

Under OpenGL 4.5 on AMD RENOIR (DRM 3.40.0, 5.10.56-1-lts, LLVM 12.0.1), running ...
6
votes
0answers
892 views

OpenGL texelFetch causes black stripes

THE SHORT VERSION In my fragment shader I'm reading (using texelFetch) multiple times the same texel from a texture (created by another fragment shader) and write it to the output render buffer. ...
0
votes
1answer
74 views

Opengl geometry shader input point to output point doesn't show any ouput

I am trying a simple passthrough just to get a feel for the geometry shader. I am taking in a single point and trying to output that point from the geometry shader, it works with the vertex and ...
0
votes
1answer
77 views

OpenGL blending with the screen

I don't understand how OpenGL performs the blending of a texture on the screen. By default, the clear color is set to (0, 0, 0, 0). If we use the default blending equation GL_SRC_ALPHA and ...
0
votes
0answers
17 views

openGL plotting point to window not using glutDisplayFunc(your_func)

I want to plot complex data points to a window to display. I know how to do it all in one go: ...
2
votes
2answers
2k views

Debugging tools for OpenGL on macOS

I am porting some code from Metal to OpenGL since we want to run our app on Windows too. Xcode is my preferred IDE, but the newer versions of Xcode do not support any OpenGL debugging. Question: What ...
0
votes
0answers
51 views

Dark line artifact along edges of the shaded mesh

I have implemented an algorithm to calculate vertex normals by taking the normalized average of all its adjacent triangles. I have subdivided a cube two times with catmull clark and checked the ...
2
votes
0answers
27 views

OpenGL invalid location when using a literal value in C++, but works when using glGetUniformLocation before

I have a call glUniformMatrix4fv(42, ...other parameters...) with a shader that has layout (location = 42) uniform mat4 someMat; ...
2
votes
1answer
40 views

why is reported screen size smaller than display size with GLFW full screen window

I'm using GLFW to create a full screen GL application. I'm running it on my Ubuntu 20.04 laptop that has a typical 1920:1080 display, at least that's the screen resolution reported under Settings->...
2
votes
1answer
58 views

Techniques to implement a glow that encompasses a volume

I have an old renderer from years ago written with OpenGL immediate mode. I've decided to learn Vulkan and I'm converting my old project as a way to learn the new concepts. One of the things my old ...
0
votes
1answer
79 views

Simulate projection matrix deformation in two camera setup

For educational purposes I'm trying to simulate what a scene would look like with a perspective matrix deformation (before everything is brought to NDC) but I'm unsure how to do this. I'd like to do ...
2
votes
1answer
72 views

Problem when performing IFFT for Tessendorf's ocean waves

I am implementing Jerry Tessendorf's ocean waves as described in his paper in c++ and OpenGL. I implemented two compute shaders, one for the h_tilde_0 and its conjugate, and one for the frequency ...
-1
votes
2answers
647 views

How can i wrap the earth image around a 3D Sphere using OpenGL, GLFW, GLAD, GLM?

Please help me out with this thing and currently i am a little more than a beginner so please tell me in that context. i don't need any obsolete methods for creating this like using GLUT or GLEW.can ...
0
votes
0answers
41 views

How widespread are T-vertex artifacts nowadays?

As far as I know, OpenGL specifies that you cannot rely on precise rounding of vertex and edge coordinates for rasterization - which means that T-vertices may cause small artifacts: a continuous and a ...
6
votes
3answers
10k views

How to do error handling with OpenGL?

Whenever I make semantic or syntax errors in OpenGL, either I get a black screen or the program crashes. I looked up on internet on how to do error handling in OpenGL and in the documentations I found ...
1
vote
2answers
77 views

Reducing Cascaded Shadow Mapping Artifacts

I've been trying to get my cascaded shadow maps looking right for a while. I managed to fix the shimmering and most of the quantization artifacts, but for some reason the shadows still look really ...
0
votes
1answer
46 views

DirectX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan?

Is there any directX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan.
1
vote
1answer
59 views

Why are degenerate triangles rasterized when using GL_LINE polygon mode

I have made use of degenerate triangles when rendering a mesh. While the degenerate triangles are not rasterized when using GL_FILL polygon mode, they are when I do ...

1
2 3 4 5
13