Merge remote-tracking branch 'origin/master' into bumpy
This commit is contained in:
commit
7e65d4d346
@ -598,6 +598,11 @@ void glUniform1fWrapper(GLuint a, float b)
|
|||||||
glUniform1f(a, b);
|
glUniform1f(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool needsUBO()
|
||||||
|
{
|
||||||
|
return irr_driver->needUBOWorkaround();
|
||||||
|
}
|
||||||
|
|
||||||
namespace MeshShader
|
namespace MeshShader
|
||||||
{
|
{
|
||||||
// Solid Normal and depth pass shaders
|
// Solid Normal and depth pass shaders
|
||||||
|
@ -53,6 +53,7 @@ void glUniformMatrix4fvWraper(GLuint, size_t, unsigned, const float *mat);
|
|||||||
void glUniform3fWraper(GLuint, float, float, float);
|
void glUniform3fWraper(GLuint, float, float, float);
|
||||||
void glUniform2fWraper(GLuint a, float b, float c);
|
void glUniform2fWraper(GLuint a, float b, float c);
|
||||||
void glUniform1fWrapper(GLuint, float);
|
void glUniform1fWrapper(GLuint, float);
|
||||||
|
bool needsUBO();
|
||||||
|
|
||||||
struct UniformHelper
|
struct UniformHelper
|
||||||
{
|
{
|
||||||
@ -128,7 +129,7 @@ public:
|
|||||||
|
|
||||||
void setUniforms(const Args & ... args) const
|
void setUniforms(const Args & ... args) const
|
||||||
{
|
{
|
||||||
if (irr_driver->needUBOWorkaround())
|
if (needsUBO())
|
||||||
bypassUBO(Program);
|
bypassUBO(Program);
|
||||||
UniformHelper::setUniformsHelper(uniforms, args...);
|
UniformHelper::setUniformsHelper(uniforms, args...);
|
||||||
}
|
}
|
||||||
@ -158,7 +159,7 @@ public:
|
|||||||
|
|
||||||
void setUniforms(const Args & ... args) const
|
void setUniforms(const Args & ... args) const
|
||||||
{
|
{
|
||||||
if (irr_driver->needUBOWorkaround())
|
if (needsUBO())
|
||||||
bypassUBO(Program);
|
bypassUBO(Program);
|
||||||
UniformHelper::setUniformsHelper(uniforms, args...);
|
UniformHelper::setUniformsHelper(uniforms, args...);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,18 @@ STKTextBillboard::STKTextBillboard(core::stringw text, gui::ScalableFont* font,
|
|||||||
updateAbsolutePosition();
|
updateAbsolutePosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void STKTextBillboard::updateAbsolutePosition()
|
||||||
|
{
|
||||||
|
if (Parent)
|
||||||
|
{
|
||||||
|
// Override to not use the parent's rotation
|
||||||
|
AbsoluteTransformation = getRelativeTransformation();
|
||||||
|
AbsoluteTransformation.setTranslation(AbsoluteTransformation.getTranslation() + Parent->getAbsolutePosition());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
AbsoluteTransformation = getRelativeTransformation();
|
||||||
|
}
|
||||||
|
|
||||||
scene::IMesh* STKTextBillboard::getTextMesh(core::stringw text, gui::ScalableFont* font)
|
scene::IMesh* STKTextBillboard::getTextMesh(core::stringw text, gui::ScalableFont* font)
|
||||||
{
|
{
|
||||||
font->doDraw(text, core::rect<s32>(0, 0, 1000, 1000), video::SColor(255,255,255,255),
|
font->doDraw(text, core::rect<s32>(0, 0, 1000, 1000), video::SColor(255,255,255,255),
|
||||||
|
@ -62,6 +62,8 @@ public:
|
|||||||
const irr::core::rect<irr::s32>& destRect,
|
const irr::core::rect<irr::s32>& destRect,
|
||||||
const irr::core::rect<irr::s32>& sourceRect,
|
const irr::core::rect<irr::s32>& sourceRect,
|
||||||
const irr::video::SColor* const colors);
|
const irr::video::SColor* const colors);
|
||||||
|
|
||||||
|
virtual void updateAbsolutePosition() OVERRIDE;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user