CorgEng.Rendering

Contents

Dependencies

CorgEng.EntityComponentSystem CorgEng.RenderSystem

Summary

Provides a component based implementation of the rendering system, allowing entities to have a renderable component applied to them, allowing them to be rendered.

CorgEng.Core provides an interface ITextRenderer with some methods that define the intention of an implementation. The default implementation of this does nothing, however by using dependency injection, when the rendering module is included with a project, a propert text renderer can be injected.

Documentation

IModel

public interface IModel

IModel defines something with vertices and UVs that can be sent to the renderer for rendering.

int VertexCount { get; }

The number of vertices that the model has. A square made up of 3 triangles has 6 vertices (3 for each triangle).

uint VertexBuffer { get; }

The ID of the buffer that represents the vertex buffer for this model.

uint UvBuffer { get; }

The ID of the buffer that represents the UV buffer for this model.

IModelFactory

public interface IModelFactory

IModelFactory is a factory class that can be used to create Models. When creating models based off of a dependency type, a factory dependency can be created and used to produce models without knowing the specific implementation of IModel.

IModel CreateModel(float[] vertices, float[] uvs);

Creates a model with the specified vertices and UVs.

IRenderer

public interface IRenderer

IRenderer defines something that can render objects. It is used for generic abstract classes, however.