make BindVertexSamplers like BindFragmentSamplers

main
cosmonaut 2021-01-22 13:57:49 -08:00
parent c02c23bc16
commit f84c4dad26
1 changed files with 6 additions and 11 deletions

View File

@ -223,20 +223,15 @@ namespace MoonWorks.Graphics
} }
public unsafe void BindVertexSamplers( public unsafe void BindVertexSamplers(
Texture[] textures, params TextureSamplerBinding[] textureSamplerBindings
Sampler[] samplers
) { ) {
var texturePtrs = stackalloc IntPtr[textures.Length]; var texturePtrs = stackalloc IntPtr[textureSamplerBindings.Length];
var samplerPtrs = stackalloc IntPtr[samplers.Length]; var samplerPtrs = stackalloc IntPtr[textureSamplerBindings.Length];
for (var i = 0; i < textures.Length; i += 1) for (var i = 0; i < textureSamplerBindings.Length; i += 1)
{ {
texturePtrs[i] = textures[i].Handle; texturePtrs[i] = textureSamplerBindings[i].Texture.Handle;
} samplerPtrs[i] = textureSamplerBindings[i].Sampler.Handle;
for (var i = 0; i < samplers.Length; i += 1)
{
samplerPtrs[i] = samplers[i].Handle;
} }
Refresh.Refresh_BindVertexSamplers( Refresh.Refresh_BindVertexSamplers(