git-svn-id: svn://db.shs.com.ru/libs@60 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2015-12-04 13:59:10 +00:00
parent 6ab9283a18
commit 822e1518ce
15 changed files with 70 additions and 51 deletions

View File

@@ -72,7 +72,7 @@ QGLView::QGLView(QWidget * parent): QGraphicsView(parent), fbo_selection(3) {
setFeature(qglMotionBlurSteps, 8);
setFeature(qglShadowsEnabled, false);
setFeature(qglShadowsMapSize, 512);
setFeature(qglShadowsSoftEnabled, false);
setFeature(qglShadowsSoftEnabled, true);
setFeature(qglDynamicReflectionsEnabled, false);
setFeature(qglDynamicReflectionsMapSize, 512);
mouse_first = mouseSelect_ = hoverHalo_ = selectionHalo_ = true;
@@ -213,7 +213,8 @@ void QGLView::paintGL() {
glEnable(GL_CULL_FACE);
//glDisable(GL_CULL_FACE);
camera().apply(aspect);
objects_.preparePos(camera());
//objects_.preparePos(camera());
start_rp.cam_offset_matrix = camera().offsetMatrix();
start_rp.proj_matrix = getGLMatrix(GL_PROJECTION_MATRIX);
start_rp.view_matrix = getGLMatrix(GL_MODELVIEW_MATRIX);
//objects_.buildTransform();
@@ -276,7 +277,8 @@ void QGLView::paintGL() {
}
camera().apply(aspect);
objects_.preparePos(camera());
start_rp.cam_offset_matrix = camera().offsetMatrix();
//objects_.preparePos(camera());
static GLRendererBase * prev_rend = 0;
if (prev_rend != renderer_) {
@@ -422,7 +424,7 @@ void QGLView::renderSingleSelection(GLObjectBase & o) {
o.loadTextures();
}
if (!o.visible_ || !o.select_) return;
QMatrix4x4 curview = start_rp.view_matrix * o.itransform_;
QMatrix4x4 curview = start_rp.view_matrix * start_rp.cam_offset_matrix * o.itransform_;
ids.insert(cid, &o);
if (shaders_supported){
setUniformMatrices(shader_select, start_rp.proj_matrix, curview);