3 #ifndef GDK_GFX_CONTEXT_H 4 #define GDK_GFX_CONTEXT_H 8 #include <gdk/entity.h> 9 #include <gdk/material.h> 10 #include <gdk/model.h> 11 #include <gdk/scene.h> 12 #include <gdk/screen_camera.h> 13 #include <gdk/shader_program.h> 14 #include <gdk/texture.h> 15 #include <gdk/texture_camera.h> 16 #include <gdk/vertex_data.h> 85 [[nodiscard]]
virtual std::shared_ptr<screen_camera>
make_camera()
const = 0;
87 [[nodiscard]]
virtual std::shared_ptr<screen_camera>
make_camera(
108 const gdk::model::UsageHint &,
127 const std::string &aVertexStageSource,
128 const std::string &aFragmentStageSource
138 const std::vector<std::underlying_type<std::byte>::type> &aRGBA32PNGData
static context_ptr_type make(const implementation &)
context factory method
represents an observable 3d object.
Definition: entity.h:14
used to construct a model. Vertex data represents a set of vertex data in system memory ...
Definition: vertex_data.h:44
std::shared_ptr< model > model_ptr_type
model factory return type
Definition: graphics_context.h:42
std::shared_ptr< model > model_shared_ptr_type
shared ptr to a model
Definition: graphics_context.h:60
virtual ~context()=default
virtual destructor
std::shared_ptr< model > built_in_model_ptr_type
ptr type for built in models provided by the implementation
Definition: graphics_context.h:48
virtual entity_ptr_type make_entity(model_shared_ptr_type pModel, material_shared_ptr_type pMaterial) const =0
make an entity
virtual built_in_shader_ptr_type get_pink_shader_of_death() const =0
A forward renderer shader program useful for displaying render errors:
std::shared_ptr< context > context_ptr_type
ptr type returned by factory method
Definition: graphics_context.h:34
Definition: graphics_context.h:30
std::shared_ptr< scene > scene_shared_ptr_type
shared ptr for scene
Definition: graphics_context.h:54
implementation
specifies implementation to use in context construction
Definition: graphics_context.h:65
std::shared_ptr< context > context_shared_ptr_type
shared ptr to a context
Definition: graphics_context.h:52
std::shared_ptr< shader_program > shader_program_shared_ptr_type
shared ptr to a shader_program
Definition: graphics_context.h:56
virtual scene_ptr_type make_scene() const =0
makes a scene
std::shared_ptr< shader_program > shader_program_ptr_type
shader_program factory return type
Definition: graphics_context.h:40
std::shared_ptr< material > material_shared_ptr_type
shared ptr to a material
Definition: graphics_context.h:58
Definition: batch_model.h:15
virtual built_in_model_ptr_type get_quad_model() const =0
a 1x1 quad model
virtual built_in_model_ptr_type get_cube_model() const =0
a 1x1x1 cube model
virtual std::shared_ptr< screen_camera > make_camera() const =0
makes a camera TODO: rename to make_screen_camera probably
std::shared_ptr< texture > texture_shared_ptr_type
shared ptr to a texture
Definition: graphics_context.h:62
virtual std::shared_ptr< texture_camera > make_texture_camera() const =0
makes a texture_camera
std::shared_ptr< entity > entity_ptr_type
entity factory return type
Definition: graphics_context.h:38
virtual model_ptr_type make_model() const =0
construct an empty model
render_mode
render mode decides transparency etc
Definition: material.h:33
virtual texture_ptr_type make_texture(const texture::image_data_2d_view &imageView) const =0
make a texture using a 2d image view
pod struct representing a view on decoded image data
Definition: texture.h:35
std::shared_ptr< texture > texture_ptr_type
texture factory return type
Definition: graphics_context.h:46
std::shared_ptr< shader_program > built_in_shader_ptr_type
ptr type for built in shaders provided by the implementation
Definition: graphics_context.h:50
virtual material_ptr_type make_material(shader_program_shared_ptr_type pShader, material::render_mode aRenderMode=material::render_mode::opaque, material::FaceCullingMode aFaceCullingMode=material::FaceCullingMode::None) const =0
make a material.
FaceCullingMode
specify whether front- or back-facing polygons can be culled
Definition: material.h:24
virtual shader_program_ptr_type make_shader(const std::string &aVertexStageSource, const std::string &aFragmentStageSource) const =0
make a shader program containing a user-defined vertex shader stage and fragment shader stage ...
std::shared_ptr< material > material_ptr_type
material factory return type
Definition: graphics_context.h:44
std::shared_ptr< scene > scene_ptr_type
scene factory return type
Definition: graphics_context.h:36
virtual built_in_shader_ptr_type get_alpha_cutoff_shader() const =0
A forward renderer shader program with the following properties: