Simulant  21.12-1275
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
smlt::Renderer Class Referenceabstract
Inheritance diagram for smlt::Renderer:
smlt::batcher::RenderGroupFactory smlt::GLRenderer smlt::PSPRenderer smlt::GenericRenderer smlt::GL1XRenderer

Public Types

typedef std::shared_ptr< Rendererptr
 

Public Member Functions

 Renderer (Window *window)
 
virtual std::shared_ptr< batcher::RenderQueueVisitorget_render_queue_visitor (CameraPtr camera)=0
 
virtual void init_context ()=0
 
virtual GPUProgramPtr new_or_existing_gpu_program (const std::string &vertex_shader, const std::string &fragment_shader)
 
virtual GPUProgramPtr current_gpu_program () const
 
virtual GPUProgramPtr gpu_program (const GPUProgramID &) const
 
virtual GPUProgramPtr default_gpu_program () const
 
virtual std::string name () const =0
 
virtual void prepare_to_render (const Renderable *renderable)=0
 
bool natively_supports_texture_format (TextureFormat fmt)
 
bool supports_texture_format (TextureFormat fmt)
 
virtual void apply_viewport (const RenderTarget &target, const Viewport &viewport)
 
virtual void clear (const RenderTarget &target, const Color &color, uint32_t clear_flags)
 
virtual void do_swap_buffers ()
 
virtual std::size_t max_texture_size () const
 
virtual bool texture_format_is_native (TextureFormat fmt)
 
virtual bool texture_format_is_usable (TextureFormat fmt)
 
virtual bool supports_gpu_programs () const
 
bool is_texture_registered (AssetID texture_id) const
 
void pre_render ()
 
void post_render ()
 
void prepare_texture (Texture *texture)
 
void prepare_material (Material *material)
 
- Public Member Functions inherited from smlt::batcher::RenderGroupFactory
virtual RenderGroupKey prepare_render_group (RenderGroup *group, const Renderable *renderable, const MaterialPass *material_pass, const RenderPriority priority, const uint8_t pass_number, const bool is_blended, const float distance_to_camera, uint16_t texture_id)=0
 

Public Attributes

Property< Window *Renderer::* > window = { this, &Renderer::window_ }
 

Friends

class Texture
 

Member Function Documentation

◆ natively_supports_texture_format()

bool smlt::Renderer::natively_supports_texture_format ( TextureFormat  fmt)
inline

Returns true if the GPU can support the texture format without any kind of conversion

◆ supports_texture_format()

bool smlt::Renderer::supports_texture_format ( TextureFormat  fmt)
inline

Returns true if the renderer can convert the specified format to make it usable, or if it natively supports the format

◆ texture_format_is_native()

bool smlt::Renderer::texture_format_is_native ( TextureFormat  fmt)
virtual

To be overridden by subclasses. Default supported textures are those that are supported by glTexImage2D without any extensions

Reimplemented in smlt::PSPRenderer, and smlt::GLRenderer.

◆ texture_format_is_usable()

bool smlt::Renderer::texture_format_is_usable ( TextureFormat  fmt)
virtual

To be overridden by subclasses to specify texture formats that can be handled by the renderer


The documentation for this class was generated from the following files: