mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
GLCtrl: Fixes
git-svn-id: svn://ultimatepp.org/upp/trunk@12560 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a46d819b0d
commit
0fc380db2d
2 changed files with 14 additions and 3 deletions
|
|
@ -62,4 +62,15 @@ void GLCtrl::StdView()
|
|||
glLoadIdentity();
|
||||
}
|
||||
|
||||
#ifndef GUI_GTK
|
||||
|
||||
Image GLCtrl::GLPane::MouseEvent(int event, Point p, int zdelta, dword keyflags)
|
||||
{
|
||||
p = p - GetScreenView().TopLeft() + ctrl->GetScreenView().TopLeft();
|
||||
return ctrl->MouseEvent(event, p, zdelta, keyflags);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ static HGLRC s_openGLContext; // we only have single OpenGL cont
|
|||
static PIXELFORMATDESCRIPTOR s_pfd;
|
||||
static int s_pixelFormatID;
|
||||
|
||||
void MakeGLContext(int depthBits, int stencilBits, int samples)
|
||||
void MakeWGLContext(int depthBits, int stencilBits, int samples)
|
||||
{
|
||||
ONCELOCK {
|
||||
for(int pass = 0; pass < 2; pass++) {
|
||||
|
|
@ -83,7 +83,7 @@ void MakeGLContext(int depthBits, int stencilBits, int samples)
|
|||
|
||||
void GLCtrl::CreateContext()
|
||||
{
|
||||
MakeGLContext(depthSize, stencilSize, numberOfSamples);
|
||||
MakeWGLContext(depthSize, stencilSize, numberOfSamples);
|
||||
}
|
||||
|
||||
void GLCtrl::GLPane::State(int reason)
|
||||
|
|
@ -109,7 +109,7 @@ LRESULT GLCtrl::GLPane::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
BeginPaint(hwnd, &ps);
|
||||
HDC hDC = ps.hdc;
|
||||
wglMakeCurrent(hDC, s_openGLContext);
|
||||
DoPaint();
|
||||
ctrl->DoGLPaint();
|
||||
if(ctrl->doubleBuffering)
|
||||
SwapBuffers(hDC);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue