]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/glwidget.cpp
Incremental changes to get Jaguar engine to work in QT environment.
[virtualjaguar] / src / gui / glwidget.cpp
index e32dde3682aa65c4b6d842e6d960313803e669ae..9788bc3b4f65e53cc6cd5fb039e01f3ee827b59d 100644 (file)
 #include "glwidget.h"
 
 #include "settings.h"
+#include "tom.h"
+#include "video.h"
 
 GLWidget::GLWidget(QWidget * parent/*= 0*/): QGLWidget(parent), texture(0),
        textureWidth(0), textureHeight(0), buffer(0), rasterWidth(320), rasterHeight(240)
 {
+//     tomDeviceWidth = rasterWidth;
+       tomDeviceWidth = 1024;  // It has to be the texture width...
+
+       // Set up the backbuffer
+       // To be safe, this should be 1280 * 625 * 2...
+       backbuffer = (uint32_t *)malloc(1280 * 625 * sizeof(uint32_t));
+//     memset(backbuffer, 0x44, rasterWidth *
+       memset(backbuffer, 0xFF, 1024 *
+               (vjs.hardwareTypeNTSC ? rasterHeight : VIRTUAL_SCREEN_HEIGHT_PAL)
+               * sizeof(uint32_t));
 }
 
 GLWidget::~GLWidget()
 {
+       delete[] backbuffer;
 }
 
 void GLWidget::initializeGL()