Skip to content

Add capability of creating seperated stencil view in OpenGL.#690

Merged
TheMostDiligent merged 8 commits intoDiligentGraphics:masterfrom
hzqst:master
Aug 1, 2025
Merged

Add capability of creating seperated stencil view in OpenGL.#690
TheMostDiligent merged 8 commits intoDiligentGraphics:masterfrom
hzqst:master

Conversation

@hzqst
Copy link
Copy Markdown
Contributor

@hzqst hzqst commented Jul 28, 2025

See #689

TODO: Do we need to check if GL_ARB_stencil_texturing available, or force a OpenGL 4.3 core profile prerequsite?

GL_ARB_stencil_texturing checking added.

@hzqst hzqst requested a review from TheMostDiligent as a code owner July 28, 2025 14:16
Comment thread Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp Outdated
Comment thread Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp Outdated
Comment thread Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp Outdated
Comment thread Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp Outdated
Comment thread Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp Outdated
Comment thread Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp
Comment thread Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp
@TheMostDiligent
Copy link
Copy Markdown
Contributor

There are also minor formatting issues

…ODE.

Add error thrown when format not supported
@TheMostDiligent
Copy link
Copy Markdown
Contributor

There are still some formatting issues that remain:

https://github.com/DiligentGraphics/DiligentCore/actions/runs/16670522485/job/47209765341?pr=690

Comment thread Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp Outdated
@hzqst
Copy link
Copy Markdown
Contributor Author

hzqst commented Aug 1, 2025

[ 88%] Building CXX object Graphics/GraphicsEngineVulkan/CMakeFiles/Diligent-GraphicsEngineVk-static.dir/src/ShaderResourceCacheVk.cpp.o
/Users/runner/work/DiligentCore/DiligentCore/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp:507:55: error: use of undeclared identifier 'GL_DEPTH_STENCIL_TEXTURE_MODE'
                        glTexParameteri(GLViewTarget, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_STENCIL_INDEX);
                                                      ^
/Users/runner/work/DiligentCore/DiligentCore/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp:507:86: error: use of undeclared identifier 'GL_STENCIL_INDEX'
                        glTexParameteri(GLViewTarget, GL_DEPTH_STENCIL_TEXTURE_MODE, GL_STENCIL_INDEX);
                                                                                     ^
[ 88%] Building CXX object Graphics/GraphicsEngineOpenGL/CMakeFiles/Diligent-GraphicsEngineOpenGL-static.dir/src/TextureCube_GL.cpp.o

Do we need to define GL_DEPTH_STENCIL_TEXTURE_MODE and GL_STENCIL_INDEX by ourself if they were not defined by platform specified GL headers? If we do so, put the definition at ?

@TheMostDiligent
Copy link
Copy Markdown
Contributor

Yes, the definitions are in GLStubsAndroid.h and GLStubsIOS.h.

@TheMostDiligent
Copy link
Copy Markdown
Contributor

https://github.com/DiligentGraphics/DiligentCore/actions/runs/16678796778/job/47212189059?pr=690

When configuring CMake, you should set -D DILIGENT_NO_FORMAT_VALIDATION=OFF. This will add format validation targets to the project.

@TheMostDiligent TheMostDiligent merged commit 5530bc1 into DiligentGraphics:master Aug 1, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants