From: <dhu...@us...> - 2007-02-13 16:27:02
|
Revision: 316 http://svn.sourceforge.net/qcell/?rev=316&view=rev Author: dhubleizh Date: 2007-02-13 08:26:59 -0800 (Tue, 13 Feb 2007) Log Message: ----------- - fixed 2DView crash Modified Paths: -------------- trunk/qcell/baseheaders/Renderer.h trunk/qcell/basesources/Renderer.cpp trunk/qcell/basesources/simulationwindow.cpp Modified: trunk/qcell/baseheaders/Renderer.h =================================================================== --- trunk/qcell/baseheaders/Renderer.h 2007-02-13 16:11:34 UTC (rev 315) +++ trunk/qcell/baseheaders/Renderer.h 2007-02-13 16:26:59 UTC (rev 316) @@ -69,7 +69,7 @@ QVector<int> maskValue; bool showValues; - const char **texture; + const char** texture; bool force2D; Modified: trunk/qcell/basesources/Renderer.cpp =================================================================== --- trunk/qcell/basesources/Renderer.cpp 2007-02-13 16:11:34 UTC (rev 315) +++ trunk/qcell/basesources/Renderer.cpp 2007-02-13 16:26:59 UTC (rev 316) @@ -137,7 +137,7 @@ void Renderer::generateObserver(void) { glEnable(GL_TEXTURE_2D); - observerTexture = bindTexture(QPixmap(texture), GL_TEXTURE_2D); + observerTexture = bindTexture(texture, GL_TEXTURE_2D); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); @@ -865,7 +865,8 @@ void Renderer::setTexture(const char *xpm[]) { - texture = xpm; +// texture = QPixmap(xpm); + texture = xpm; } void Renderer::setOrtoPerspective(bool noClear) Modified: trunk/qcell/basesources/simulationwindow.cpp =================================================================== --- trunk/qcell/basesources/simulationwindow.cpp 2007-02-13 16:11:34 UTC (rev 315) +++ trunk/qcell/basesources/simulationwindow.cpp 2007-02-13 16:26:59 UTC (rev 316) @@ -620,6 +620,7 @@ ui.view2DGraph->setLayout(new QVBoxLayout(ui.view2DGraph)); graphicsView2D = new Renderer(ui.view2DGraph); + graphicsView2D->setTexture((const char**)observer_xpm); ui.view2DGraph->layout()->addWidget(graphicsView2D); graphicsView2D->force2DView(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |