Skip to main content

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
0 votes
2 answers
68 views

How are surface normals dealt with in the graphics pipeline?

I know the process for regular vertices is something like: model coordinates to clip space via the "MVP" matrix transformation, then perspective division, screen-space mapping, and finally ...
Scene's user avatar
  • 157
0 votes
0 answers
35 views

Is there a more extensive collection of OpenGL materials? [closed]

I develop a modeling program where users can choose from a set of predetermined OpenGL materials or enter their own custom materials. I would like to expand the list of predetermined materials ...
Rob McDonald's user avatar
0 votes
1 answer
34 views

How are these two projection matrices related?

I have two 3D perspective projection matrices $A,B$ with standard projection parameters $k=\cot(\theta/2)$, where $\theta$ is the field of view, $n$ is the $z$-near value, $f$ is the $z$-far value, ...
Scene's user avatar
  • 157
2 votes
1 answer
30 views

Possible reason for buffer orphaning being faster than using glBufferSubdata even when changing the size of that data?

I recently conducted an experiment, where a large scene was split into two types of mesh data - static (the terrain) and dynamic (lots of low poly trees). I evaluated two memory layouts and update ...
rbaleksandar's user avatar
0 votes
0 answers
9 views

DrawArrayInstanced is not rendering what it should (OPENGL)

...
EnVadeh's user avatar
0 votes
0 answers
25 views

Is it possible to use OpenGL ES extensions in OpenGL? If not, why?

I've been looking at KHR_texture_compression_astc_hdr for OpenGL. It seems it's only currently supported by OpenGL ES 3.2. My GPU is an Nvidia RTX A3000, which does ...
Cascades's user avatar
  • 113
1 vote
1 answer
43 views

In perspective projection matrices, why isn't $z_\text{eye}$ mapped linearly to NDC?

As far as my understanding goes, in projection matrices $x_\text{eye}$ and $y_\text{eye}$ are mapped linearly to NDC by first using proportions to find $x_n = \frac{n\cdot x_e}{-z_e}$ and $y_n = \frac{...
blvck_mvgic_dot_exe's user avatar
1 vote
0 answers
33 views

Projecting a texture onto UVs with GLSL

I am trying to project an image overlayed on top of a mesh in screen space back to it's uvs. The UV triangles do not always cover entire pixels so i get this. The red is showing where the texture is ...
Dusan Bosnjak 'pailhead''s user avatar
0 votes
1 answer
33 views

Getting linking error while testing to add vulkan shaderc in my project

CMakeLists.txt find_package(Vulkan REQUIRED) target_link_libraries(${PROJECT_NAME} INTERFACE Vulkan::Vulkan) in my shader.cpp ...
GloriousDemonFist's user avatar
0 votes
1 answer
42 views

Who does the actual drawing when I call openGL draw API?

I am sorry if the question is too basic but I am just starting with the graphics library. My question is when I invoke draw API in openGL who does the actual job of drawing/coloring of the actual ...
Himanshuman's user avatar
2 votes
0 answers
19 views

glMultiDrawArraysIndirect is not drawing anything

This code works: ...
Mason Hawver's user avatar
0 votes
0 answers
31 views

Opengl Color Alpha is not working

Hi iam follwoing the cherno Game Dev series but with 3D Engine in mind iam at point where i cant figure out why is the alpha of the color not being affect when i try to change the alpha color texture ...
GloriousDemonFist's user avatar
0 votes
1 answer
98 views

Preferred GPU API to use for Steam Deck, Windows, Linux and MacOS support

Good people of the graphics SO community, I am new to Graphics programming or GPU programming in general but I have been a game dev enthusiast for over 4-5 years. I started learning about Graphics ...
Prav's user avatar
  • 101
1 vote
1 answer
79 views

OpenGL Bind same buffer as VBO and SSBO at the same time

I have created a too large buffer with some vertex data (position, normal vector...). Within the render pipeline, I want to append new data to the end of the currently used buffer. To do this, I ...
Thomas's user avatar
  • 1,285
0 votes
1 answer
59 views

Create a tight frustum around a 3D model bounding volume

Tight frustum I intend to create a tight frustum around a 3D model: I have these variables: Inputs: 3D model bounding box or bounding sphere or bounding volume. To be determined: Eye distance and ...
Megidd's user avatar
  • 133
0 votes
0 answers
40 views

Can anybody give me an example of how to use ARB_sparse_texture and ARB_sparse_texture2?

I am trying to support hardware sparse virtual texture in my little engine but I found that there are almost no examples on the internet. Can anybody provide me with a little example to illustrate the ...
tigertang's user avatar
  • 101
0 votes
2 answers
176 views

how to check if all the faces face outward

Situation: I am using Open3D python,The mesh generation algorithm ( like ball pivot, poisson reconstruction ) are dependent on normal direction. I used ...
uk2797's user avatar
  • 1
1 vote
0 answers
34 views

How can you tessellate degenerate triangles evenly?

If you use the tessellation shader for triangle patches, you can only set the following four values to define the tessellation structure of the triangle: ...
Thomas's user avatar
  • 1,285
0 votes
0 answers
52 views

OpenGL hash vertices by position does not work on shared tessellated edges

I have a triangular mesh with common vertices (VBO and EBO/IBO) that contain the normal vectors. If I tessellate this mesh, the subdivision of the triangle edges of neighboring triangles has the same ...
Thomas's user avatar
  • 1,285
2 votes
1 answer
124 views

OpenGL - Compute Shader - How to set local_size

This question is about the best strategy to choose a local_size in OpenGL's compute shader. The application is a Lattice Boltzmann Method (LBM) with a number of cells ranging from 100,000 to 1 million....
techwinder's user avatar
0 votes
1 answer
112 views

Average luminence and auto exposure algorithm not seeming to work properly

I've been working on adding HDR rendering, auto exposure, and tone-mapping to my rendering engine, following this blog post for doing auto exposure and it sequel as well as a few side resources for ...
Alexis Purslane's user avatar
0 votes
2 answers
81 views

Can I "recreate" vendor-specific OpenGL extensions?

For example: I have an AMD graphics card, can I "recreate" Nvidia's OpenGL extensions? And vice versa? By "recreate" I mean to write my implementation in some way. In general, how ...
deaqsly's user avatar
1 vote
0 answers
55 views

Animation issue using BVH data in OpenGL

I’m currently working on a project involving animation programming using OpenGL and BVH (Biovision Hierarchy) data for animation, and I am trying to get my head around it. I’ve run into some issues ...
blov's user avatar
  • 11
1 vote
0 answers
35 views

Why does my implementation of a sinusoidally time-varying color work so slowly?

I've been following TheCherno's OpenGL tutorials and I got to the point where I could render a square by using an index buffer. Now I wanted to vary the color of the square by using $$\frac{\sin(t) + ...
Doobius's user avatar
  • 111
-1 votes
1 answer
56 views

How to implement camera translation arround object using gluLookAt?

I'm trying to move my camera around the object, a house, using some keyboard keys and the gluLookAt() function. ...
MasterTJ123's user avatar
0 votes
1 answer
116 views

How to correctly handle rendering of ~600000, arbitrary colored 2D squares with WebGL?

Information I have to render a map, that is rendered as a 2d collection of squares of different color, separated by white lines horizontally and vertically. There may be ~600000 squares surrounded by ...
h4ckthepl4net's user avatar
1 vote
0 answers
43 views

How are multisample samples partitioned in OpenGL, and at which points does interpolation take place?

As I understand it, with glEnable(GL_MULTISAMPLE), glEnable(GL_SAMPLE_SHADING) and ...
Simon's user avatar
  • 183
0 votes
1 answer
57 views

Are stencil buffer dimensions required to match render target dimensions?

I may not need as precise pixel-perfect stenciling as my render target during stencil tested render pass. I could be okay with stencil test happening at half or quarter of resolution to save bandwidth,...
simd's user avatar
  • 115
1 vote
1 answer
297 views

Is it possible to fill in Stencil Buffer programmatically via fragment shader?

I've never worked with stencil buffers, but I'm researching if it is the right tool for my task. Basically I don't understand yet if stencil buffer can only be filled in by some hardcoded rules during ...
simd's user avatar
  • 115
0 votes
0 answers
207 views

Vertex attribute alignment <4 bytes

I know that vertex attributes sourced from vertex buffers in OpenGL need to adhere to the basic alignment requirements of their base types, so e.g. 4 bytes for floats or uints. However, I am unable to ...
Christian Rau's user avatar
0 votes
0 answers
42 views

interpolated normal vectors after tessellation. How to hash patch corner / edge vertices?

I have a 3D geometry (an asteroid) that is to be tessellated with respect to the camera position. Each vertex in the original mesh has a unique position and is stored once (VBO with IBO) In the ...
Thomas's user avatar
  • 1,285
0 votes
1 answer
54 views

Tessellation evaluation shader: vertex duplicates on triangle tessellation

I was very surprised when I ran my tessellation evaluation shader, which only counts the number of vertices through an atomicAdd command. for the following tessellation levels: ...
Thomas's user avatar
  • 1,285
0 votes
1 answer
33 views

OpenGL texture unit bindings - Why is a single texture mapped to both texture units when each are individually assigned?

I am using NVIDIA Nsight to debug my OpenGL state. In the screenshots below: I generate a single texture with the ID 10. I activate ...
William Allen's user avatar
0 votes
1 answer
33 views

Is MultiDrawElementsBaseVertex bound by index type?

With glMultiDrawElementsBaseVertex it becomes possible to render multiple sets of indices in one draw call. When using for instance ...
Reynolds's user avatar
  • 1,283
0 votes
0 answers
45 views

Find good gl_TessLevel for edge distance and edge length

I have a triangular mesh that is read from an ".obj" file and is to be tessellated with respect to the camera position. I try to avoid T-junctions by tessellating common edges with the same ...
Thomas's user avatar
  • 1,285
1 vote
1 answer
300 views

is there an universal way to set a uniform?

so I'm working on a game engine. It's partially python and c++. One part that is currently a pain point is setting the uniforms for shaders. Currently I have to define a behavior for all 50+ methods ...
LemonJumps's user avatar
1 vote
1 answer
265 views

Is glDeleteBuffers/glGenBuffers needed if I want to resize the buffer?

Firstly the VBO was initialized like below: ...
wayright's user avatar
0 votes
1 answer
102 views

How to scale down noise frequency?

I'm making a space game and so far what I have is a system to generate spheres with noise on them, making them planets. I make a sphere, create noise data, write that data to an image file, and then ...
Chillzy's user avatar
  • 11
0 votes
1 answer
69 views

My projection matrix for OpenGL fails on non-symmetric boundaries

Assuming my viewing volume has x coordinates varies from l to r, and y varies from top to bottom, and finally z-axis varies n to f, I derived the following projection matrix: ...
Serilena's user avatar
2 votes
1 answer
405 views

How is the alpha value treated when blending?

I'm struggling with understanding how blending works. Here's what I understand: when I set the following ...
Bartolini's user avatar
0 votes
1 answer
236 views

Can I copy one texture to another perfectly with texelFetch()

Imagine I have two uncompressed, 2D textures A and B with identical sizes and formats. I bind A to texture unit 0, and B to a framebuffer object. If I draw a full-size polygon in that framebuffer with ...
Chifti Saidi's user avatar
0 votes
1 answer
1k views

OpenGL compute local size vs. performance

Does anybody know if using very small local sizes in compute shaders will hurt performance? eg. If I do this in a shader: ...
Chifti Saidi's user avatar
0 votes
2 answers
669 views

OpenGL compute for sizes that aren't a multiple of "local_size"

I've been going round in circles trying to understand OpenGL compute shader "work groups" and it's doing my head in. It's all about as clear as mud. In my compute program I have to set a ...
Chifti Saidi's user avatar
3 votes
0 answers
70 views

Intel UHD extremely slow copy operations

Is there a way to make copy operations such as CopyResurce(d3d11) and glBlitFramebuffer(ogl) on multi-sample resources faster ...
leone ruggiero's user avatar
0 votes
1 answer
90 views

Why can't I get fog on OpenGL?

I am creating a cylinder, and there is fog around it. I can't handle two things: the inner surface of the cylinder, realized as a smaller diameter cylinder, actually gives me just a second cylinder ...
Alex_Kazantsev's user avatar
2 votes
0 answers
50 views

Optimal Command Ordering for CPU/GPU concurrency

I am writing a renderer that uses a deferred clustered shading technique. On the CPU I group lights, decals, and environment maps into 3 seperate clustered structures (functionally, arrays of unsigned ...
J. H's user avatar
  • 21
1 vote
1 answer
199 views

Having trouble rendering entire sphere

I'm working on a program where I need to draw spheres. The method I'm using is creating an octahedron And using tessellation shaders to subdivide it into a sphere, however there is a patch of the ...
Chillzy's user avatar
  • 11
1 vote
0 answers
34 views

How to get back project point cloud from rendered rgbd images by rgbd?

Given a sequence of RGB-D images rendered by blender and the camera parameters for the blender camera(Perspective Projection camera). How can I back project the RGB images with depth map to a RGB ...
Goatz's user avatar
  • 11
0 votes
1 answer
116 views

OpenGL get default depthbuffer

I have an application that uses only the default opengl framebuffer. It is initialized with color and depth buffer. I want to use the depth buffer as a uniform within a shader to access the current ...
Thomas's user avatar
  • 1,285
1 vote
0 answers
71 views

How does changes in vertex data work?

I have been learning computer graphics and for some time and can't seem to wrap my head around one concept. How to handle vertex data changes? Ex. 1. I have a text rendering on a screen. And up on ...
amberbrew's user avatar

1
2 3 4 5
15