add option for newer Linux demos to dynamically load X11, glX and OpenGL 1 functions

(and avoid having to link against X, glx and GL)
-DGLEW_INIT_OPENGL11_FUNCTIONS
-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS
-DDYNAMIC_LOAD_X11_FUNCTIONS
and link against libdl (for example usingi -ldl)
This commit is contained in:
Erwin Coumans (Google)
2014-07-11 14:25:32 -07:00
parent 72ae3b6afb
commit 433d349369
6 changed files with 537 additions and 155 deletions

View File

@@ -1,10 +1,10 @@
/*
Copyright (c) 2012 Advanced Micro Devices, Inc.
Copyright (c) 2012 Advanced Micro Devices, Inc.
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
@@ -27,14 +27,14 @@ subject to the following restrictions:
#include <OpenGL/gl3.h>
#else
#include <GL/glew.h>
#include "GlewWindows/GL/glew.h"
#ifdef _WINDOWS
#include <windows.h>
#include <GL/gl.h>
#include <GL/glu.h>
//#include <GL/gl.h>
//#include <GL/glu.h>
#else
#include <GL/gl.h>
//#include <GL/gl.h>
//#include <GL/glu.h>
#endif //_WINDOWS
#endif //APPLE