mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-22 13:55:07 +00:00
Initial NaCL support for GLEW - it's not Windows or Linux/X11.
This commit is contained in:
parent
62d2c87d5a
commit
2de0716a46
@ -188,7 +188,7 @@ $(S.DEST)/glew.c: $(EXT)/.dummy
|
||||
cat $(SRC)/glew_init_wgl.c >> $@
|
||||
$(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@
|
||||
echo -e "\n return GLEW_OK;\n}" >> $@;
|
||||
echo -e "\n#elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
|
||||
echo -e "\n#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
|
||||
$(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
|
||||
$(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
|
||||
echo -e "\n#if !defined(GLEW_MX)" >> $@;
|
||||
@ -203,7 +203,7 @@ $(S.DEST)/glew.c: $(EXT)/.dummy
|
||||
$(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
|
||||
$(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@
|
||||
echo -e "\n return GLEW_OK;\n}" >> $@
|
||||
echo -e "\n#endif /* !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */\n" >> $@;
|
||||
echo -e "\n#endif /* !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */\n" >> $@;
|
||||
cat $(SRC)/glew_init_tail.c >> $@
|
||||
cat $(SRC)/glew_str_head.c >> $@
|
||||
$(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
|
||||
@ -234,7 +234,7 @@ $(S.DEST)/glew_def.c: $(EXT)/.dummy
|
||||
$(BIN)/make_def_var.pl WGL $(WGL_EXT_SPEC) >> $@
|
||||
echo -e "\n#endif /* _WIN32 */" >> $@
|
||||
echo -e "\n#endif /* !GLEW_MX */" >> $@;
|
||||
echo -e "\n#if !defined(_WIN32) && !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
|
||||
echo -e "\n#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
|
||||
$(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
|
||||
$(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
|
||||
echo -e "\n#if !defined(GLEW_MX)" >> $@;
|
||||
@ -243,7 +243,7 @@ $(S.DEST)/glew_def.c: $(EXT)/.dummy
|
||||
$(BIN)/make_def_var.pl GLX $(GLX_CORE_SPEC) >> $@
|
||||
$(BIN)/make_def_var.pl GLX $(GLX_EXT_SPEC) >> $@
|
||||
echo -e "\n#endif /* !GLEW_MX */" >> $@;
|
||||
echo -e "\n#endif /* !defined(_WIN32) && !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */" >> $@;
|
||||
echo -e "\n#endif /* !defined(_WIN32) && !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */" >> $@;
|
||||
rm -f $@.bak
|
||||
|
||||
$(S.DEST)/glew_init.c: $(EXT)/.dummy
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
# include <GL/wglew.h>
|
||||
#elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
# include <GL/glxew.h>
|
||||
#endif
|
||||
|
||||
@ -135,6 +135,8 @@ void* NSGLGetProcAddress (const GLubyte *name)
|
||||
# define glewGetProcAddress(name) dlGetProcAddress(name)
|
||||
#elif defined(__ANDROID__)
|
||||
# define glewGetProcAddress(name) NULL /* TODO */
|
||||
#elif defined(__native_client__)
|
||||
# define glewGetProcAddress(name) NULL /* TODO */
|
||||
#else /* __linux */
|
||||
# define glewGetProcAddress(name) (*glXGetProcAddressARB)(name)
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@ GLboolean glewExperimental = GL_FALSE;
|
||||
|
||||
#if defined(_WIN32)
|
||||
extern GLenum GLEWAPIENTRY wglewContextInit (void);
|
||||
#elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
extern GLenum GLEWAPIENTRY glxewContextInit (void);
|
||||
#endif /* _WIN32 */
|
||||
|
||||
@ -47,7 +47,7 @@ GLenum GLEWAPIENTRY glewInit (void)
|
||||
if ( r != 0 ) return r;
|
||||
#if defined(_WIN32)
|
||||
return wglewContextInit();
|
||||
#elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */
|
||||
#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) /* _UNIX */
|
||||
return glxewContextInit();
|
||||
#else
|
||||
return r;
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <GL/glew.h>
|
||||
#if defined(_WIN32)
|
||||
# include <GL/wglew.h>
|
||||
#elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
# include <GL/glxew.h>
|
||||
#endif
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <GL/glew.h>
|
||||
#if defined(_WIN32)
|
||||
# include <GL/wglew.h>
|
||||
#elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
#elif !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))
|
||||
# include <GL/glxew.h>
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user