mirror of
https://github.com/JulianGro/overte.git
synced 2025-06-09 12:34:13 +02:00
Warning fixes.
This commit is contained in:
parent
e6b0dc592b
commit
18cb15ee7d
3 changed files with 13 additions and 6 deletions
|
@ -2319,9 +2319,16 @@ void StaticModelRenderer::renderUnclipped(float alpha, Mode mode) {
|
||||||
_model->render(alpha);
|
_model->render(alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StaticModelRenderer::findRayIntersection(RayIntersectionInfo& intersection,
|
bool StaticModelRenderer::findRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
const glm::vec3& clipMinimum, float clipSize) const {
|
const glm::vec3& clipMinimum, float clipSize, float& distance) const {
|
||||||
return _model->findRayIntersection(intersection);
|
RayIntersectionInfo info;
|
||||||
|
info._rayStart = origin;
|
||||||
|
info._rayDirection = direction;
|
||||||
|
if (!_model->findRayIntersection(info)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
distance = info._hitDistance;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StaticModelRenderer::applyTranslation(const glm::vec3& translation) {
|
void StaticModelRenderer::applyTranslation(const glm::vec3& translation) {
|
||||||
|
|
|
@ -370,8 +370,8 @@ public:
|
||||||
|
|
||||||
virtual void init(Spanner* spanner);
|
virtual void init(Spanner* spanner);
|
||||||
virtual void simulate(float deltaTime);
|
virtual void simulate(float deltaTime);
|
||||||
virtual bool findRayIntersection(RayIntersectionInfo& intersection,
|
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
const glm::vec3& clipMinimum, float clipSize) const;
|
const glm::vec3& clipMinimum, float clipSize, float& distance) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
|
@ -505,7 +505,7 @@ void Avatar::renderBody(RenderMode renderMode, bool postLighting, float glowLeve
|
||||||
{
|
{
|
||||||
Glower glower(glowLevel);
|
Glower glower(glowLevel);
|
||||||
|
|
||||||
if (_shouldRenderBillboard || !(_skeletonModel.isRenderable() && getHead()->getFaceModel().isRenderable()) &&
|
if ((_shouldRenderBillboard || !(_skeletonModel.isRenderable() && getHead()->getFaceModel().isRenderable())) &&
|
||||||
(postLighting || renderMode == SHADOW_RENDER_MODE)) {
|
(postLighting || renderMode == SHADOW_RENDER_MODE)) {
|
||||||
// render the billboard until both models are loaded
|
// render the billboard until both models are loaded
|
||||||
renderBillboard();
|
renderBillboard();
|
||||||
|
|
Loading…
Reference in a new issue