This class implements a renderer for the entire mesh.
Definition: MeshRenderer.h:41
std::unordered_map< Index32, Rendering::TextureFramebufferRef > TextureFramebufferMap
Definition of an unordered map mapping mesh ids to texture framebuffers.
Definition: MeshRenderer.h:47
~MeshRenderer()
Destructs this renderer and releases all resources.
void release()
Explicitly releases this renderer and releases all resources.
static const char * partPlatform_
The platform-specific shader part.
Definition: MeshRenderer.h:105
static const char * programVertexShader_
The vertex shader part.
Definition: MeshRenderer.h:111
Rendering::ShaderProgramRef shaderProgram_
The shader program rendering individual triangles with individual color ids.
Definition: MeshRenderer.h:99
static const char * partTextureAtlas_
The shader part for the texture atlas.
Definition: MeshRenderer.h:108
static const char * programFragmentShader_
The fragment shader part.
Definition: MeshRenderer.h:114
bool isValid() const
Returns whether this renderer has been initialized successfully.
Rendering::TextureFramebufferRef textureFramebuffer_
The texture framebuffer holding the states of the individual triangles.
Definition: MeshRenderer.h:102
bool render(const Rendering::Engine &engine, const Rendering::VertexSetRef &vertexSet, const Rendering::TrianglesRef &triangles, const unsigned int numberTriangles, const AnyCamera &anyCamera, const HomogenousMatrix4 &world_T_camera, const TextureFramebufferMap &textureFramebufferMap, const Rendering::TextureFramebufferRef &trianglesStateFramebuffer, const TextureAtlas &textureAtlas, Frame *renderedFrame=nullptr)
Renders textured triangles into a texture atlas.
bool initialize(const Rendering::Engine &engine)
Initializes this renderer.
const Rendering::TextureFramebufferRef & textureFramebuffer() const
Returns the current texture framebuffer of this renderer.
Definition: MeshRenderer.h:117
This class implements a texture atlas for triangles with regular shape.
Definition: TextureAtlas.h:31