gdk-graphics 0b051eb9b5c1eaa0658babaa4463dd7a80aa9d2c
Loading...
Searching...
No Matches
gdk::graphics::context Class Referenceabstract

entry point for gdk-graphics More...

#include <graphics_context.h>

Inheritance diagram for gdk::graphics::context:
gdk::webgl1es2_context

Public Member Functions

factory methods
virtual scene_ptr_type make_scene ()=0
 makes a scene
 
virtual camera_ptr_type make_camera ()=0
 makes a camera
 
virtual texture_camera_ptr_type make_texture_camera ()=0
 makes a texture_camera
 
virtual entity_ptr_type make_entity (const const_model_ptr_type pModel, const const_material_ptr_type pMaterial)=0
 make an entity
 
virtual model_ptr_type make_model (const gdk::model::usage_hint, const model_data &vertexData)=0
 make a model
 
virtual model_ptr_type make_model ()=0
 make an empty model
 
virtual material_ptr_type make_material (const const_shader_ptr_type pShader, const material::render_mode aRenderMode=material::render_mode::opaque, const material::face_culling_mode aFaceCullingMode=material::face_culling_mode::none)=0
 make a material.
 
virtual texture_ptr_type make_texture (const texture_data::view &aTextureDataView, const texture::wrap_mode aWrapModeU=texture::wrap_mode::repeat, const texture::wrap_mode aWrapModeV=texture::wrap_mode::repeat)=0
 make a texture
 
virtual texture_ptr_type make_texture ()=0
 make an empty texture
 
special resources provided by the implementation
virtual model_ptr_type get_cube_model () const =0
 a 1x1x1 cube model
 
virtual shader_ptr_type get_alpha_cutoff_shader () const =0
 Basic unlit forward renderer program: Attributes:
 
virtual ~context ()=default
 virtual destructor
 

Detailed Description

entry point for gdk-graphics

Member Function Documentation

◆ get_alpha_cutoff_shader()

virtual shader_ptr_type gdk::graphics::context::get_alpha_cutoff_shader ( ) const
nodiscardpure virtual

Basic unlit forward renderer program: Attributes:

  • vec3 pos
  • vec2 uv Uniforms:
  • _MVP: model-view-projection matrix
  • _Texture: used to color frags Vertex shader behavior:
  • multiply position by mvp Fragment shader behavior:
  • sample _Texture, if alpha is 0, discard frag, otherwise write frag to color buffer

Implemented in gdk::webgl1es2_context.

◆ get_cube_model()

virtual model_ptr_type gdk::graphics::context::get_cube_model ( ) const
nodiscardpure virtual

a 1x1x1 cube model

  • vertex attributes: vec3 pos, vec2 uv, vec3 normal

Implemented in gdk::webgl1es2_context.

◆ make_camera()

virtual camera_ptr_type gdk::graphics::context::make_camera ( )
nodiscardpure virtual

makes a camera

Implemented in gdk::webgl1es2_context.

◆ make_entity()

virtual entity_ptr_type gdk::graphics::context::make_entity ( const const_model_ptr_type pModel,
const const_material_ptr_type pMaterial )
nodiscardpure virtual

make an entity

Implemented in gdk::webgl1es2_context.

◆ make_material()

virtual material_ptr_type gdk::graphics::context::make_material ( const const_shader_ptr_type pShader,
const material::render_mode aRenderMode = material::render_mode::opaque,
const material::face_culling_mode aFaceCullingMode = material::face_culling_mode::none )
nodiscardpure virtual

make a material.

Implemented in gdk::webgl1es2_context.

◆ make_model() [1/2]

virtual model_ptr_type gdk::graphics::context::make_model ( )
nodiscardpure virtual

make an empty model

Implemented in gdk::webgl1es2_context.

◆ make_model() [2/2]

virtual model_ptr_type gdk::graphics::context::make_model ( const gdk::model::usage_hint ,
const model_data & vertexData )
nodiscardpure virtual

make a model

Implemented in gdk::webgl1es2_context.

◆ make_scene()

virtual scene_ptr_type gdk::graphics::context::make_scene ( )
nodiscardpure virtual

makes a scene

Implemented in gdk::webgl1es2_context.

◆ make_texture() [1/2]

virtual texture_ptr_type gdk::graphics::context::make_texture ( )
nodiscardpure virtual

make an empty texture

Implemented in gdk::webgl1es2_context.

◆ make_texture() [2/2]

virtual texture_ptr_type gdk::graphics::context::make_texture ( const texture_data::view & aTextureDataView,
const texture::wrap_mode aWrapModeU = texture::wrap_mode::repeat,
const texture::wrap_mode aWrapModeV = texture::wrap_mode::repeat )
nodiscardpure virtual

make a texture

Implemented in gdk::webgl1es2_context.

◆ make_texture_camera()

virtual texture_camera_ptr_type gdk::graphics::context::make_texture_camera ( )
nodiscardpure virtual

makes a texture_camera

Implemented in gdk::webgl1es2_context.


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