The fruits of my labor
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#include "UISprite.hpp"
|
||||
#include "game/DawnGame.hpp"
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
@ -22,12 +23,21 @@ void UISprite::updatePositions() {
|
||||
);
|
||||
}
|
||||
|
||||
void UISprite::drawSelf(UIShader *uiShader, glm::mat4 selfTransform) {
|
||||
uiShader->setUITexture(nullptr);
|
||||
uiShader->setUIModel(selfTransform);
|
||||
uiShader->setUIModel(glm::mat4(1.0f));
|
||||
uiShader->setUIColor(this->color);
|
||||
uiShader->setUITexture(this->texture);
|
||||
std::vector<struct ShaderPassItem> UISprite::getSelfPassItems(
|
||||
glm::mat4 projection,
|
||||
glm::mat4 view,
|
||||
glm::mat4 transform
|
||||
) {
|
||||
std::vector<struct ShaderPassItem> items;
|
||||
|
||||
this->mesh.draw(MESH_DRAW_MODE_TRIANGLES, 0, -1);
|
||||
items.push_back(this->getGame()->renderManager.uiShaderProgram.getUIPassItem(
|
||||
projection,
|
||||
view,
|
||||
transform,
|
||||
this->texture,
|
||||
this->color,
|
||||
&this->mesh,
|
||||
this->z
|
||||
));
|
||||
return items;
|
||||
}
|
Reference in New Issue
Block a user