summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ae8ec8d)
raw | patch | inline | side by side (parent: ae8ec8d)
author | mittorn <mittorn@sibmail.com> | |
Thu, 16 Feb 2017 12:35:38 +0000 (18:35 +0600) | ||
committer | mittorn <mittorn@sibmail.com> | |
Thu, 16 Feb 2017 12:35:38 +0000 (18:35 +0600) |
nanoWrap.cpp | patch | blob | history | |
nanogl.cpp | patch | blob | history |
diff --git a/nanoWrap.cpp b/nanoWrap.cpp
index b46b4c796cf1dff53a3d1beea2b600141a8f48b4..420ea78269ad86e21c4b9c09f4b6a48ab20dabda 100644 (file)
--- a/nanoWrap.cpp
+++ b/nanoWrap.cpp
static struct nanotmuState *activetmuState = &tmuState0;
-extern "C++" GlESInterface *glEsImpl;
+extern GlESInterface *glEsImpl;
static GLenum wrapperPrimitiveMode = GL_QUADS;
GLboolean useTexCoordArray = GL_FALSE;
{
glEsImpl->glNormalPointer( type, stride, ptr );
}*/
-
+/*
void glCopyTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height )
{
FlushOnStateChange( );
@@ -2157,4 +2157,4 @@ void glRenderbufferStorage( GLenum target, GLenum internalformat, GLsizei width,
{
FlushOnStateChange( );
glEsImpl->glRenderbufferStorage( target, internalformat, width, height );
-}
+}*/
diff --git a/nanogl.cpp b/nanogl.cpp
index 9af6d1d36a6fdc9f898f4c19809a6052b881024e..90cf802ff21bdc696087b5df3830d412bc0ce45d 100644 (file)
--- a/nanogl.cpp
+++ b/nanogl.cpp
static void *glesLib = NULL;
+extern "C++" GlESInterface *glEsImpl;
GlESInterface *glEsImpl = NULL;
extern void InitGLStructs( );
@@ -134,7 +135,7 @@ static int CreateGlEsInterface( const char *name, void *lib, void *lib1, void *d
{
void *f;
- f = dlsym( lib, *api ); // try libGLESxx_CM.so
+ f = SDL_GL_GetProcAddress(*api);//dlsym( lib, *api ); // try libGLESxx_CM.so
#ifdef USE_CORE_PROFILE
// Hack: try ARB and EXT suffix
@@ -151,7 +152,7 @@ static int CreateGlEsInterface( const char *name, void *lib, void *lib1, void *d
f = dlsym( lib, namearb );
}
#endif
- if ( f == NULL )
+ /*if ( f == NULL )
{
LOGW( "<%s> not found in %s. Trying libEGL.so.", *api, name ); //driver);
@@ -182,7 +183,7 @@ static int CreateGlEsInterface( const char *name, void *lib, void *lib1, void *d
f = (void *)default_func;
}
}
- else
+ else*/
{
LOGD( "<%s> @ 0x%p\n", *api, f );
}
const char *lib1 = "libGLESv1_CM.so"; // Has both gl* & egl* funcs SDK < 1.5
const char *lib2 = "libGLESv2.so"; // Only gl* funcs SDK >= 1.5
const char *lib3 = "libEGL.so"; // Only egl* funcs SDK >= 1.5
- const char *driver;
+ const char *driver = NULL;
// load lib
LOGI( "nanoGL: Init loading driver %s\n", lib1 );
//LOG (ANDROID_LOG_DEBUG, LOG_TAG, "nanoGL: Init loading driver %s\n", lib1);
- if ( !loadDriver( lib1 ) )
+ /*if ( !loadDriver( lib1 ) )
{
LOGE( "Failed to load driver %s. Trying %s\n", lib1, lib2 );
driver = lib2;
}
else
- driver = lib1;
+ driver = lib1;*/
void *eglLib;
// Load API gl* for 1.5+ else egl* gl*
//if (CreateGlEsInterface(driver, glesLib, eglLib, NULL) == -1)
- if ( !CreateGlEsInterface( driver, glesLib, eglLib, (void *)gl_unimplemented ) == -1 )
+ if ( !CreateGlEsInterface( driver, 0, 0, (void *)gl_unimplemented ) == -1 )
{
// release lib
LOGE( "CreateGlEsInterface failed." );