mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Implemented Materials
- Shaders get Textureslots via reflection - added Textureslots to Effect
This commit is contained in:
@@ -77,5 +77,16 @@ namespace GlitchyEngine.Renderer
|
||||
geometry.Bind();
|
||||
RenderCommand.DrawIndexed(geometry);
|
||||
}
|
||||
|
||||
public static void Submit(GeometryBinding geometry, Material material, Matrix transform = .Identity)
|
||||
{
|
||||
material.SetVariable("ViewProjection", _sceneConstants.ViewProjection);
|
||||
material.SetVariable("Transform", transform);
|
||||
|
||||
material.Bind(_context);
|
||||
|
||||
geometry.Bind();
|
||||
RenderCommand.DrawIndexed(geometry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user