Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Some future release
-
None
-
c589443f467bc4e047d3810e7c794e8c8d072cef
Description
To Reproduce:
line "qDebug() << "Cullable?" << painter->isCullable(QVector3D(0.0f,0.0f,0.0f));" in the following examples->cubeview.cpp
returns true, instead of false which is correct return value.
============
#include "cubeview.h"
#include "qglcube.h"
void CubeView::initializeGL(QGLPainter *painter)
{
cube.newSection(QGL::Faceted);
cube << QGLCube(1.5f);
painter->setFaceColor(QGL::AllFaces, QColor(170, 202, 0));
QImage textureImage(":/qtlogo.png");
texture.setImage(textureImage);
painter->setStandardEffect(QGL::LitDecalTexture2D);
painter->setTexture(&texture);
}
void CubeView::paintGL(QGLPainter *painter)
{
qDebug() << "Cullable?" << painter->isCullable(QVector3D(0.0f,0.0f,0.0f));
painter->modelViewMatrix().rotate(45.0f, 1.0f, 1.0f, 1.0f);
cube.draw(painter);
}
=====================
Fix:
In QGLPainter:
QGLPainter line 994: projected = d->projectionMatrix * point;
should be
projected = d->projectionMatrix * projected;