mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-22 17:10:19 +00:00
Allow null samplers on OpenGL backend
This commit is contained in:
parent
dc0a00f93c
commit
dd915ae67b
1 changed files with 6 additions and 4 deletions
|
@ -1177,20 +1177,22 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
|
|
||||||
public void SetTextureAndSampler(int binding, ITexture texture, ISampler sampler)
|
public void SetTextureAndSampler(int binding, ITexture texture, ISampler sampler)
|
||||||
{
|
{
|
||||||
if (texture != null && sampler != null)
|
if (texture != null)
|
||||||
{
|
{
|
||||||
if (binding == 0)
|
if (binding == 0)
|
||||||
{
|
{
|
||||||
_unit0Texture = (TextureBase)texture;
|
_unit0Texture = (TextureBase)texture;
|
||||||
_unit0Sampler = (Sampler)sampler;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
((TextureBase)texture).Bind(binding);
|
((TextureBase)texture).Bind(binding);
|
||||||
}
|
}
|
||||||
|
|
||||||
((Sampler)sampler).Bind(binding);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Sampler glSampler = (Sampler)sampler;
|
||||||
|
|
||||||
|
glSampler?.Bind(binding);
|
||||||
|
_unit0Sampler = glSampler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue