This commit is contained in:
mfeemster
2014-12-14 20:25:46 -08:00
parent a004f71888
commit 9502ae57ab
13 changed files with 57 additions and 36 deletions

View File

@ -176,9 +176,14 @@ void GLWidget::initializeGL()
{
glClearColor(0.0, 0.0, 0.0, 1.0);
//int w = m_Fractorium->width() - m_Fractorium->ui.DockWidget->width();
//int h = m_Fractorium->ui.DockWidget->height();
int w = m_Fractorium->ui.GLParentScrollArea->width();
int h = m_Fractorium->ui.GLParentScrollArea->height();
//show();
//m_Fractorium->ui.GLParentScrollArea->showMaximized();
SetDimensions(w, h);
m_Fractorium->m_WidthSpin->setValue(w);
m_Fractorium->m_HeightSpin->setValue(h);
@ -193,6 +198,7 @@ void GLWidget::initializeGL()
//Start with a flock of 10 random embers. Can't do this until now because the window wasn't maximized yet, so the sizes would have been off.
m_Fractorium->OnActionNewFlock(false);
//m_Fractorium->repaint();
m_Fractorium->m_Controller->DelayedStartRenderTimer();
m_Init = true;
}
@ -740,6 +746,7 @@ void GLWidget::resizeEvent(QResizeEvent* e)
void GLWidget::SetDimensions(int w, int h)
{
setFixedSize(w, h);
//resize(w, h);
//m_Fractorium->ui.GLParentScrollAreaContents->setFixedSize(w, h);
}
@ -764,10 +771,7 @@ bool GLWidget::Allocate(bool force)
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
if (doResize)
{
glBindTexture(GL_TEXTURE_2D, m_OutputTexID);
Deallocate();
}
glGenTextures(1, &m_OutputTexID);
glBindTexture(GL_TEXTURE_2D, m_OutputTexID);
@ -799,6 +803,7 @@ bool GLWidget::Deallocate()
if (m_OutputTexID != 0)
{
glBindTexture(GL_TEXTURE_2D, m_OutputTexID);
glDeleteTextures(1, &m_OutputTexID);
m_OutputTexID = 0;
deleted = true;