As of May 31, 2023, we have updated our Code of Conduct.

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
1 answer
35 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
0 answers
46 views

calculate Gouraud shaded normals after tessellation

I have a triangulated geometry where the vertices are modified by a 3D Perlin noise + Curved-PN triagles algorithm within the Tessellation Evaluation Shader. How can I calculate the normals for the ...
Thomas's user avatar
  • 854
0 votes
1 answer
25 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
52 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
84 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
0 answers
30 views

Given 2d control points, how to write a vertex shader that evaluates a cubic bezier curve?

I need to write a program that evaluates a cubic bezier curve, using threejs and vertex shader. I tried to calculate the bezier curve based on the x axis and the control points using the cubic bezier ...
Jonas's user avatar
  • 111
0 votes
1 answer
70 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
73 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
0 votes
0 answers
32 views

Why do I get a black scene in OpenGL in Python?

I'm building a scene: a cylinder, and a torus and an icosahedron spin around it, enter the fog and exit the fog. Using a file with a fog texture (any). However, I get a black scene at the exit - why ...
Alex_Kazantsev's user avatar
3 votes
0 answers
45 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
43 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
41 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
169 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
22 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
49 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
  • 854
1 vote
0 answers
50 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
2 votes
1 answer
129 views

How does Unreal Engine 5's Lumen (most likely) implement reflections?

In this YouTube video, the creator mentions that reflections in Unreal Engine 5's Lumen "work by tracing the path of light as it bounces off of surfaces in the game world." Does this mean ...
HelloGoodbye's user avatar
0 votes
1 answer
57 views

Do GL compute shaders trigger TDR if they crash. Not just timeout?

I'm getting a TDR trigger after 4ms with a GL4.3 compute shader. tdrDelay is currently set to 30 secs, this obviously isn't long enough to get a timeout with the default Windows 11 tdrDelay value let ...
lfgtm's user avatar
  • 391
0 votes
0 answers
27 views

OpenGL 3.0 is not supported by the OpenGL driver - RizomUV

I have a problem with RizomUV 2022.0. When the program starts, it comes up with pop-up "OpenGL 3.0 is not supported by the OpenGL driver", so I can't import any geometry and work. I'm ...
Bohdan's user avatar
  • 1
0 votes
0 answers
23 views

What happens when we select lower resolutions on a high-resolution monitor?

I have a monitor with a resolution of 1360x768 (16:9), When I set the resolution to 1280x768 (5:3), 1024x768 (4:3), 800x600 (4:3), even 1920x1080 (16:9) it completely covers the screen and the monitor ...
Ehsan's user avatar
  • 1
0 votes
1 answer
163 views

Raytracing in OpenGL or Vulkan?

I was looking at this glass ball rendering with an image inside of it (zoom out to see the glass ball), and noticed that it looks like they simulate the refraction of light as it crosses from inside ...
HelloGoodbye's user avatar
1 vote
1 answer
186 views

Which coding strategies exist to handle opengl texture size limit?

I recently hit the roof for maximum texture size for my opengl implementation (GL_MAX_TEXTURE_SIZE contains $3379$) when I wanted to create a texture for a 4k resolution video frame ($3840 \times 2160$...
mathreadler's user avatar
0 votes
1 answer
49 views

Does OpenGL allocate on glBegin/glEnd?

You can enclose arbitrary amount of vertices within glBegin/glEnd statements. Does OpenGL limit the number of vertices you create or it allocates memory for more?
user avatar
1 vote
1 answer
33 views

Query the size of an array of non-basic types using interface query in OpenGL

Consider the following code in an OpenGL shader: ...
facetus's user avatar
  • 113
0 votes
0 answers
32 views

Opengl binding different mipmap levels of same texture2darray for use in compute shader. How to handle variable nr of levels?

So I want to make a compute shader that uses a coarse-to-fine approach. As I have learned about open gl mipmap levels it seems they could be very useful. However the only binding method which I have ...
mathreadler's user avatar
0 votes
0 answers
38 views

Loading Gltf model pbr texture produces insane results

I built a gltf-viewer on my own, but the functionality for loading glf was implemented by referencing gltf-viewer-tutorial, the result is not correct. Below is my ouput for ToyCar.gltf . The ouput of ...
Xinyu Cui's user avatar
1 vote
1 answer
81 views

How can I test my GLSL code on different hardware?

I've written a game engine in OpenGL and developed it on my computer with an NVidia GTX 1060. I'm now ready to start releasing it into the wild but I'm worried about hardware issues. I compile my ...
JHall's user avatar
  • 57
0 votes
1 answer
71 views

How to properly create textures using DSA for ImageTexture in OpenGL

For the old approach, generating a texture for the ImageTexture for compute shaders would look like this: ...
Liyuu_'s user avatar
  • 9
1 vote
1 answer
49 views

convert right handed matrix into left handed forward/up/right vectors

I have an openGL style matrix (column major, right handed ) that needs to be converted into two vectors (forward and up) I've managed to find, in a weird way, a solution that matches the the ...
ytrox's user avatar
  • 31
0 votes
0 answers
37 views

Best practice for per-vertex updates for mass-spring simulation?

I am new to graphics and physics simulation. I am trying to perform a mass-spring simulation on CPU on individual vertices inside a mesh, and wondering how to best handle this. If working with a rigid ...
Vendorf's user avatar
0 votes
1 answer
31 views

Where does the OpenGL driver get the glGet values from?

I know that the OpenGL driver is implemented by hardware vendors, so this questions may not have a consistent answer. If I use one of the glGet methods, does OpenGL get the information from the GPU or ...
Thomas's user avatar
  • 854
1 vote
1 answer
58 views

GLSL trying to bind two different layers from the same texture array as images. Should it work and if so what am I doing wrong?

I am new at this particular site in the SE ecosystem, but not to computer graphics in general. If I'm in the wrong spot feel free to redirect me. My question regards glsl programming and binding two ...
mathreadler's user avatar
1 vote
1 answer
100 views

Best way for rendering Voronoi diagram from Delaunay graph mesh

I have a set of points, which I triangulate to a Delaunay graph to make a mesh. Every mesh vertex has a unique colour, and I can render it without any problem. But I want Voronoi rendering to be ...
Frank Soll's user avatar
0 votes
1 answer
27 views

Why shouldn't I discard faces during Tessellation control stage

In the discussion Here there was said, that discarding faces during Tessellation stage should be avoided. What are the reasons for that? Right now, I am rendering a 3D geometry using Vertex, ...
Thomas's user avatar
  • 854
1 vote
1 answer
40 views

Why does my uniform only update once?

I have a work thread function which updates the value of a float called scale: ...
lewis's user avatar
  • 21
0 votes
1 answer
140 views

Why are my OpenGL mipmaps and MSAA bad?

Questions: Why does the wavy white line on the tennis ball texture seem to be at the wrong mip level, with blocky artifacts ? For example, at 'A' in the picture. The basketball and football textures ...
Simon's user avatar
  • 153
1 vote
1 answer
228 views

How to instanced and indirect render geometry [OpenGL]

I've a lots of objects, which have the same geometry. Right now I am using instanced rendering to render these objects. This is working very well. But I am trying to increase the performance of the ...
Thomas's user avatar
  • 854
2 votes
1 answer
287 views

OpenGL and GLUT in x64 on Windows (Visual C++ 2019)

I'm just starting to self-learn OpenGL. I have OpenGL A Primer (2nd edition) by Edward Angel and I found this useful site for setting up OpenGL with Visual Studio 2019 on Windows: https://www....
Dave's user avatar
  • 121
2 votes
1 answer
34 views

Opengl Texture top row pixels are garbage

This code displays a white texture always except when the dimensions are 383 x 512 ...
ihsan's user avatar
  • 131
0 votes
0 answers
56 views

Shadow mapping with non-directional light

I'm new to openGL and I was following this tutorial in which they showed how to make shadow maps but I could't understand how to get it to work for non-directional lights. They have some instructions ...
n-l-i's user avatar
  • 101
3 votes
0 answers
142 views

What are some good examples of post-processing edge detection?

I'm trying to implement a post-processing pass to detect silhouette-edges from depth data. (by silhouette-edge of a triangles mesh I mean the triangle edges shared by a front and a back-facing ...
leone ruggiero's user avatar
0 votes
0 answers
47 views

importance sampling in AO

I have a fairly strong background in maths and I'm having troubles grasping why in every single paper about SSDO, the sin term for integrating over the hemsiphere is dropped. for instance in the below ...
Sina Dasht's user avatar
0 votes
1 answer
187 views

Do bindless textures overcome the limit of GL_MAX_TEXTURE_IMAGE_UNITS?

When I have an array of samplers, for example: uniform sampler3D RHToBounceGridR[MULTI_BOUNCES_NUM]; where MULTI_BOUNCES_NUM is ...
narthex's user avatar
  • 2,079
0 votes
1 answer
88 views

Am I risking damaging my GPU?

I have written a relatively simple interactive C program using OpenGL 4.4 with a vertex shader and a fragment shader, running in the CodeBlocks IDE on Windows. I included an FPS counter basically as ...
Simon's user avatar
  • 153
0 votes
1 answer
70 views

Identifying an openGL 3d model

I currently have an application that uses openGL in order to render a 3d model of a car. I would like to change the car models but I have no clue what format my application uses. The current format of ...
Hyperdex's user avatar
0 votes
1 answer
42 views

OpenCL WorkGroupSize compared to OpenGL compute shader WorkGroupSize

I've read, that OpenCL kernels are grouped like OpenGL compute shaders. That means, that you can define how many invocations should be executed within a workgroup. These invocations which are in the ...
Thomas's user avatar
  • 854
-1 votes
1 answer
239 views

Is a line drawn using vectors, triangles or polygons within OpenGL? [closed]

Trying to understand how OpenGL generates what is seen as images & graphics and these questions come up. Are 3D lines (which should be drawn using vectors) drawn using triangles or polygons? Or ...
AncientTides's user avatar
0 votes
1 answer
208 views

OpenGL compute shader workgroup synconization

I am calculating the Summed Area Table(SAT) of a texture with help of a compute shader in OpenGL. The texture which needs to be summed, has a dimension size of more than my GPU supports (...
Thomas's user avatar
  • 854
1 vote
0 answers
136 views

Silhouette edge detection alternatives to Sobel

I'm trying to implement a silhouette detection algorithm in post-processing. I've come across solutions based on Sobel/Roberts cross/... filters and I was wondering if there are more accurate ...
leone ruggiero's user avatar
0 votes
1 answer
69 views

OpenGL - How to increase view space coordinate range in X and Y axis

I'm trying to render some objects but apparently X and Y coordinates need to be really small in-order to get something on screen. See this example of 2 lines The world space coordinates for these ...
gallickgunner's user avatar

1
2 3 4 5
15