Skip to content

Commit

Permalink
Fixed a bug that prevented the project from compiling in VS2015 and l…
Browse files Browse the repository at this point in the history
…ater.
  • Loading branch information
Dejan Azinovic committed Mar 2, 2018
1 parent 68c36e3 commit cd69b7b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/application-d3d11/D3D11Canvas2D.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ namespace ml {
void addElement(const std::string& elementId, const Element& e) {
auto type = e.getType();
if (type == ELEMENT_TYPE_BILLBOARD) {
auto _e = e.castBillboard();
const ElementBillboard& _e = e.castBillboard();
addBillboard(elementId, _e.m_box, ColorImageR8G8B8A8(_e.m_tex.getImage()), _e.m_depth);
}
else if (type == ELEMENT_TYPE_BOX) {
auto _e = e.castBox();
const ElementBox& _e = e.castBox();
addBox(elementId, _e.m_box, _e.m_color, _e.m_depth, _e.m_bUseDefaultShader);
}
else if (type == ELEMENT_TYPE_CIRCLE) {
auto _e = e.castCircle();
const ElementCircle& _e = e.castCircle();
addCircle(elementId, _e.m_constants.center, _e.m_constants.radius, _e.m_constants.color, _e.m_depth);
}
else throw MLIB_EXCEPTION("unknown type");
Expand Down
2 changes: 1 addition & 1 deletion include/core-mesh/triMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ namespace ml {

//! move operator
void operator=(TriMesh&& t) {
std::swap(*this, t);
swap(*this, t);
}

//! adl swap
Expand Down
1 change: 1 addition & 0 deletions src/application-d3d11/D3D11Canvas2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ void D3D11Canvas2D::ElementBillboard::render()
if (m_bUseDefaultShader) m_graphics->getShaderManager().bindShaders("defaultCanvasBillboard");
m_tex.bind();
m_mesh.render();
m_tex.unbind();
}

void D3D11Canvas2D::init(GraphicsDevice& g)
Expand Down

0 comments on commit cd69b7b

Please sign in to comment.