Skip to content

Commit

Permalink
error if a volume texture is created with a depth/stencil pixel format.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Jul 16, 2024
1 parent 0d95aea commit 679f3bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/graphics/Texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ Texture::Texture(Graphics *gfx, const Settings &settings, const Slices *slices)
if (isPixelFormatDepthStencil(format) && !renderTarget)
throw love::Exception("Depth or stencil pixel formats are only supported with render target textures.");

if (isPixelFormatDepthStencil(format) && texType == TEXTURE_VOLUME)
throw love::Exception("Volume texture types are not supported with depth or stencil pixel formats.");

for (PixelFormat viewformat : viewFormats)
{
if (getLinearPixelFormat(viewformat) == getLinearPixelFormat(format))
Expand Down

0 comments on commit 679f3bd

Please sign in to comment.