summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorpierre <pierre@pirsoft.de>2011-02-13 19:05:24 +0000
committerpierre <pierre@pirsoft.de>2011-02-13 19:05:24 +0000
commit7a7a71d3fa09faaab16d975a4ac8b61744e76e24 (patch)
treee586a5c2433a4edb7cbb6a6f702cf652bc34ec3c /Source
parentbe193088cac02d969b5ea2124fde76148b0480e9 (diff)
VideoOGL: reinitialize some more global variables,
so VideoOGL always is in the same state when starting a guest program. Also constify the RasterFont, while we are at it. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7166 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp2
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp2
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/Render.cpp11
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp5
4 files changed, 18 insertions, 2 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp b/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp
index d81f406e73..ebdc690d72 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp
@@ -104,6 +104,8 @@ inline GLuint VarToGL(VarType t)
void GLVertexFormat::Initialize(const PortableVertexDeclaration &_vtx_decl)
{
+ s_prevcomponents = 0;
+
vertex_stride = _vtx_decl.stride;
using namespace Gen;
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp b/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp
index 18fa4cf817..da53fae6d5 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp
@@ -22,7 +22,7 @@
#include "RasterFont.h"
// globals
-GLubyte rasters[][13] = {
+const GLubyte rasters[][13] = {
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36},
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
index 214d30d476..7170a8f9d3 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
@@ -192,6 +192,17 @@ void HandleCgError(CGcontext ctx, CGerror err, void* appdata)
// Init functions
Renderer::Renderer()
{
+ OSDInternalW = 0;
+ OSDInternalH = 0;
+
+ s_fps=0;
+
+#if defined _WIN32 || defined HAVE_LIBAV
+ s_bAVIDumping = false;
+#else
+ f_pFrameDump = NULL;
+#endif
+
bool bSuccess = true;
s_blendMode = 0;
s_MSAACoverageSamples = 0;
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
index 98bc25d55d..ea945401b6 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
@@ -146,10 +146,13 @@ void Init()
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, s_dstRenderBuffer);
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGBA, renderBufferWidth, renderBufferHeight);
+ s_srcTextureWidth = 0;
+ s_srcTextureHeight = 0;
+
glGenTextures(1, &s_srcTexture);
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, s_srcTexture);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
CreateRgbToYuyvProgram();
CreateYuyvToRgbProgram();