diff --git a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcproj b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcproj
index c5a3399f57..8149d16770 100644
--- a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcproj
+++ b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcproj
@@ -66,7 +66,7 @@
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Globals.h"
+ PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/VideoOGL.pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
@@ -175,7 +175,7 @@
EnableEnhancedInstructionSet="0"
FloatingPointModel="2"
UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Globals.h"
+ PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/VideoOGL.pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
@@ -275,7 +275,7 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Globals.h"
+ PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/VideoOGL.pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
@@ -374,7 +374,7 @@
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Globals.h"
+ PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/VideoOGL.pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
@@ -483,7 +483,7 @@
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Globals.h"
+ PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/VideoOGL.pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
@@ -594,7 +594,7 @@
EnableEnhancedInstructionSet="0"
FloatingPointModel="2"
UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Globals.h"
+ PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="$(IntDir)/VideoOGL.pch"
AssemblerListingLocation="$(IntDir)\"
ObjectFile="$(IntDir)\"
@@ -895,54 +895,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp b/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp
index 3387a941f2..ea1a7e7f2f 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/BPStructs.cpp
@@ -20,6 +20,7 @@
// -------------
#include "Globals.h"
#include "Profiler.h"
+#include "Config.h"
#include "VertexLoader.h"
#include "VertexManager.h"
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp
new file mode 100644
index 0000000000..6bdb3220dc
--- /dev/null
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Config.cpp
@@ -0,0 +1,104 @@
+// Copyright (C) 2003-2008 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
+#include "Globals.h"
+#include "Common.h"
+#include "IniFile.h"
+#include "Config.h"
+
+Config g_Config;
+
+Config::Config()
+{
+ memset(this, 0, sizeof(Config));
+}
+
+void Config::Load()
+{
+ std::string temp;
+ IniFile iniFile;
+ iniFile.Load("gfx_opengl.ini");
+
+ // get resolution
+ iniFile.Get("Hardware", "WindowedRes", &temp, 0);
+ if(temp.empty())
+ temp = "640x480";
+ strcpy(iWindowedRes, temp.c_str());
+ iniFile.Get("Hardware", "FullscreenRes", &temp, 0);
+ if(temp.empty())
+ temp = "640x480";
+ strcpy(iFSResolution, temp.c_str());
+
+ iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 0); // Hardware
+ iniFile.Get("Hardware", "RenderToMainframe", &renderToMainframe, 0);
+
+ iniFile.Get("Settings", "ShowFPS", &bShowFPS, false); // Settings
+ iniFile.Get("Settings", "OverlayStats", &bOverlayStats, false);
+ iniFile.Get("Settings", "DLOptimize", &iCompileDLsLevel, 0);
+ iniFile.Get("Settings", "DumpTextures", &bDumpTextures, 0);
+ iniFile.Get("Settings", "ShowShaderErrors", &bShowShaderErrors, 0);
+ iniFile.Get("Settings", "LogLevel", &iLog, 0);
+ iniFile.Get("Settings", "Multisample", &iMultisampleMode, 0);
+ if(iMultisampleMode == 0)
+ iMultisampleMode = 1;
+ std::string s;
+ iniFile.Get("Settings", "TexDumpPath", &s, 0);
+ if (s.size() < sizeof(texDumpPath) )
+ strcpy(texDumpPath, s.c_str());
+ else {
+ strncpy(texDumpPath, s.c_str(), sizeof(texDumpPath)-1);
+ texDumpPath[sizeof(texDumpPath)-1] = 0;
+ }
+
+ iniFile.Get("Settings", "TexFmtOverlayEnable", &bTexFmtOverlayEnable, 0);
+ iniFile.Get("Settings", "TexFmtOverlayCenter", &bTexFmtOverlayCenter, 0);
+ iniFile.Get("Settings", "UseXFB", &bUseXFB, 0);
+
+ iniFile.Get("Enhancements", "ForceFiltering", &bForceFiltering, 0);
+ iniFile.Get("Enhancements", "ForceMaxAniso", &bForceMaxAniso, 0);
+ iniFile.Get("Enhancements", "StretchToFit", &bStretchToFit, false);
+ iniFile.Get("Enhancements", "KeepAR", &bKeepAR, false);
+}
+
+void Config::Save()
+{
+ IniFile iniFile;
+ iniFile.Load("gfx_opengl.ini");
+ iniFile.Set("Hardware", "WindowedRes", iWindowedRes);
+ iniFile.Set("Hardware", "FullscreenRes", iFSResolution);
+ iniFile.Set("Hardware", "Fullscreen", bFullscreen);
+ iniFile.Set("Hardware", "RenderToMainframe", renderToMainframe);
+
+ iniFile.Set("Settings", "ShowFPS", bShowFPS);
+ iniFile.Set("Settings", "OverlayStats", bOverlayStats);
+ iniFile.Set("Settings", "DLOptimize", iCompileDLsLevel);
+ iniFile.Set("Settings", "DumpTextures", bDumpTextures);
+ iniFile.Set("Settings", "ShowShaderErrors", bShowShaderErrors);
+ iniFile.Set("Settings", "LogLevel", iLog);
+ iniFile.Set("Settings", "Multisample", iMultisampleMode);
+ iniFile.Set("Settings", "TexDumpPath", texDumpPath);
+ iniFile.Set("Settings", "TexFmtOverlayEnable", bTexFmtOverlayEnable);
+ iniFile.Set("Settings", "TexFmtOverlayCenter", bTexFmtOverlayCenter);
+ iniFile.Set("Settings", "UseXFB", bUseXFB);
+
+ iniFile.Set("Enhancements", "ForceFiltering", bForceFiltering);
+ iniFile.Set("Enhancements", "ForceMaxAniso", bForceMaxAniso);
+ iniFile.Set("Enhancements", "StretchToFit", bStretchToFit);
+ iniFile.Set("Enhancements", "KeepAR", bKeepAR);
+
+ iniFile.Save("gfx_opengl.ini");
+}
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Config.h b/Source/Plugins/Plugin_VideoOGL/Src/Config.h
new file mode 100644
index 0000000000..5221d0583b
--- /dev/null
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Config.h
@@ -0,0 +1,64 @@
+// Copyright (C) 2003-2008 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
+#ifndef _CONFIG_H
+#define _CONFIG_H
+
+#define CONF_LOG 1
+#define CONF_PRIMLOG 2
+#define CONF_SAVETEXTURES 4
+#define CONF_SAVETARGETS 8
+#define CONF_SAVESHADERS 16
+
+struct Config
+{
+ Config();
+ void Load();
+ void Save();
+
+ //video
+ bool bFullscreen;
+ bool renderToMainframe;
+ char iFSResolution[16];
+ char iWindowedRes[16];
+ int iMultisampleMode;
+
+ bool bForceFiltering;
+ bool bForceMaxAniso;
+ bool bStretchToFit;
+ bool bKeepAR;
+ bool bShowFPS;
+
+ bool bTexFmtOverlayEnable;
+ bool bTexFmtOverlayCenter;
+ bool bOverlayStats;
+ bool bUseXFB;
+ bool bDumpTextures;
+ char texDumpPath[280];
+
+ int iLog; // CONF_ bits
+ int iSaveTargetId;
+
+ //currently unused:
+ int iCompileDLsLevel;
+ bool bWireFrame;
+ bool bShowShaderErrors;
+};
+
+extern Config g_Config;
+
+#endif // _CONFIG_H
\ No newline at end of file
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
index 3a958b6720..5454ad2d5d 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
@@ -16,6 +16,7 @@
// http://code.google.com/p/dolphin-emu/
#include "Globals.h"
+#include "Config.h"
#include "IniFile.h"
#include "svnrev.h"
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp
index 75e061edad..fe52ec7ca6 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp
@@ -18,6 +18,7 @@
#include "ConfigDlg.h"
#include "../Globals.h"
+#include "Config.h"
#include "../TextureMngr.h"
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp
index 80c6314eb3..5c456addf4 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp
@@ -29,89 +29,6 @@
#include "IniFile.h"
#include
-Config g_Config;
-
-Config::Config()
-{
- memset(this, 0, sizeof(Config));
-}
-
-void Config::Load()
-{
- std::string temp;
- IniFile iniFile;
- iniFile.Load("gfx_opengl.ini");
-
- // get resolution
- iniFile.Get("Hardware", "WindowedRes", &temp, 0);
- if(temp.empty())
- temp = "640x480";
- strcpy(iWindowedRes, temp.c_str());
- iniFile.Get("Hardware", "FullscreenRes", &temp, 0);
- if(temp.empty())
- temp = "640x480";
- strcpy(iFSResolution, temp.c_str());
-
- iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 0); // Hardware
- iniFile.Get("Hardware", "RenderToMainframe", &renderToMainframe, 0);
-
- iniFile.Get("Settings", "ShowFPS", &bShowFPS, false); // Settings
- iniFile.Get("Settings", "OverlayStats", &bOverlayStats, false);
- iniFile.Get("Settings", "DLOptimize", &iCompileDLsLevel, 0);
- iniFile.Get("Settings", "DumpTextures", &bDumpTextures, 0);
- iniFile.Get("Settings", "ShowShaderErrors", &bShowShaderErrors, 0);
- iniFile.Get("Settings", "LogLevel", &iLog, 0);
- iniFile.Get("Settings", "Multisample", &iMultisampleMode, 0);
- if(iMultisampleMode == 0)
- iMultisampleMode = 1;
- std::string s;
- iniFile.Get("Settings", "TexDumpPath", &s, 0);
- if (s.size() < sizeof(texDumpPath) )
- strcpy(texDumpPath, s.c_str());
- else {
- strncpy(texDumpPath, s.c_str(), sizeof(texDumpPath)-1);
- texDumpPath[sizeof(texDumpPath)-1] = 0;
- }
-
- iniFile.Get("Settings", "TexFmtOverlayEnable", &bTexFmtOverlayEnable, 0);
- iniFile.Get("Settings", "TexFmtOverlayCenter", &bTexFmtOverlayCenter, 0);
- iniFile.Get("Settings", "UseXFB", &bUseXFB, 0);
-
- iniFile.Get("Enhancements", "ForceFiltering", &bForceFiltering, 0);
- iniFile.Get("Enhancements", "ForceMaxAniso", &bForceMaxAniso, 0);
- iniFile.Get("Enhancements", "StretchToFit", &bStretchToFit, false);
- iniFile.Get("Enhancements", "KeepAR", &bKeepAR, false);
-}
-
-void Config::Save()
-{
- IniFile iniFile;
- iniFile.Load("gfx_opengl.ini");
- iniFile.Set("Hardware", "WindowedRes", iWindowedRes);
- iniFile.Set("Hardware", "FullscreenRes", iFSResolution);
- iniFile.Set("Hardware", "Fullscreen", bFullscreen);
- iniFile.Set("Hardware", "RenderToMainframe", renderToMainframe);
-
- iniFile.Set("Settings", "ShowFPS", bShowFPS);
- iniFile.Set("Settings", "OverlayStats", bOverlayStats);
- iniFile.Set("Settings", "DLOptimize", iCompileDLsLevel);
- iniFile.Set("Settings", "DumpTextures", bDumpTextures);
- iniFile.Set("Settings", "ShowShaderErrors", bShowShaderErrors);
- iniFile.Set("Settings", "LogLevel", iLog);
- iniFile.Set("Settings", "Multisample", iMultisampleMode);
- iniFile.Set("Settings", "TexDumpPath", texDumpPath);
- iniFile.Set("Settings", "TexFmtOverlayEnable", bTexFmtOverlayEnable);
- iniFile.Set("Settings", "TexFmtOverlayCenter", bTexFmtOverlayCenter);
- iniFile.Set("Settings", "UseXFB", bUseXFB);
-
- iniFile.Set("Enhancements", "ForceFiltering", bForceFiltering);
- iniFile.Set("Enhancements", "ForceMaxAniso", bForceMaxAniso);
- iniFile.Set("Enhancements", "StretchToFit", bStretchToFit);
- iniFile.Set("Enhancements", "KeepAR", bKeepAR);
-
- iniFile.Save("gfx_opengl.ini");
-}
-
#ifdef _WIN32
// The one for Linux is in Linux/Linux.cpp
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h
index b4cd1bd64e..158ae8af6d 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h
@@ -15,11 +15,12 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
-// several global utilities not really tied to core emulation
+// This file should DIE.
+
#ifndef _GLOBALS_H
#define _GLOBALS_H
-//#define LOGGING
+// #define LOGGING
#include "Common.h"
#include "x64Emitter.h"
@@ -36,49 +37,6 @@
#define DEBUG_LOG(...)
#endif
-#define CONF_LOG 1
-#define CONF_PRIMLOG 2
-#define CONF_SAVETEXTURES 4
-#define CONF_SAVETARGETS 8
-#define CONF_SAVESHADERS 16
-
-struct Config
-{
- Config();
- void Load();
- void Save();
-
- //video
- bool bFullscreen;
- bool renderToMainframe;
- char iFSResolution[16];
- char iWindowedRes[16];
- int iMultisampleMode;
-
- bool bForceFiltering;
- bool bForceMaxAniso;
- bool bStretchToFit;
- bool bKeepAR;
- bool bShowFPS;
-
- bool bTexFmtOverlayEnable;
- bool bTexFmtOverlayCenter;
- bool bOverlayStats;
- bool bUseXFB;
- bool bDumpTextures;
- char texDumpPath[280];
-
- int iLog; // CONF_ bits
- int iSaveTargetId;
-
- //currently unused:
- int iCompileDLsLevel;
- bool bWireFrame;
- bool bShowShaderErrors;
-};
-
-extern Config g_Config;
-
void DebugLog(const char* _fmt, ...);
void __Log(const char *format, ...);
void __Log(int type, const char *format, ...);
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp b/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp
index 3faff23b75..6f0657377a 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp
@@ -25,9 +25,9 @@
#include
#include "../Globals.h"
+#include "../Config.h"
#include "main.h"
-#include "../../Core/Src/Core.h"
#include "Win32.h"
#include "IniFile.h" // we need this for the debugger to work
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
index 87381a2955..d908cddd21 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
@@ -28,6 +28,7 @@
#include
#endif
+#include "Config.h"
#include "Profiler.h"
#include "Statistics.h"
#include "ImageWrite.h"
@@ -384,7 +385,7 @@ void Renderer::ProcessMessages()
if (s_listMsgs.size() > 0) {
int left = 25, top = 15;
- list::iterator it = s_listMsgs.begin();
+ std::list::iterator it = s_listMsgs.begin();
while (it != s_listMsgs.end())
{
int time_left = (int)(it->dwTimeStamp - timeGetTime());
@@ -838,14 +839,14 @@ void Renderer::SwapBuffers()
bool Renderer::SaveRenderTarget(const char* filename, int jpeg)
{
bool bflip = true;
- vector data(nBackbufferWidth*nBackbufferHeight);
+ std::vector data(nBackbufferWidth*nBackbufferHeight);
glReadPixels(0, 0, nBackbufferWidth, nBackbufferHeight, GL_BGRA, GL_UNSIGNED_BYTE, &data[0]);
if (glGetError() != GL_NO_ERROR)
return false;
if (bflip) {
// swap scanlines
- vector scanline(nBackbufferWidth);
+ std::vector scanline(nBackbufferWidth);
for(int i = 0; i < nBackbufferHeight/2; ++i) {
memcpy(&scanline[0], &data[i*nBackbufferWidth], nBackbufferWidth*4);
memcpy(&data[i*nBackbufferWidth], &data[(nBackbufferHeight-i-1)*nBackbufferWidth], nBackbufferWidth*4);
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/SConscript b/Source/Plugins/Plugin_VideoOGL/Src/SConscript
index 1423be74a8..93e82d2e0a 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/SConscript
+++ b/Source/Plugins/Plugin_VideoOGL/Src/SConscript
@@ -11,6 +11,7 @@ files = [
'Globals.cpp',
'GLUtil.cpp',
'main.cpp',
+ 'Config.cpp',
'memcpy_amd.cpp',
'OpcodeDecoding.cpp',
'PixelShaderManager.cpp',
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp
index 0363fc6f50..f181376392 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp
@@ -29,6 +29,7 @@
#undef _interlockedbittestandreset64
#endif
+#include "Config.h"
#include "Statistics.h"
#include "Profiler.h"
#include "ImageWrite.h"
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.h b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.h
index 80720f33c3..4cd0a3f936 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.h
+++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.h
@@ -18,8 +18,6 @@
#ifndef _VERTEXLOADER_H
#define _VERTEXLOADER_H
-using namespace std;
-
#include "CPMemory.h"
#include "DataReader.h"
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
index f4931225c6..245190eab8 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
@@ -3,6 +3,7 @@
#include
#include
+#include "Config.h"
#include "Statistics.h"
#include "MemoryUtil.h"
#include "Profiler.h"
@@ -21,7 +22,7 @@
static GLuint s_vboBuffers[0x40] = {0};
static int s_nCurVBOIndex = 0; // current free buffer
static u8 *s_pBaseBufferPointer = NULL;
-static vector< pair > s_vStoredPrimitives; // every element, mode and count to be passed to glDrawArrays
+static std::vector< std::pair > s_vStoredPrimitives; // every element, mode and count to be passed to glDrawArrays
static u32 s_prevcomponents; // previous state set
u8* VertexManager::s_pCurBufferPointer = NULL;
@@ -107,7 +108,7 @@ void VertexManager::AddVertices(int primitive, int numvertices)
_assert_( numvertices > 0 );
ADDSTAT(stats.thisFrame.numPrims, numvertices);
- s_vStoredPrimitives.push_back(pair(c_primitiveType[primitive], numvertices));
+ s_vStoredPrimitives.push_back(std::pair(c_primitiveType[primitive], numvertices));
#ifdef _DEBUG
static const char *sprims[8] = {"quads", "nothing", "tris", "tstrip", "tfan", "lines", "lstrip", "points"};
@@ -260,7 +261,7 @@ void VertexManager::Flush()
#endif
int offset = 0;
- for (vector< pair >::const_iterator it = s_vStoredPrimitives.begin(); it != s_vStoredPrimitives.end(); ++it)
+ for (std::vector< std::pair >::const_iterator it = s_vStoredPrimitives.begin(); it != s_vStoredPrimitives.end(); ++it)
{
glDrawArrays(it->first, offset, it->second);
offset += it->second;
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.h b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.h
index ce479aab21..549ade2c2a 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.h
+++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.h
@@ -21,7 +21,6 @@
#include "CPMemory.h"
-using namespace std;
// TODO - clarify the role of this class.
// Methods to manage and cache the global state of vertex streams and flushing streams
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp
index 09a5c0e5fa..584727ec6a 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexShaderManager.cpp
@@ -17,6 +17,7 @@
#include "Globals.h"
#include "Profiler.h"
+#include "Config.h"
#include "GLUtil.h"
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
index 2f6f09946f..62a366541d 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
@@ -27,6 +27,7 @@
#include "GUI/ConfigDlg.h"
+#include "Config.h"
#include "LookUpTables.h"
#include "ImageWrite.h"
#include "Render.h"
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/stdafx.cpp b/Source/Plugins/Plugin_VideoOGL/Src/stdafx.cpp
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/stdafx.h b/Source/Plugins/Plugin_VideoOGL/Src/stdafx.h
new file mode 100644
index 0000000000..5fce96353a
--- /dev/null
+++ b/Source/Plugins/Plugin_VideoOGL/Src/stdafx.h
@@ -0,0 +1,26 @@
+// Copyright (C) 2003-2008 Dolphin Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official SVN repository and contact information can be found at
+// http://code.google.com/p/dolphin-emu/
+
+#pragma once
+#define _WIN32_WINNT 0x501
+#ifndef _WIN32_IE
+#define _WIN32_IE 0x0500 // Default value is 0x0400
+#endif
+
+#include
+#include
+