git-svn-id: svn://db.shs.com.ru/libs@54 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -138,7 +138,7 @@ void QGLView::drawBackground(QPainter * painter, const QRectF & rect) {
|
||||
|
||||
|
||||
void QGLView::initializeGL() {
|
||||
//qDebug() << "init glview";
|
||||
qDebug() << "init glview";
|
||||
makeCurrent();
|
||||
currentQGLView = (QGLWidget * )viewport();
|
||||
currentGLTextureManager = &textures_manager;
|
||||
@@ -188,6 +188,7 @@ void QGLView::initializeGL() {
|
||||
//shader_rope = new QGLShaderProgram(context());
|
||||
reloadThisShaders();
|
||||
is_init = true;
|
||||
resizeGL(viewport()->width(), viewport()->height());
|
||||
|
||||
//dynamic_cubemap.loadPathesFromDirectory("e");
|
||||
//dynamic_cubemap.load();
|
||||
@@ -271,7 +272,7 @@ void QGLView::paintGL() {
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
}
|
||||
|
||||
|
||||
camera().apply(aspect);
|
||||
|
||||
static GLRendererBase * prev_rend = 0;
|
||||
@@ -470,7 +471,8 @@ void QGLView::collectObjectLights(GLObjectBase * o) {
|
||||
|
||||
void QGLView::checkCaps() {
|
||||
glGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &max_anisotropic);
|
||||
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &max_texture_chanels);
|
||||
//glGetIntegerv(GL_MAX_TEXTURE_UNITS, &max_texture_chanels);
|
||||
//qDebug() << max_texture_chanels;
|
||||
//qDebug() << max_texture_chanels;
|
||||
shaders_supported = QGLShaderProgram::hasOpenGLShaderPrograms();
|
||||
}
|
||||
@@ -501,8 +503,10 @@ void QGLView::applyFog() {
|
||||
|
||||
|
||||
void QGLView::resizeGL(int width, int height) {
|
||||
if (!is_init) return;
|
||||
aspect = double(width) / double(height);
|
||||
if (renderer_ != 0) renderer_->resize(width, height);
|
||||
qDebug() << "resize" << width << height;
|
||||
fbo_selection.resize(width, height);
|
||||
mouse_first = true;
|
||||
iaspect = (aspect == 0.) ? 0. : 1 / aspect;
|
||||
|
||||
Reference in New Issue
Block a user