Euphoria
|
compiledmesh.cc
Go to the documentation of this file.
std::optional< DirPath > resolve_relative(const DirPath &base)
Definition: vfs_path.cc:349
constexpr ShaderAttribute tex_coord
Definition: shaderattribute3d.h:35
Definition: button.h:15
void bind_attributes(const std::vector< ShaderAttribute > &attributes, PointLayout *layout)
Definition: attributebinder.cc:11
@ triangles
void convert_tris_to_index_buffer(const std::vector< core::MeshFace > &faces, IndexBuffer *b)
Definition: compiledmesh.cc:216
void convert_points_to_vertex_buffer(const std::vector< core::LinePoint > &points, const std::vector< ShaderAttribute > &attributes, VertexBuffer *vb)
Definition: compiledlines.cc:36
void bind_texture_to_shader(Texture2 *texture, ShaderProgram *shader, const ShaderUniform &attribute, gl::Int index)
Definition: shader.cc:488
std::shared_ptr< CompiledMesh > compile_mesh(const core::Mesh &mesh, MaterialShaderCache *shader_cache, TextureCache *texture_cache, const io::DirPath &texture_folder, const std::string &debug_name)
Definition: compiledmesh.cc:231
@ white
Definition: enum.h:54
Definition: mesh.h:101
Definition: vfs_path.h:67
Definition: vfs_path.h:36
bool validate() const
Asks the shader if all the textures are set, and if more than necessary are set.
Definition: compiledmesh.cc:109
void apply(const mat4f &model_matrix, const mat4f &projection_matrix, const mat4f &view_matrix, const vec3f &camera, const Light &light) const
Definition: compiledmesh.cc:51
void load_default_materials_from_shader(TextureCache *cache)
Gets the default materials from the shader if they are null/not set.
Definition: compiledmesh.cc:93
std::map< core::EnumValue, std::shared_ptr< Texture2 > > textures
Definition: compiledmesh.h:48
std::shared_ptr< MaterialShader > shader
Definition: compiledmesh.h:47
CompiledMeshMaterial()
Definition: compiledmesh.cc:25
void set_texture(const core::EnumValue &name, std::shared_ptr< Texture2 > texture)
Definition: compiledmesh.cc:36
Definition: compiledmesh.h:29
std::vector< std::shared_ptr< CompiledMeshPart > > parts
Definition: compiledmesh.h:83
std::vector< CompiledMeshMaterial > materials
Definition: compiledmesh.h:84
void render(const mat4f &model_matrix, const mat4f &projection_matrix, const mat4f &view_matrix, const vec3f &camera, const Light &light, const std::shared_ptr< MaterialOverride > &overridden_materials)
Definition: compiledmesh.cc:359
Definition: light.h:18
Represents a shader attribute like vertex, normal or uv coord.
Definition: shaderattribute.h:30
Definition: texturecache.h:18
std::shared_ptr< Texture2 > get_texture(const io::FilePath &path) const
Definition: texturecache.cc:47
void set_data(const std::vector< float > &data)
Definition: buffer.cc:29