mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Update UBO usages inline with framework changes
This commit is contained in:
parent
15c44a2817
commit
678e8ed736
@ -252,13 +252,14 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
renderer.SetBlend(BlendingParameters.Additive);
|
||||
renderer.PushLocalMatrix(DrawInfo.Matrix);
|
||||
|
||||
TextureShader.Bind();
|
||||
BindTextureShader(renderer);
|
||||
|
||||
texture.Bind();
|
||||
|
||||
for (int i = 0; i < points.Count; i++)
|
||||
drawPointQuad(points[i], textureRect, i + firstVisiblePointIndex);
|
||||
|
||||
TextureShader.Unbind();
|
||||
UnbindTextureShader(renderer);
|
||||
renderer.PopLocalMatrix();
|
||||
}
|
||||
|
||||
|
@ -100,8 +100,10 @@ namespace osu.Game.Tests.Visual.Background
|
||||
|
||||
private IUniformBuffer<TriangleBorderData>? borderDataBuffer;
|
||||
|
||||
public override void Draw(IRenderer renderer)
|
||||
protected override void BindUniformResources(IShader shader, IRenderer renderer)
|
||||
{
|
||||
base.BindUniformResources(shader, renderer);
|
||||
|
||||
borderDataBuffer ??= renderer.CreateUniformBuffer<TriangleBorderData>();
|
||||
borderDataBuffer.Data = borderDataBuffer.Data with
|
||||
{
|
||||
@ -109,9 +111,7 @@ namespace osu.Game.Tests.Visual.Background
|
||||
TexelSize = texelSize
|
||||
};
|
||||
|
||||
TextureShader.BindUniformBlock("m_BorderData", borderDataBuffer);
|
||||
|
||||
base.Draw(renderer);
|
||||
shader.BindUniformBlock("m_BorderData", borderDataBuffer);
|
||||
}
|
||||
|
||||
protected override bool CanDrawOpaqueInterior => false;
|
||||
|
@ -306,7 +306,7 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
};
|
||||
|
||||
shader.Bind();
|
||||
shader.BindUniformBlock("m_BorderData", borderDataBuffer);
|
||||
shader.BindUniformBlock(@"m_BorderData", borderDataBuffer);
|
||||
|
||||
foreach (TriangleParticle particle in parts)
|
||||
{
|
||||
|
@ -249,7 +249,7 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
};
|
||||
|
||||
shader.Bind();
|
||||
shader.BindUniformBlock("m_BorderData", borderDataBuffer);
|
||||
shader.BindUniformBlock(@"m_BorderData", borderDataBuffer);
|
||||
|
||||
Vector2 relativeSize = Vector2.Divide(triangleSize, size);
|
||||
|
||||
|
@ -59,14 +59,14 @@ namespace osu.Game.Graphics.Sprites
|
||||
|
||||
private IUniformBuffer<AnimationData> animationDataBuffer;
|
||||
|
||||
protected override void Blit(IRenderer renderer)
|
||||
protected override void BindUniformResources(IShader shader, IRenderer renderer)
|
||||
{
|
||||
base.BindUniformResources(shader, renderer);
|
||||
|
||||
animationDataBuffer ??= renderer.CreateUniformBuffer<AnimationData>();
|
||||
animationDataBuffer.Data = animationDataBuffer.Data with { Progress = progress };
|
||||
|
||||
TextureShader.BindUniformBlock("m_AnimationData", animationDataBuffer);
|
||||
|
||||
base.Blit(renderer);
|
||||
shader.BindUniformBlock(@"m_AnimationData", animationDataBuffer);
|
||||
}
|
||||
|
||||
protected override bool CanDrawOpaqueInterior => false;
|
||||
|
@ -273,7 +273,7 @@ namespace osu.Game.Rulesets.Mods
|
||||
};
|
||||
|
||||
shader.Bind();
|
||||
shader.BindUniformBlock("m_FlashlightParameters", flashlightParametersBuffer);
|
||||
shader.BindUniformBlock(@"m_FlashlightParameters", flashlightParametersBuffer);
|
||||
|
||||
renderer.DrawQuad(renderer.WhitePixel, screenSpaceDrawQuad, DrawColourInfo.Colour, vertexAction: addAction);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user