X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fglwidget.cpp;h=65ccd57982ccd7f7ea42d6658333c67e0e17fb5d;hb=34c2f4526d11f2139130c4c94920dd7b1c7a6124;hp=d0e1934ed32a84a2a3499979522bd63ead26fe32;hpb=85fb2fe5f5a002a261e6b873b8393e085990a700;p=virtualjaguar diff --git a/src/gui/glwidget.cpp b/src/gui/glwidget.cpp index d0e1934..65ccd57 100644 --- a/src/gui/glwidget.cpp +++ b/src/gui/glwidget.cpp @@ -13,9 +13,14 @@ #include "glwidget.h" +#include "jaguar.h" #include "settings.h" #include "tom.h" -#include "video.h" + +#ifdef __GCCWIN32__ +// Apparently on win32, various OpenGL constants aren't pulled in. +#include +#endif GLWidget::GLWidget(QWidget * parent/*= 0*/): QGLWidget(parent), texture(0), textureWidth(0), textureHeight(0), buffer(0), rasterWidth(320), rasterHeight(240) @@ -112,6 +117,17 @@ printf("Resizing: new raster width/height = %i x %i\n", rasterWidth, rasterHeigh } buffer = new uint32_t[textureWidth * textureHeight]; +#warning "!!! Remove all backbuffer stuff, since it's unneeded !!!" +/* +We do this here just as a quick 'n' dirty shortcut. We don't need a backbuffer, +as OpenGL takes care of all that crap for us. This means we also have to fix the +Jaguar core, giving it a setup function for setting things like the video buffer, +etc. +*/ + backbuffer = buffer; + +//??? +memset(buffer, 0x00, textureWidth * textureHeight * sizeof(uint32_t)); glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glPixelStorei(GL_UNPACK_ROW_LENGTH, textureWidth);