forked from Mirrors/openclonk
win32: Remove unused CreateContext function taking a HWND
parent
37fd0a88c6
commit
34a720ca54
|
@ -166,9 +166,6 @@ public:
|
|||
virtual void Clear();
|
||||
virtual void Default();
|
||||
virtual CStdGLCtx *CreateContext(C4Window *, C4AbstractApp *) { return NULL; }
|
||||
#ifdef _WIN32
|
||||
virtual CStdGLCtx *CreateContext(HWND, C4AbstractApp *) { return NULL; }
|
||||
#endif
|
||||
virtual bool OnResolutionChanged(unsigned int iXRes, unsigned int iYRes) = 0; // reinit clipper for new resolution
|
||||
// Clipper
|
||||
bool GetPrimaryClipper(int &rX1, int &rY1, int &rX2, int &rY2);
|
||||
|
|
|
@ -346,37 +346,6 @@ CStdGLCtx *CStdGL::CreateContext(C4Window * pWindow, C4AbstractApp *pApp)
|
|||
return pCtx;
|
||||
}
|
||||
|
||||
#ifdef USE_WIN32_WINDOWS
|
||||
CStdGLCtx *CStdGL::CreateContext(HWND hWindow, C4AbstractApp *pApp)
|
||||
{
|
||||
// safety
|
||||
if (!hWindow) return NULL;
|
||||
// create it
|
||||
CStdGLCtx *pCtx = new CStdGLCtx();
|
||||
if (!pCtx->Init(NULL, pApp, hWindow))
|
||||
{
|
||||
delete pCtx; Error(" gl: Error creating secondary context!"); return NULL;
|
||||
}
|
||||
if (Config.Graphics.DebugOpenGL && glDebugMessageCallbackARB)
|
||||
{
|
||||
glDebugMessageCallbackARB(&OpenGLDebugProc, nullptr);
|
||||
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
|
||||
}
|
||||
if (!pMainCtx)
|
||||
{
|
||||
pMainCtx = pCtx;
|
||||
}
|
||||
else
|
||||
{
|
||||
// creation selected the new context - switch back to previous context
|
||||
RenderTarget = NULL;
|
||||
pCurrCtx = NULL;
|
||||
}
|
||||
// done
|
||||
return pCtx;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool CStdGL::CreatePrimarySurfaces(unsigned int, unsigned int, int iColorDepth, unsigned int)
|
||||
{
|
||||
// store options
|
||||
|
|
|
@ -110,11 +110,9 @@ public:
|
|||
void Clear(); // clear objects
|
||||
|
||||
#ifdef USE_WIN32_WINDOWS
|
||||
bool Init(C4Window * pWindow, C4AbstractApp *pApp, HWND hWindow = NULL);
|
||||
std::vector<int> EnumerateMultiSamples() const;
|
||||
#else
|
||||
bool Init(C4Window * pWindow, C4AbstractApp *pApp);
|
||||
#endif
|
||||
bool Init(C4Window * pWindow, C4AbstractApp *pApp);
|
||||
|
||||
bool Select(bool verbose = false); // select this context
|
||||
void Deselect(); // select this context
|
||||
|
@ -241,9 +239,6 @@ public:
|
|||
virtual bool PrepareSpriteShader(C4Shader& shader, const char* name, int ssc, C4GroupSet* pGroups, const char* const* additionalDefines, const char* const* additionalSlices);
|
||||
|
||||
virtual CStdGLCtx *CreateContext(C4Window * pWindow, C4AbstractApp *pApp);
|
||||
#ifdef USE_WIN32_WINDOWS
|
||||
virtual CStdGLCtx *CreateContext(HWND hWindow, C4AbstractApp *pApp);
|
||||
#endif
|
||||
// Blit
|
||||
void SetupMultiBlt(C4ShaderCall& call, const C4BltTransform* pTransform, GLuint baseTex, GLuint overlayTex, GLuint normalTex, DWORD dwOverlayModClr, StdProjectionMatrix* out_modelview);
|
||||
virtual void PerformMesh(StdMeshInstance &instance, float tx, float ty, float twdt, float thgt, DWORD dwPlayerColor, C4BltTransform* pTransform);
|
||||
|
|
|
@ -280,7 +280,7 @@ void CStdGLCtx::Clear()
|
|||
}
|
||||
}
|
||||
|
||||
bool CStdGLCtx::Init(C4Window * pWindow, C4AbstractApp *pApp, HWND hWindow)
|
||||
bool CStdGLCtx::Init(C4Window * pWindow, C4AbstractApp *pApp)
|
||||
{
|
||||
// safety
|
||||
if (!pGL) return false;
|
||||
|
@ -290,11 +290,7 @@ bool CStdGLCtx::Init(C4Window * pWindow, C4AbstractApp *pApp, HWND hWindow)
|
|||
|
||||
// store window
|
||||
this->pWindow = pWindow;
|
||||
// default HWND
|
||||
if (pWindow)
|
||||
hWindow = pWindow->renderwnd;
|
||||
else
|
||||
this->hWindow = hWindow;
|
||||
hWindow = pWindow->renderwnd;
|
||||
|
||||
// get DC
|
||||
hDC = GetDC(hWindow);
|
||||
|
|
Loading…
Reference in New Issue