mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-20 21:35:12 +00:00
Merge branch 'develop' of github.com:AnonymusRaccoon/Bomberman into bonus
# Conflicts: # CMakeLists.txt # sources/Map/Map.cpp
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "Drawables/Texture.hpp"
|
||||
#include "Drawables/ADrawable3D.hpp"
|
||||
#include "Model/ModelAnimation.hpp"
|
||||
#include "Shaders/Shaders.hpp"
|
||||
#include <raylib.h>
|
||||
#include <vector>
|
||||
#include <optional>
|
||||
@@ -26,12 +27,12 @@ namespace RAY::Drawables::Drawables3D {
|
||||
//! @brief Create an model, loading a file
|
||||
//! @param filePath: path to file to load
|
||||
//! @param lonely: should be set to true if the entity's loaded data must be independant from others
|
||||
Model(const std::string &filePath,
|
||||
Model(const std::string &filePath, bool lonely = false,
|
||||
std::optional<std::pair<MaterialType, std::string>> texture = std::nullopt,
|
||||
const RAY::Vector3 &scale = RAY::Vector3(1, 1, 1),
|
||||
const RAY::Vector3 &position = {0, 0, 0},
|
||||
const RAY::Vector3 &rotationAxis = RAY::Vector3(0, 1, 0),
|
||||
float rotationAngle = 0, bool lonely = false);
|
||||
float rotationAngle = 0);
|
||||
|
||||
//! @brief Create an model, loading a file
|
||||
//! @param mesh: mesh to load
|
||||
@@ -78,6 +79,12 @@ namespace RAY::Drawables::Drawables3D {
|
||||
//! @return Scale
|
||||
const RAY::Vector3 & getScale(void);
|
||||
|
||||
//! @brief Set a shader on the model
|
||||
void setShader(const RAY::Shader &shader);
|
||||
|
||||
//! @brief Set the original shader (used to disable a shader)
|
||||
void resetShader();
|
||||
|
||||
void drawOn(RAY::Window &) override;
|
||||
|
||||
private:
|
||||
@@ -91,6 +98,8 @@ namespace RAY::Drawables::Drawables3D {
|
||||
float _rotationAngle;
|
||||
//! @brief Scale of the shape
|
||||
RAY::Vector3 _scale;
|
||||
//! @brief The original shaderId used to disable a shader effect
|
||||
::Shader _originalShader = {};
|
||||
|
||||
static RAY::Cache<::Model> _modelsCache;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user