send Color4 to GL.Uniform4
This commit is contained in:
parent
5b135bc889
commit
5c2b831ced
@ -323,7 +323,7 @@ public class Game : GameWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DrawTexture(Texture texture, Box2i box, Color4 color) {
|
void DrawTexture(Texture texture, Box2i box, Color4 color) {
|
||||||
GL.Uniform4(shader.GetUniformLocation("color"), color.R, color.G, color.B, color.A);
|
GL.Uniform4(shader.GetUniformLocation("color"), color);
|
||||||
SetVertices(box.Min.X, box.Min.Y, box.Size.X, box.Size.Y);
|
SetVertices(box.Min.X, box.Min.Y, box.Size.X, box.Size.Y);
|
||||||
GL.BufferData(BufferTarget.ArrayBuffer, vertices.Length * sizeof(float), vertices, BufferUsageHint.DynamicDraw);
|
GL.BufferData(BufferTarget.ArrayBuffer, vertices.Length * sizeof(float), vertices, BufferUsageHint.DynamicDraw);
|
||||||
GL.BindTexture(TextureTarget.Texture2D, texture.Handle);
|
GL.BindTexture(TextureTarget.Texture2D, texture.Handle);
|
||||||
|
Loading…
Reference in New Issue
Block a user