ui and graphics changes

* implement draw clipping using opengl stencil buffers
* allow to create Widgets by style name with g_ui.createWidgetByStyle
* styles can now have children widgets
* make proper use of the isNotPathable in pathfinding
* add scrollbar skin
This commit is contained in:
Eduardo Bart
2012-03-24 12:22:40 -03:00
parent efa9811342
commit de0008caf1
34 changed files with 210 additions and 86 deletions

View File

@@ -306,16 +306,16 @@ void WIN32Window::internalChooseGLVisual()
0, // No Accumulation Buffer
0, 0, 0, 0, // Accumulation Bits Ignored
16, // 16Bit Z-Buffer (Depth Buffer)
0, // No Stencil Buffer
1, // 1Bit Stencil Buffer
0, // No Auxiliary Buffer
PFD_MAIN_PLANE, // Main Drawing Layer
0, // Reserved
0, 0, 0 }; // Layer Masks Ignored
pixelFormat = ChoosePixelFormat(m_deviceContext, &pfd);
if(!pixelFormat)
logFatal("Could not find a suitable pixel format");
pfd.cStencilBits = 8;
if(!SetPixelFormat(m_deviceContext, pixelFormat, &pfd))
logFatal("Could not set the pixel format");
}

View File

@@ -367,6 +367,7 @@ void X11Window::internalChooseGLVisual()
GLX_USE_GL,
GLX_RGBA,
GLX_DOUBLEBUFFER,
GLX_STENCIL_SIZE, 1,
None
};
@@ -379,6 +380,7 @@ void X11Window::internalChooseGLVisual()
static int attrList[] = {
//EGL_BUFFER_SIZE, 24,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_STENCIL_SIZE, 1,
EGL_NONE
};