Improved clarity and whitespace
Changed QGL version to 3,2 in order to be less restrictive, yet it should still change up to 4,1 on OSX on Qt5.
This commit is contained in:
parent
403e4bf837
commit
034e3aabc8
|
@ -104,7 +104,7 @@ GRenderWindow::GRenderWindow(QWidget* parent) : QWidget(parent), emu_thread(this
|
||||||
// TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose
|
// TODO: One of these flags might be interesting: WA_OpaquePaintEvent, WA_NoBackground, WA_DontShowOnScreen, WA_DeleteOnClose
|
||||||
QGLFormat fmt;
|
QGLFormat fmt;
|
||||||
fmt.setProfile(QGLFormat::CoreProfile);
|
fmt.setProfile(QGLFormat::CoreProfile);
|
||||||
fmt.setVersion(4,1);
|
fmt.setVersion(3,2);
|
||||||
fmt.setSampleBuffers(true);
|
fmt.setSampleBuffers(true);
|
||||||
fmt.setSamples(4);
|
fmt.setSamples(4);
|
||||||
|
|
||||||
|
|
|
@ -654,6 +654,7 @@ inline PointerWrapSection::~PointerWrapSection() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Commented out because it is currently unused, and breaks builds on OSX
|
||||||
/*class CChunkFileReader
|
/*class CChunkFileReader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -20,13 +20,13 @@ void DumpTGA(std::string filename, int width, int height, u8* raw_data) {
|
||||||
TGAHeader hdr;
|
TGAHeader hdr;
|
||||||
FILE* fout;
|
FILE* fout;
|
||||||
u8 r, g, b;
|
u8 r, g, b;
|
||||||
|
|
||||||
memset(&hdr, 0, sizeof(hdr));
|
memset(&hdr, 0, sizeof(hdr));
|
||||||
hdr.datatypecode = 2; // uncompressed RGB
|
hdr.datatypecode = 2; // uncompressed RGB
|
||||||
hdr.bitsperpixel = 24; // 24 bpp
|
hdr.bitsperpixel = 24; // 24 bpp
|
||||||
hdr.width = width;
|
hdr.width = width;
|
||||||
hdr.height = height;
|
hdr.height = height;
|
||||||
|
|
||||||
fout = fopen(filename.c_str(), "wb");
|
fout = fopen(filename.c_str(), "wb");
|
||||||
fwrite(&hdr, sizeof(TGAHeader), 1, fout);
|
fwrite(&hdr, sizeof(TGAHeader), 1, fout);
|
||||||
for (int i = 0; i < height; i++) {
|
for (int i = 0; i < height; i++) {
|
||||||
|
@ -41,4 +41,4 @@ void DumpTGA(std::string filename, int width, int height, u8* raw_data) {
|
||||||
}
|
}
|
||||||
fclose(fout);
|
fclose(fout);
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
@ -30,6 +30,7 @@ void Start() {
|
||||||
|
|
||||||
/// Initialize the video core
|
/// Initialize the video core
|
||||||
void Init(EmuWindow* emu_window) {
|
void Init(EmuWindow* emu_window) {
|
||||||
|
// Known problem with GLEW prevents contexts above 2.x on OSX unless glewExperimental is enabled.
|
||||||
glewExperimental = GL_TRUE;
|
glewExperimental = GL_TRUE;
|
||||||
|
|
||||||
g_emu_window = emu_window;
|
g_emu_window = emu_window;
|
||||||
|
|
Reference in New Issue