GLCanvas requires 8bit alpha channel for picking checksums.
This commit is contained in:
parent
abd89e4f9a
commit
a19a506ad8
@ -290,7 +290,21 @@ GLCanvas3D* GLCanvas3DManager::get_canvas(wxGLCanvas* canvas)
|
|||||||
|
|
||||||
wxGLCanvas* GLCanvas3DManager::create_wxglcanvas(wxWindow *parent)
|
wxGLCanvas* GLCanvas3DManager::create_wxglcanvas(wxWindow *parent)
|
||||||
{
|
{
|
||||||
int attribList[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 24, WX_GL_SAMPLE_BUFFERS, GL_TRUE, WX_GL_SAMPLES, 4, 0 };
|
int attribList[] = {
|
||||||
|
WX_GL_RGBA,
|
||||||
|
WX_GL_DOUBLEBUFFER,
|
||||||
|
// RGB channels each should be allocated with 8 bit depth. One should almost certainly get these bit depths by default.
|
||||||
|
WX_GL_MIN_RED, 8,
|
||||||
|
WX_GL_MIN_GREEN, 8,
|
||||||
|
WX_GL_MIN_BLUE, 8,
|
||||||
|
// Requesting an 8 bit alpha channel. Interestingly, the NVIDIA drivers would most likely work with some alpha plane, but glReadPixels would not return
|
||||||
|
// the alpha channel on NVIDIA if not requested when the GL context is created.
|
||||||
|
WX_GL_MIN_ALPHA, 0,
|
||||||
|
WX_GL_DEPTH_SIZE, 24,
|
||||||
|
WX_GL_SAMPLE_BUFFERS, GL_TRUE,
|
||||||
|
WX_GL_SAMPLES, 4,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
if (s_multisample == MS_Unknown)
|
if (s_multisample == MS_Unknown)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user