Changes between Initial Version and Version 1 of Ticket #2847, comment 3


Ignore:
Timestamp:
Jan 9, 2015, 6:59:29 PM (9 years ago)
Author:
trompetin17

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2847, comment 3

    initial v1  
    11Atlas use wxGLCanvas, it create opengl context, if you look in the code for linux
    2 https://github.com/wxWidgets/wxWidgets/blob/master/src/unix/glx11.cpp#L270
     2https://github.com/wxWidgets/wxWidgets/blob/master/src/unix/glx11.cpp#L119
    33
    44{{{
    5  // the minimum gl core version would be 3.0
    6     int glVersionMajor = 3,
    7         glVersionMinor = 0;
    8 
     5if ( gc->GetGLXContextAttribs()[0] != 0 ) // OpenGL 3 context creation
    96}}}
    107
    118so by default use opengl version 3 if you already can use in linux. and glGetString(GL_EXTENSIONS) is obsolete as of OpenGL 3.0. most drivers seem to be tolerant of its continued use, but at least some cases on Linux are NOT, and this call returns NULL, thus causing an actual crash in the code.
    129
    13 One way to fix this is to set WX_GL_MAJOR_VERSION = 2.8 in atlas. but i need someone who has linux that help me to test,
     10One way to fix this is to set in atlas.
     11
     12{{{
     13int glAttribList[] = {
     14                0, //this 0 make the difference from opengl 3
     15                WX_GL_RGBA,
     16                WX_GL_DOUBLEBUFFER,
     17                WX_GL_DEPTH_SIZE, 24, // TODO: wx documentation doesn't say 24 is valid
     18                WX_GL_STENCIL_SIZE, 8,
     19                WX_GL_BUFFER_SIZE, 24, // colour bits
     20                WX_GL_MIN_ALPHA, 8, // alpha bits
     21                WX_GL_MAJOR_VERSION, 2,
     22                0
     23        };
     24        Canvas* canvas = new GameCanvas(*this, m_SectionLayout.GetCanvasParent(), glAttribList);
     25}}}
     26
     27
     28 but i need someone who has linux that help me to test,