Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename PlatformApplyUserVertexData() #1602

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ private void PlatformApplyVertexBuffers(int baseVertex)
}
}

internal void PlatformApplyUserVertexBuffers(VertexDeclaration vertexDeclaration, int baseVertex)
internal void PlatformApplyUserVertexData(VertexDeclaration vertexDeclaration, int baseVertex)
{
ConcreteVertexShader vertexShaderStrategy = ((IPlatformShader)this.VertexShader).Strategy.ToConcrete<ConcreteVertexShader>();

Expand Down Expand Up @@ -627,7 +627,7 @@ public override void DrawUserPrimitives<T>(PrimitiveType primitiveType, T[] vert
GL.CheckGLError();

// Setup the vertex declaration to point at the VB data.
PlatformApplyUserVertexBuffers(vertexDeclaration, vertexOffset);
PlatformApplyUserVertexData(vertexDeclaration, vertexOffset);

WebGLPrimitiveType target = ConcreteGraphicsContext.PrimitiveTypeGL(primitiveType);

Expand Down Expand Up @@ -689,7 +689,7 @@ public override void DrawUserIndexedPrimitives<T>(PrimitiveType primitiveType, T
GL.CheckGLError();

// Setup the vertex declaration to point at the VB data.
PlatformApplyUserVertexBuffers(vertexDeclaration, vertexOffset);
PlatformApplyUserVertexData(vertexDeclaration, vertexOffset);


int indexElementCount = GraphicsContextStrategy.GetElementCountArray(primitiveType, primitiveCount);
Expand Down
8 changes: 4 additions & 4 deletions MonoGame.Framework/Graphics/.GL/ConcreteGraphicsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ private void PlatformApplyVertexBuffers(int baseVertex)
}
}

internal void PlatformApplyUserVertexBuffers(VertexDeclaration vertexDeclaration, IntPtr baseVertex)
internal void PlatformApplyUserVertexData(VertexDeclaration vertexDeclaration, IntPtr baseVertex)
{
ConcreteVertexShader vertexShaderStrategy = ((IPlatformShader)this.VertexShader).Strategy.ToConcrete<ConcreteVertexShader>();

Expand Down Expand Up @@ -709,7 +709,7 @@ public override void DrawUserPrimitives<T>(PrimitiveType primitiveType, T[] vert
try
{
// Setup the vertex declaration to point at the VB data.
PlatformApplyUserVertexBuffers(vertexDeclaration, vbHandle.AddrOfPinnedObject());
PlatformApplyUserVertexData(vertexDeclaration, vbHandle.AddrOfPinnedObject());

//Draw
GL.DrawArrays(ConcreteGraphicsContext.PrimitiveTypeGL(primitiveType),
Expand Down Expand Up @@ -750,7 +750,7 @@ public override void DrawUserIndexedPrimitives<T>(PrimitiveType primitiveType, T
IntPtr vertexAddr = (IntPtr)(vbHandle.AddrOfPinnedObject().ToInt64() + vertexDeclaration.VertexStride * vertexOffset);

// Setup the vertex declaration to point at the VB data.
PlatformApplyUserVertexBuffers(vertexDeclaration, vertexAddr);
PlatformApplyUserVertexData(vertexDeclaration, vertexAddr);

//Draw
GL.DrawElements(
Expand Down Expand Up @@ -794,7 +794,7 @@ public override void DrawUserIndexedPrimitives<T>(PrimitiveType primitiveType, T
IntPtr vertexAddr = (IntPtr)(vbHandle.AddrOfPinnedObject().ToInt64() + vertexDeclaration.VertexStride * vertexOffset);

// Setup the vertex declaration to point at the VB data.
PlatformApplyUserVertexBuffers(vertexDeclaration, vertexAddr);
PlatformApplyUserVertexData(vertexDeclaration, vertexAddr);

//Draw
GL.DrawElements(
Expand Down
Loading