Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert "Create our OGL context on the same thread in the OpenGL backe…
…nd. Same issue with Qualcomm not working with threading correctly."

This reverts commit 2697b8c.

The context creation may be moved to Video_Prepare, but the window creation isn't allowed to.
Eg we set the window title or read the mouse position, both need the window.
Also the readback of the window size didn't worked any more.
  • Loading branch information
degasus committed Jun 19, 2013
1 parent 02cbcc8 commit fb310f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
5 changes: 1 addition & 4 deletions Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp
Expand Up @@ -24,10 +24,7 @@ namespace OGL
// Draw messages on top of the screen
unsigned int VideoBackend::PeekMessages()
{
if (GLInterface)
return GLInterface->PeekMessages();
else
return 0;
return GLInterface->PeekMessages();
}

// Show the current FPS
Expand Down
23 changes: 9 additions & 14 deletions Source/Plugins/Plugin_VideoOGL/Src/main.cpp
Expand Up @@ -89,7 +89,6 @@ Make AA apply instantly during gameplay if possible

namespace OGL
{
static void* m_windowhandle;

std::string VideoBackend::GetName()
{
Expand Down Expand Up @@ -150,12 +149,12 @@ void VideoBackend::ShowConfig(void *_hParent)
diag.ShowModal();
#endif
}

bool VideoBackend::Initialize(void *&window_handle)
{
InitializeShared();
InitBackendInfo();

m_windowhandle = window_handle;

frameCount = 0;

g_Config.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_opengl.ini").c_str());
Expand All @@ -164,7 +163,13 @@ bool VideoBackend::Initialize(void *&window_handle)
g_Config.VerifyValidity();
UpdateActiveConfig();


InitInterface();
if (!GLInterface->Create(window_handle))
return false;

// Do our OSD callbacks
OSD::DoCallbacks(OSD::OSD_INIT);

s_BackendInitialized = true;

return true;
Expand All @@ -174,16 +179,6 @@ bool VideoBackend::Initialize(void *&window_handle)
// Run from the graphics thread
void VideoBackend::Video_Prepare()
{
InitInterface();
if (!GLInterface->Create(m_windowhandle))
{
INFO_LOG(VIDEO, "%s", "GLInterface::Create failed\n");
return;
}

// Do our OSD callbacks
OSD::DoCallbacks(OSD::OSD_INIT);

GLInterface->MakeCurrent();

g_renderer = new Renderer;
Expand Down

0 comments on commit fb310f2

Please sign in to comment.