16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 17:09:19 +02:00

opengl 3.3 renderer integration, minor renderer tweaks

This commit is contained in:
tmj-fstate
2019-10-31 19:37:53 +01:00
parent 9dcaa1e339
commit ae3cecfa42
49 changed files with 1804 additions and 412 deletions

View File

@@ -31,14 +31,14 @@ public:
// creates a new geometry chunk of specified type from supplied vertex data, in specified bank. returns: handle to the chunk or NULL
virtual auto Insert( gfx::vertex_array &Vertices, gfx::geometrybank_handle const &Geometry, int const Type ) -> gfx::geometry_handle = 0;
// replaces data of specified chunk with the supplied vertex data, starting from specified offset
virtual auto Replace( gfx::vertex_array &Vertices, gfx::geometry_handle const &Geometry, std::size_t const Offset = 0 ) -> bool = 0;
virtual auto Replace( gfx::vertex_array &Vertices, gfx::geometry_handle const &Geometry, int const Type, std::size_t const Offset = 0 ) -> bool = 0;
// adds supplied vertex data at the end of specified chunk
virtual auto Append( gfx::vertex_array &Vertices, gfx::geometry_handle const &Geometry ) -> bool = 0;
virtual auto Append( gfx::vertex_array &Vertices, gfx::geometry_handle const &Geometry, int const Type ) -> bool = 0;
// provides direct access to vertex data of specfied chunk
virtual auto Vertices( gfx::geometry_handle const &Geometry ) const ->gfx::vertex_array const & = 0;
// material methods
virtual auto Fetch_Material( std::string const &Filename, bool const Loadnow = true ) -> material_handle = 0;
virtual void Bind_Material( material_handle const Material ) = 0;
virtual void Bind_Material( material_handle const Material, TSubModel *sm = nullptr ) = 0;
virtual auto Material( material_handle const Material ) const -> opengl_material const & = 0;
// shader methods
virtual auto Fetch_Shader( std::string const &name ) -> std::shared_ptr<gl::program> = 0;
@@ -49,8 +49,8 @@ public:
virtual auto Texture( texture_handle const Texture ) -> opengl_texture & = 0;
virtual auto Texture( texture_handle const Texture ) const -> opengl_texture const & = 0;
// utility methods
virtual void Pick_Control( std::function<void( TSubModel const * )> Callback ) = 0;
virtual void Pick_Node( std::function<void( scene::basic_node * )> Callback ) = 0;
virtual void Pick_Control_Callback( std::function<void( TSubModel const * )> Callback ) = 0;
virtual void Pick_Node_Callback( std::function<void( scene::basic_node * )> Callback ) = 0;
virtual auto Pick_Control() const -> TSubModel const * = 0;
virtual auto Pick_Node() const -> scene::basic_node const * = 0;