Skip to content

Commit

Permalink
FRAMEBUFFER: Always initialize texture filtering.
Browse files Browse the repository at this point in the history
If filtering has not been initialized, the shader will fail on macOS
with the following error:

UNSUPPORTED (log once): POSSIBLE ISSUE: unit 1 GLD_TEXTURE_INDEX_2D
is unloadable and bound to sampler type (Float) - using zero texture
because texture unloadable

This fixes vid_framebuffer 2 on macOS.
  • Loading branch information
dsvensson committed Dec 11, 2024
1 parent b4b5213 commit 3fcf14b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gl_framebuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ static qbool GL_FramebufferCreateRenderingTexture(framebuffer_data_t* fb, fbtex_
GL_TexStorage2D(fb->texture[tex_id], 1, framebuffer_format, width, height, false);
renderer.TextureLabelSet(fb->texture[tex_id], label);
renderer.TextureWrapModeClamp(fb->texture[tex_id]);
renderer.TextureSetFiltering(fb->texture[tex_id], texture_minification_nearest, texture_magnification_nearest);
R_TextureSetFlag(fb->texture[tex_id], R_TextureGetFlag(fb->texture[tex_id]) | TEX_NO_TEXTUREMODE);
return true;
}
Expand Down

0 comments on commit 3fcf14b

Please sign in to comment.