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
1
vote
0answers
33 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 ...
0
votes
1answer
74 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 ...
3
votes
1answer
46 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
18 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
21 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
54 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
2answers
33 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
40 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
77 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
45 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
58 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
81 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
65 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
0answers
39 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
19 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 ...
0
votes
0answers
15 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: ...
0
votes
1answer
71 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
0answers
50 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 ...
0
votes
1answer
69 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 ...
2
votes
0answers
23 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; ...
1
vote
1answer
53 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 ...
2
votes
1answer
38 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
53 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
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 ...
0
votes
1answer
73 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
62 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
vote
2answers
67 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 ...
1
vote
1answer
50 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 ...
0
votes
0answers
34 views

Calculating the intersection of two volumes

What is an efficient way to calculate the volume of intersection of two arbitrary volumes described as closed surfaces? That is, with two meshes, A and B, how do I calculate the intersection of A and ...
1
vote
1answer
63 views

how to change the near clipping plane of a perspective projection matrix for OpenGL

I am trying to only change the near clipping plane of a given perspective projection matrix for OpenGL. My problem is, that the near clipping plane is way too close, and the far clipping plane is very ...
0
votes
0answers
22 views

OpenGL Per-Object Outlining issues

I'm trying to draw onlines around the objects, the outlines for any object should be see though very other object, I've successfully been able to draw the outline but the pixels get discarded in the ...
0
votes
1answer
44 views

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

Is there any directX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan.
0
votes
0answers
24 views

List all faces of a mesh visible from the view of the camera Opengl

as the question suggests I have to identify all the faces that are visible from the camera's view and do some processing with them. I have a single mesh. I am thinking of giving individual faces a ...
1
vote
1answer
132 views

glBlitFramebuffer does not copy all textures

The setup I have a working bloom shader implemented which creates a fbo with two textures attached to it. The first texture holds the entire scene The other only displays objects which are supposed ...
1
vote
1answer
56 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 ...
0
votes
2answers
114 views

Why do Nvidia and AMD have to update their drivers for game releases?

I like to know the technical aspects of it. Game developers use APIs like OpenGL or DirectX. The functions provided by these APIs, I would assume, work flawlessly with all graphic cards because they ...
1
vote
1answer
57 views

How to use trackball for rotating an camera matrix in eye frame

I have a QOpenGLWidget where I use camera transformation matrix(4,4), FOV and vectors Position(4), Up(4), Forward(4). I also have an ArcBall which I can use. I managed to implement zoom and pan by ...
0
votes
0answers
50 views

Constructing relatively big point clouds from two images

I apologize in advance for this question asking for a recommendation, but I'm not so advanced in CG to research this topic myself. Basic problem I'm looking for a most suitable approach to render a ...
0
votes
0answers
42 views

OPENGL NURBS in VBA

I'm coding OPENGL with Excel VBA I'm using arkham46 package which is really great: Découvrez la 3D OpenGL 1.1 en VB6/VBA | arkham46.developpez.com I'm not able to display NURBS surfaces, only NURBS ...
0
votes
1answer
79 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
1answer
42 views

How can I bind my texture in the correct orientation?

I have successfully completed a working program that draw a rotating sphere with a map of the world as the texture, simulating the earth in space. However, the texture is bound on it's side, i.e. all ...
0
votes
2answers
138 views

How to calculate vertex normals on a mesh with non-planar polygons

If I have a mesh consisting of polygons that are not necessarily triangles and not necessarily planar. As answered in the previous question I asked, there's no correct answer to calculating normals ...
0
votes
1answer
69 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 ...
2
votes
1answer
955 views

Performance difference in OpenGL compute shader vs Vulkan Compute Shader vs Cuda/OpenCL and others

I have been told there is no performance difference if you are skilled enough when it comes to gpu computing. And cuda only performs better because nvidia wants it to. I have also read graphic api's ...
1
vote
2answers
114 views

Is there an efficient way to achieve color blending in compute shaders?

What I want is a function like imageStore, but instead of replacing a value - applying a blend operation to it, e.g. addition. It is not possible to do something ...
0
votes
1answer
57 views

My OpenGL program is not drawing filled polygons

I'm trying to learn OpenGL in c++ (I used it in Java) but I have a problem, I make a triangle, but it doesn't draw on GL_FILL and in GL_LINE it just draw a line, I can't find my mistake, I guess my ...
0
votes
2answers
225 views

Does Vulkan have the equivalent of OpenGL's separable shader program and pipeline?

If you have a shader pipeline in OpenGL that goes something like the following: ...
1
vote
1answer
590 views

Understanding fragment shader coordinate system

I'm trying to create an infinitely panable grid using fragment shaders (C++/OpenGL/GLSL), and I'm having a bit of difficulty understanding the coordinate system. This is my fragment shader code, ...
2
votes
1answer
31 views

Understanding inequality to equality in the Hartmann & Gribbs frustum planes extraction method

I've been reading this article on how to extract the plane equations from the view and projection matrices. And I can understand most of it. However, the only thing that is unclear to me (and that ...

1
2 3 4 5
13