Skip to content

Commit

Permalink
Fixed compile on systems involving XF86 video mode extension. ( propr…
Browse files Browse the repository at this point in the history
…ietary driver )

Added extra debugging information pertaining to GLX extensions.
Added more documentation to OpenGL ES.
Fixed EGL initialization. Now the rendering api will properly initialize to OpenGL using EGL context.
  • Loading branch information
kphillisjr committed Aug 19, 2012
1 parent ac0e599 commit d57f942
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
9 changes: 8 additions & 1 deletion neo/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ conf_filename='site.conf'
serialized=['CC', 'CXX', 'JOBS', 'BUILD', 'IDNET_HOST', 'DEDICATED',
'DEBUG_MEMORY', 'LIBC_MALLOC', 'ID_NOLANADDRESS', 'ID_MCHECK', 'ALSA',
'TARGET_CORE', 'TARGET_GAME', 'TARGET_D3XP', 'TARGET_MONO', 'TARGET_DEMO', 'NOCURL',
'BUILD_ROOT', 'BUILD_GAMEPAK', 'BASEFLAGS', 'SILENT', 'TARGET_OPENGL',
'BUILD_ROOT', 'BUILD_GAMEPAK', 'BASEFLAGS', 'SILENT', 'TARGET_OPENGL', 'TARGET_OPENGL_EGL',
'TARGET_ANDROID', 'NDK' ]

# global build mode ------------------------------
Expand Down Expand Up @@ -95,7 +95,13 @@ TARGET_DEMO (default 0)
TARGET_OPENGL (default 0)
Build an OpenGL renderer instead of OpenGL ES2.0.
GLSL shaders are compatible.
NOTE: This default Contexts to Enable OpenGL. For Linux, This is GLX.
TARGET_OPENGL_EGL (default 0)
Build an OpenGL renderer instead of OpenGL ES2.0.
GLSL shaders are compatible.
NOTE: This use EGL contexts to activate OpenGL.
TARGET_ANDROID (default 0)
Build the Android version.
Expand Down Expand Up @@ -176,6 +182,7 @@ TARGET_D3XP = '1'
TARGET_MONO = '0'
TARGET_DEMO = '0'
TARGET_OPENGL = '0'
TARGET_OPENGL_EGL = '0'
TARGET_ANDROID = '0'
NDK = ''
IDNET_HOST = ''
Expand Down
11 changes: 11 additions & 0 deletions neo/sys/linux/glimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,21 @@ int GLX_Init(glimpParms_t a)
int i;
const char *glstring;

common->Printf("Initializing GLX\n");

if (!GLimp_OpenDisplay()) {
return false;
}

glstring = glXQueryExtensionsString( dpy, GLX_VENDOR);
common->Printf("GLX_VENDOR: %s\n", (glstring)?glstring:"NULL");

glstring = glXQueryExtensionsString( dpy, GLX_VERSION);
common->Printf("GLX_VERSION: %s\n", (glstring)?glstring:"NULL");

glstring = glXQueryExtensionsString( dpy, GLX_EXTENSIONS);
common->Printf("GLX_EXTENSIONS: %s\n", (glstring)?glstring:"NULL");

common->Printf("Initializing OpenGL display\n");

root = RootWindow(dpy, scrnum);
Expand Down
4 changes: 3 additions & 1 deletion neo/sys/scons/SConscript.core
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ if ( local_dedicated == 0 ):
sys_string += ' android/input.cpp'
else:
sys_string += ' linux/input.cpp'
if ( local_opengl == 0 ):
if ( local_opengl == 0 or local_opengl_egl == 1):
if g_os == 'Android':
sys_string += ' android/gles2.cpp'
else:
Expand Down Expand Up @@ -361,6 +361,8 @@ if ( local_dedicated == 0 ):
local_env.Append( LIBS = [ 'GL' ] )
if ( local_opengl_egl == 1 ):
local_env.Append( LIBS = [ 'EGL' ] )
else:
local_env.Append( LIBS = [ 'Xxf86vm' ] )

source_list = core_list
source_list += idlib_objects
Expand Down

0 comments on commit d57f942

Please sign in to comment.