Skip to content
Extraits de code Groupes Projets
Valider ccd001fb rédigé par Niels Martin Hansen's avatar Niels Martin Hansen
Parcourir les fichiers

Apply patch to fix #910.

Originally committed to SVN as r3128.
parent 28bf657f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -97,6 +97,7 @@ VideoContext *VideoContext::instance = NULL;
VideoContext::VideoContext() {
// Set GL context
glContext = NULL;
ownGlContext = false;
lastTex = 0;
lastFrame = -1;
yv12shader = 0;
......@@ -130,6 +131,7 @@ VideoContext::VideoContext() {
// Destructor
VideoContext::~VideoContext () {
Reset();
if (ownGlContext)
delete glContext;
glContext = NULL;
}
......@@ -483,10 +485,16 @@ wxGLContext *VideoContext::GetGLContext(wxGLCanvas *canvas) {
// Also see bug #850.
#if wxCHECK_VERSION(2,9,0)
#else
if (!glContext) glContext = canvas->GetContext();
if (!glContext) {
glContext = canvas->GetContext();
ownGlContext = false;
}
#endif
#ifndef __WXMAC__
if (!glContext) glContext = new wxGLContext(canvas);
if (!glContext) {
glContext = new wxGLContext(canvas);
ownGlContext = true;
}
#endif
return glContext;
}
......
......@@ -85,6 +85,7 @@ private:
GLuint lastTex;
GLhandleARB yv12shader;
int lastFrame;
bool ownGlContext;
wxGLContext *glContext;
VideoFrameFormat vidFormat;
AegiVideoFrame tempFrame;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter