# OpenGL: Advanced Coding

**URL:** https://community.khronos.org/c/opengl-general/opengl-advanced-coding/29.md

[Latest](https://community.khronos.org/latest.md) · [Categories](https://community.khronos.org/categories.md) · [Tags](https://community.khronos.org/tags.md)

---

## [About the OpenGL: Advanced Coding category](https://community.khronos.org/t/about-the-opengl-advanced-coding-category/34)

<div class="topic-metadata">

**Author:** [@system](https://community.khronos.org/u/system)\
**Replies:** 0

</div>

Advanced OpenGL questions and discussions

---

## [CSM dose not fit 100%](https://community.khronos.org/t/csm-dose-not-fit-100/112640)

<div class="topic-metadata">

**Author:** [@Abdallah](https://community.khronos.org/u/Abdallah)\
**Replies:** 0\
**Last updated:** [August 25, 2026, 4:26pm UTC](https://community.khronos.org/t/csm-dose-not-fit-100/112640 "2026-08-25T16:26:54Z")

</div>

Hi, I just implemented CSM but I found that it dose not fit 100%, I fixed this by multiplying the radius by 2.5, but I want to know that made it not fitting in the first place and if there is a better solution Here are …

---

## [How can I fix shadow edge swimming in CSM ?](https://community.khronos.org/t/how-can-i-fix-shadow-edge-swimming-in-csm/64997)

<div class="topic-metadata">

**Author:** [@somboon](https://community.khronos.org/u/somboon)\
**Replies:** 5\
**Last updated:** [August 25, 2026, 11:34am UTC](https://community.khronos.org/t/how-can-i-fix-shadow-edge-swimming-in-csm/64997 "2026-08-25T11:34:52Z")

</div>

I have successfully implement Cascaded Shadow Map and the result look very good in still shot. But when the camera start moving , the shadow edge are start to flickering/swimming. Right now I just want to fix the trans…

---

## [E8 System Visualization](https://community.khronos.org/t/e8-system-visualization/112589)

<div class="topic-metadata">

**Author:** [@The\_Little\_Body](https://community.khronos.org/u/The_Little_Body)\
**Replies:** 2\
**Last updated:** [August 5, 2026, 6:49pm UTC](https://community.khronos.org/t/e8-system-visualization/112589 "2026-08-05T18:49:38Z")

</div>

Hi, I have begin to read about the E8 space (something similar to the human 4D space { x, y, z, w } but with 8 dimensions instead) I have coded this OpenGL E8 root visualisation that use the {r,g,b,a\] vertex componen…

---

## [Is This Program Legal?](https://community.khronos.org/t/is-this-program-legal/112607)

<div class="topic-metadata">

**Author:** [@Tom\_Sharpless](https://community.khronos.org/u/Tom_Sharpless)\
**Replies:** 2\
**Last updated:** [July 28, 2026, 8:41am UTC](https://community.khronos.org/t/is-this-program-legal/112607 "2026-07-28T08:41:47Z")

</div>

In a native Windows, headless DSA compliant context, the glsl below compiles. links and binds without error, but never writes any output. One possibility is that it contains some inconsistency that the compiler did not …

---

## [Pixel-path performance warning: Pixel transfer is synchronized with 3D rendering](https://community.khronos.org/t/pixel-path-performance-warning-pixel-transfer-is-synchronized-with-3d-rendering/112455)

<div class="topic-metadata">

**Author:** [@Aks](https://community.khronos.org/u/Aks)\
**Replies:** 2\
**Last updated:** [July 23, 2026, 4:22pm UTC](https://community.khronos.org/t/pixel-path-performance-warning-pixel-transfer-is-synchronized-with-3d-rendering/112455 "2026-07-23T16:22:23Z")

</div>

Hi, I’m working on a tiled GPU-based map reprojection pipeline in OpenGL (on NVIDIA). The driver frequently reports: Pixel-path performance warning: Pixel transfer is synchronized with 3D rendering. My pipeline stre…

---

## [What's the fastest way to caculate 1 main or average color from frameBuffer?](https://community.khronos.org/t/whats-the-fastest-way-to-caculate-1-main-or-average-color-from-framebuffer/112137)

<div class="topic-metadata">

**Author:** [@gpu22](https://community.khronos.org/u/gpu22)\
**Replies:** 2\
**Last updated:** [July 11, 2026, 10:33am UTC](https://community.khronos.org/t/whats-the-fastest-way-to-caculate-1-main-or-average-color-from-framebuffer/112137 "2026-07-11T10:33:39Z")

</div>

what’s the fastest way to caculate 1 main or average color from frameBuffer?

---

## [Q: How to draw an arrow?](https://community.khronos.org/t/q-how-to-draw-an-arrow/43126)

<div class="topic-metadata">

**Author:** [@jyoung77](https://community.khronos.org/u/jyoung77)\
**Replies:** 6\
**Last updated:** [June 26, 2026, 4:09pm UTC](https://community.khronos.org/t/q-how-to-draw-an-arrow/43126 "2026-06-26T16:09:10Z")

</div>

Hi, Surely I can draw an arrow by drawing one line plus two very tiny short lines. Is there a better way than this naive method? Thanks. Tony

---

## [Looking for old version of glslangvalidater](https://community.khronos.org/t/looking-for-old-version-of-glslangvalidater/112509)

<div class="topic-metadata">

**Author:** [@JoshKlint](https://community.khronos.org/u/JoshKlint)\
**Replies:** 2\
**Last updated:** [April 18, 2026, 11:01pm UTC](https://community.khronos.org/t/looking-for-old-version-of-glslangvalidater/112509 "2026-04-18T23:01:13Z")

</div>

I am looking for an old version of the glslangvalidater tool, as newer versions are focused on Vulkan. I want the best version for support of OpenGL 4.5. The ones on Khronos Github are all too new. I have a really old c…

---

## [Issues using Conservative Depth to stop the fragment shader runnig](https://community.khronos.org/t/issues-using-conservative-depth-to-stop-the-fragment-shader-runnig/112458)

<div class="topic-metadata">

**Author:** [@DuncanHopkinsFoundry](https://community.khronos.org/u/DuncanHopkinsFoundry)\
**Replies:** 4\
**Last updated:** [February 27, 2026, 10:46am UTC](https://community.khronos.org/t/issues-using-conservative-depth-to-stop-the-fragment-shader-runnig/112458 "2026-02-27T10:46:39Z")

</div>

Hi, I would like to use the conservative depth options on the fragment shader. Ideally I want to depth cull the fragments to stop the fragment shader doing the work. The issue is I also need to use discard and other op…

---

## [Manual bilinear filter](https://community.khronos.org/t/manual-bilinear-filter/58504)

<div class="topic-metadata">

**Author:** [@peterfilm](https://community.khronos.org/u/peterfilm)\
**Replies:** 8\
**Last updated:** [March 22, 2026, 4:53pm UTC](https://community.khronos.org/t/manual-bilinear-filter/58504 "2026-03-22T16:53:19Z")

</div>

vec4 texture2D\_bilinear(in sampler2D t, in vec2 uv, in vec2 textureSize, in vec2 texelSize) { vec4 tl = texture2D(t, uv); vec4 tr = texture2D(t, uv + vec2(texelSize.x, 0.0)); vec4 bl = texture2D(t, uv + vec2…

---

## [Using the stencil buffer for the first time](https://community.khronos.org/t/using-the-stencil-buffer-for-the-first-time/112484)

<div class="topic-metadata">

**Author:** [@JoshKlint](https://community.khronos.org/u/JoshKlint)\
**Replies:** 6\
**Last updated:** [March 22, 2026, 2:50am UTC](https://community.khronos.org/t/using-the-stencil-buffer-for-the-first-time/112484 "2026-03-22T02:50:12Z")

</div>

I want to use the stencil buffer to mask out my background in a deferred renderer, so the full-screen directional light pass only draws to pixels that have had something drawn to them, and for other things. So far it is …

---

## [Code that approximates the GGX lookup table?](https://community.khronos.org/t/code-that-approximates-the-ggx-lookup-table/112464)

<div class="topic-metadata">

**Author:** [@JoshKlint](https://community.khronos.org/u/JoshKlint)\
**Replies:** 5\
**Last updated:** [March 16, 2026, 2:40am UTC](https://community.khronos.org/t/code-that-approximates-the-ggx-lookup-table/112464 "2026-03-16T02:40:36Z")

</div>

Does anyone have a GLSL function that will approximate the contents of this image? I feel like having a texture lookup that uses texcoords resulting from another texture lookup is something to be avoided when possible. …

---

## [1x Multisample Texture reports two samples in a shader?](https://community.khronos.org/t/1x-multisample-texture-reports-two-samples-in-a-shader/112463)

<div class="topic-metadata">

**Author:** [@JoshKlint](https://community.khronos.org/u/JoshKlint)\
**Replies:** 3\
**Last updated:** [March 14, 2026, 3:25pm UTC](https://community.khronos.org/t/1x-multisample-texture-reports-two-samples-in-a-shader/112463 "2026-03-14T15:25:36Z")

</div>

I have determined that a texture that uses 1 for the sample count when glTextureStorage2DMultisample is called will produce a texture that reports the sample count is 2 in a shader. Card is an Nvidia GEForce 1080. This …

---

## [lasso selection](https://community.khronos.org/t/lasso-selection/44588)

<div class="topic-metadata">

**Author:** [@Taylor\_Holliday](https://community.khronos.org/u/Taylor_Holliday)\
**Replies:** 4\
**Last updated:** [March 12, 2026, 10:13am UTC](https://community.khronos.org/t/lasso-selection/44588 "2026-03-12T10:13:29Z")

</div>

Hi all, First post here. I’m implementing lasso-style selection tool for one of my programs, a little 3d modeler. Does anyone know of an elegant simple approach to this? My initial idea is to tesselate the selection lo…

---

## [Transpose PS1 semi-transparency system to OpenGL](https://community.khronos.org/t/transpose-ps1-semi-transparency-system-to-opengl/111656)

<div class="topic-metadata">

**Author:** [@Testelair](https://community.khronos.org/u/Testelair)\
**Replies:** 3\
**Last updated:** [February 12, 2026, 5:44am UTC](https://community.khronos.org/t/transpose-ps1-semi-transparency-system-to-opengl/111656 "2026-02-12T05:44:10Z")

</div>

Hi folks! First things first, I’m a hobbyist developer working with a small team whose goal is to port a PS1 game to PC. Despite being quite new to OpenGL, the journey went fine until we have to deal with semi-transparen…

---

## [What's the result if render a texture to a 1x1 size framebuffer?](https://community.khronos.org/t/whats-the-result-if-render-a-texture-to-a-1x1-size-framebuffer/112138)

<div class="topic-metadata">

**Author:** [@gpu22](https://community.khronos.org/u/gpu22)\
**Replies:** 16\
**Last updated:** [February 4, 2026, 9:36pm UTC](https://community.khronos.org/t/whats-the-result-if-render-a-texture-to-a-1x1-size-framebuffer/112138 "2026-02-04T21:36:19Z")

</div>

what’s the result if render a texture to a 1x1 size framebuffer? get the average color if set linear? or other result? Thanks!

---

## [Compression of triangles mesh](https://community.khronos.org/t/compression-of-triangles-mesh/112440)

<div class="topic-metadata">

**Author:** [@The\_Little\_Body](https://community.khronos.org/u/The_Little_Body)\
**Replies:** 2\
**Last updated:** [February 3, 2026, 10:07pm UTC](https://community.khronos.org/t/compression-of-triangles-mesh/112440 "2026-02-03T22:07:15Z")

</div>

Hi, I work actually about a triangle mesh compressor that give only a little more than 6 bits per triangle (only the topologic part, not already the geometric part) Think you than this style of triangle compression ca…

---

## [I think my objects are rendering without depth](https://community.khronos.org/t/i-think-my-objects-are-rendering-without-depth/112436)

<div class="topic-metadata">

**Author:** [@GameGuy](https://community.khronos.org/u/GameGuy)\
**Replies:** 0\
**Last updated:** [January 28, 2026, 11:49pm UTC](https://community.khronos.org/t/i-think-my-objects-are-rendering-without-depth/112436 "2026-01-28T23:49:23Z")

</div>

This image is supposed to be a tv on a stand. What I am doing is both bloom and shadows, so I need 3 framebuffers to do this. I haven’t got the shadow maps to work yet but I want to get my objects to show up properly…

---

## [Draw a tetrahedron on OpenGL with only one call](https://community.khronos.org/t/draw-a-tetrahedron-on-opengl-with-only-one-call/112426)

<div class="topic-metadata">

**Author:** [@The\_Little\_Body](https://community.khronos.org/u/The_Little_Body)\
**Replies:** 1\
**Last updated:** [January 16, 2026, 1:30am UTC](https://community.khronos.org/t/draw-a-tetrahedron-on-opengl-with-only-one-call/112426 "2026-01-16T01:30:00Z")

</div>

Hi, I want to display tetrahedrons volumes with OpenGL I think use this function for to implement it void glTetra3fv( float \*v0, float \*v1, float \*v2, float \*v3 ) { glBegin(GL\_TRIANGLES); glVertex3fv(v0)…

---

## [Skeletal Animations. (I don't understand anything isn't there a simpler way on how to do this ?)](https://community.khronos.org/t/skeletal-animations-i-dont-understand-anything-isnt-there-a-simpler-way-on-how-to-do-this/111677)

<div class="topic-metadata">

**Author:** [@laurent7601](https://community.khronos.org/u/laurent7601)\
**Replies:** 6\
**Last updated:** [March 6, 2025, 9:41pm UTC](https://community.khronos.org/t/skeletal-animations-i-dont-understand-anything-isnt-there-a-simpler-way-on-how-to-do-this/111677 "2025-03-06T21:41:52Z")

</div>

Hi! I just read this tutorial : https://learnopengl.com/Guest-Articles/2020/Skeletal-Animation But I find this is a very complicated way to animate models. Would do be more simple to load one model per keyframe and then…

---

## [Why won't my bloom material work?](https://community.khronos.org/t/why-wont-my-bloom-material-work/112406)

<div class="topic-metadata">

**Author:** [@GameGuy](https://community.khronos.org/u/GameGuy)\
**Replies:** 1\
**Last updated:** [December 21, 2025, 12:23am UTC](https://community.khronos.org/t/why-wont-my-bloom-material-work/112406 "2025-12-21T00:23:38Z")

</div>

I am trying to model Christmas lights. The models render but I do not see the bloom effect. I have even made a temporary change to the blend shader so that it outputs the image that is supposed to be blended, and everyth…

---

## [How to batch-drawCall for many shader-clip textured quad?](https://community.khronos.org/t/how-to-batch-drawcall-for-many-shader-clip-textured-quad/112396)

<div class="topic-metadata">

**Author:** [@gpu22](https://community.khronos.org/u/gpu22)\
**Replies:** 1\
**Last updated:** [December 9, 2025, 8:56pm UTC](https://community.khronos.org/t/how-to-batch-drawcall-for-many-shader-clip-textured-quad/112396 "2025-12-09T20:56:41Z")

</div>

how to batch-drawCall for many shader-clip textured quad? eg. there are many textured-circle, each one is drawn as this: draw quad with texture clip quad to circle with shader and scissor state as clip break the batc…

---

## [Semitransparent blending with maximum alpha](https://community.khronos.org/t/semitransparent-blending-with-maximum-alpha/112159)

<div class="topic-metadata">

**Author:** [@Shtille](https://community.khronos.org/u/Shtille)\
**Replies:** 0\
**Last updated:** [November 10, 2025, 4:46pm UTC](https://community.khronos.org/t/semitransparent-blending-with-maximum-alpha/112159 "2025-11-10T16:46:01Z")

</div>

Hi! I try to implement blending of several semitransparent screen space quads with case that I take maximum alpha value from current framebuffer alpha and fragment alpha and that value is used in traditional transparent …

---

## [How to maintain pixels linear when using textureFetch function](https://community.khronos.org/t/how-to-maintain-pixels-linear-when-using-texturefetch-function/112088)

<div class="topic-metadata">

**Author:** [@3412](https://community.khronos.org/u/3412)\
**Replies:** 4\
**Last updated:** [October 29, 2025, 9:35am UTC](https://community.khronos.org/t/how-to-maintain-pixels-linear-when-using-texturefetch-function/112088 "2025-10-29T09:35:42Z")

</div>

:white\_circle:Hi everyone, I’m developing an application, which will render an image of passing route of a car, by processing the image captured by a camera in the front of the car. :white\_circle:In glsl, “texture” func…

---

## [Nvidia's nmb format](https://community.khronos.org/t/nvidias-nmb-format/34098)

<div class="topic-metadata">

**Author:** [@SirKnight](https://community.khronos.org/u/SirKnight)\
**Replies:** 11\
**Last updated:** [October 20, 2025, 6:36pm UTC](https://community.khronos.org/t/nvidias-nmb-format/34098 "2025-10-20T18:36:23Z")

</div>

Maybe OT but I can’t find jack about the nmb model format nvidia uses for demos such as the Dawn demo. All I can find is code to load nvb but not nmb. Anyone know anything about this format? I was wanting to load Dawn in…

---

## [What's the fastest way to get the color from GPU render result?](https://community.khronos.org/t/whats-the-fastest-way-to-get-the-color-from-gpu-render-result/112132)

<div class="topic-metadata">

**Author:** [@gpu22](https://community.khronos.org/u/gpu22)\
**Replies:** 0\
**Last updated:** [October 20, 2025, 11:16am UTC](https://community.khronos.org/t/whats-the-fastest-way-to-get-the-color-from-gpu-render-result/112132 "2025-10-20T11:16:39Z")

</div>

what’s the fastest way to get the color from GPU render result? Thanks!

---

## [glMakeTextureHandleResidentARB is per-context?](https://community.khronos.org/t/glmaketexturehandleresidentarb-is-per-context/111735)

<div class="topic-metadata">

**Author:** [@JoshKlint](https://community.khronos.org/u/JoshKlint)\
**Replies:** 6\
**Last updated:** [August 7, 2025, 12:42pm UTC](https://community.khronos.org/t/glmaketexturehandleresidentarb-is-per-context/111735 "2025-08-07T12:42:44Z")

</div>

Reading the spec here, it appears that glMakeTextureHandleResidentARB is supposed to act on a per-context basis, but in real usage I have not seen any problems using the same handle across multiple OpenGL contexts, once …

---

## [Make the LR compression 2x more compact](https://community.khronos.org/t/make-the-lr-compression-2x-more-compact/111982)

<div class="topic-metadata">

**Author:** [@The\_Little\_Body](https://community.khronos.org/u/The_Little_Body)\
**Replies:** 4\
**Last updated:** [July 28, 2025, 6:23pm UTC](https://community.khronos.org/t/make-the-lr-compression-2x-more-compact/111982 "2025-07-28T18:23:18Z")

</div>

Hi, I currently work about the topologic compression of 3D mesh I have read/study some documents about Edgebreaker / corner table, SQUAD, SOT, LR / BELR and others Zipper or Grouper for to have a relatively large view …

---

## [Simple OpenGL 3.2/3.3/4.0 core profile loading](https://community.khronos.org/t/simple-opengl-3-2-3-3-4-0-core-profile-loading/60454)

<div class="topic-metadata">

**Author:** [@Slavomir\_Kaslev](https://community.khronos.org/u/Slavomir_Kaslev)\
**Replies:** 13\
**Last updated:** [July 27, 2025, 6:28pm UTC](https://community.khronos.org/t/simple-opengl-3-2-3-3-4-0-core-profile-loading/60454 "2025-07-27T18:28:07Z")

</div>

(or life without glew) Recently I wrote a small (130 lines) Python script that parses GL3/gl3.h header and generates the code needed to load the OpenGL 3 core profile. I’ve been using glew for the same purpose for some…

[Next page](https://community.khronos.org/c/opengl-general/opengl-advanced-coding/29.md?page=1)
