![]() |
Pioneer
|
#include <Renderer.h>


Classes | |
| class | MatrixTicket |
| class | StateTicket |
Public Types | |
| using | TextureCache = TextureCacheMap |
Public Member Functions | |
| Renderer (SDL_Window *win, int width, int height) | |
| virtual | ~Renderer () |
| virtual const char * | GetName () const =0 |
| virtual RendererType | GetRendererType () const =0 |
| virtual void | WriteRendererInfo (std::ostream &out) const |
| virtual void | CheckRenderErrors (const char *func=nullptr, const int line=-1) const |
| virtual bool | SupportsInstancing ()=0 |
| SDL_Window * | GetSDLWindow () const |
| float | GetDisplayAspect () const |
| int | GetWindowWidth () const |
| int | GetWindowHeight () const |
| virtual int | GetMaximumNumberAASamples () const =0 |
| virtual bool | GetNearFarRange (float &near_, float &far_) const =0 |
| virtual bool | BeginFrame ()=0 |
| virtual bool | EndFrame ()=0 |
| virtual bool | SwapBuffers ()=0 |
| virtual bool | SetRenderTarget (RenderTarget *)=0 |
| virtual bool | SetScissor (ViewportExtents scissor)=0 |
| virtual bool | ClearScreen ()=0 |
| virtual bool | ClearDepthBuffer ()=0 |
| virtual bool | SetClearColor (const Color &c)=0 |
| virtual bool | SetViewport (ViewportExtents vp)=0 |
| virtual ViewportExtents | GetViewport () const =0 |
| virtual bool | SetTransform (const matrix4x4f &m)=0 |
| virtual matrix4x4f | GetTransform () const =0 |
| virtual bool | SetPerspectiveProjection (float fov, float aspect, float near_, float far_)=0 |
| virtual bool | SetOrthographicProjection (float xmin, float xmax, float ymin, float ymax, float zmin, float zmax)=0 |
| virtual bool | SetProjection (const matrix4x4f &m)=0 |
| virtual matrix4x4f | GetProjection () const =0 |
| virtual bool | SetWireFrameMode (bool enabled)=0 |
| virtual bool | SetLightIntensity (Uint32 numlights, const float *intensity)=0 |
| virtual bool | SetLights (Uint32 numlights, const Light *l)=0 |
| const Light & | GetLight (const Uint32 idx) const |
| virtual Uint32 | GetNumLights () const |
| virtual bool | SetAmbientColor (const Color &c)=0 |
| const Color & | GetAmbientColor () const |
| virtual bool | FlushCommandBuffers ()=0 |
| virtual bool | DrawBuffer (const VertexArray *v, Material *m)=0 |
| virtual bool | DrawBufferDynamic (VertexBuffer *v, uint32_t vtxOffset, IndexBuffer *i, uint32_t idxOffset, uint32_t numElems, Material *m)=0 |
| virtual bool | DrawMesh (MeshObject *, Material *)=0 |
| virtual bool | DrawMeshInstanced (MeshObject *, Material *, InstanceBuffer *)=0 |
| virtual Material * | CreateMaterial (const std::string &shader, const MaterialDescriptor &descriptor, const RenderStateDesc &stateDescriptor)=0 |
| virtual Material * | CloneMaterial (const Material *mat, const MaterialDescriptor &descriptor, const RenderStateDesc &stateDescriptor)=0 |
| virtual Texture * | CreateTexture (const TextureDescriptor &descriptor)=0 |
| virtual RenderTarget * | CreateRenderTarget (const RenderTargetDesc &)=0 |
| virtual VertexBuffer * | CreateVertexBuffer (const VertexBufferDesc &)=0 |
| virtual IndexBuffer * | CreateIndexBuffer (Uint32 size, BufferUsage, IndexBufferSize=INDEX_BUFFER_32BIT)=0 |
| virtual InstanceBuffer * | CreateInstanceBuffer (Uint32 size, BufferUsage)=0 |
| virtual UniformBuffer * | CreateUniformBuffer (Uint32 size, BufferUsage)=0 |
| virtual MeshObject * | CreateMeshObject (VertexBuffer *vertexBuffer, IndexBuffer *indexBuffer=nullptr)=0 |
| virtual MeshObject * | CreateMeshObjectFromArray (const VertexArray *vertexArray, IndexBuffer *indexBuffer=nullptr, BufferUsage usage=BUFFER_USAGE_STATIC)=0 |
| virtual const RenderStateDesc & | GetMaterialRenderState (const Material *mat)=0 |
| Texture * | GetCachedTexture (const std::string &type, const std::string &name) |
| void | AddCachedTexture (const std::string &type, const std::string &name, Texture *texture) |
| void | RemoveCachedTexture (const std::string &type, const std::string &name) |
| void | RemoveAllCachedTextures () |
| const TextureCache & | GetTextureCache () |
| virtual bool | ReloadShaders ()=0 |
| virtual bool | Screendump (ScreendumpState &sd) |
| virtual bool | FrameGrab (ScreendumpState &sd) |
| Stats & | GetStats () |
Static Public Member Functions | |
| static constexpr size_t | GetName (std::string_view s) |
Protected Member Functions | |
| virtual void | PushState ()=0 |
| virtual void | PopState ()=0 |
Protected Attributes | |
| int | m_width |
| int | m_height |
| Color | m_ambient |
| Light | m_lights [4] |
| Stats | m_stats |
| SDL_Window * | m_window |
| using Graphics::Renderer::TextureCache = TextureCacheMap |
| Graphics::Renderer::Renderer | ( | SDL_Window * | win, |
| int | width, | ||
| int | height | ||
| ) |
|
virtual |

| void Graphics::Renderer::AddCachedTexture | ( | const std::string & | type, |
| const std::string & | name, | ||
| Texture * | texture | ||
| ) |

|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
inlinevirtual |
Reimplemented in Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererOGL, and Graphics::RendererDummy.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererOGL, and Graphics::RendererDummy.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererOGL, and Graphics::RendererDummy.
|
pure virtual |
Implemented in Graphics::RendererOGL, and Graphics::RendererDummy.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererOGL, and Graphics::RendererDummy.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
inlinevirtual |
Reimplemented in Graphics::RendererOGL.
|
inline |
| Texture * Graphics::Renderer::GetCachedTexture | ( | const std::string & | type, |
| const std::string & | name | ||
| ) |
|
inline |
|
inline |
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
inlinestaticconstexpr |

|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
inlinevirtual |
Reimplemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
inline |
|
inline |
|
inline |
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
inline |
|
inline |
|
protectedpure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
protectedpure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
| void Graphics::Renderer::RemoveAllCachedTextures | ( | ) |
| void Graphics::Renderer::RemoveCachedTexture | ( | const std::string & | type, |
| const std::string & | name | ||
| ) |
|
inlinevirtual |
Reimplemented in Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererOGL, and Graphics::RendererDummy.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
pure virtual |
Implemented in Graphics::RendererDummy, and Graphics::RendererOGL.
|
inlinevirtual |
Reimplemented in Graphics::RendererOGL.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |