- #define LOGW(...) ((void)fprintf(stderr, "# warn: %s (%i)\n", __VA_ARGS__))
- #ifdef DEBUG
- #define LOGI(...) ((void)fprintf(stderr, "# info: %s (%i)\n", __VA_ARGS__))
- #else
- #define LOGI(...) (void)0
- #endif
-
}
glGenTextures(1, &image->texture);
if ((mnit_opengles_error_code = glGetError()) != GL_NO_ERROR) {
}
glGenTextures(1, &image->texture);
if ((mnit_opengles_error_code = glGetError()) != GL_NO_ERROR) {
}
glBindTexture(GL_TEXTURE_2D, image->texture);
if ((mnit_opengles_error_code = glGetError()) != GL_NO_ERROR) {
}
glBindTexture(GL_TEXTURE_2D, image->texture);
if ((mnit_opengles_error_code = glGetError()) != GL_NO_ERROR) {
}
glTexImage2D( GL_TEXTURE_2D, 0, format, width, height,
0, format, GL_UNSIGNED_BYTE, (GLvoid*)pixels);
if ((mnit_opengles_error_code = glGetError()) != GL_NO_ERROR) {
}
glTexImage2D( GL_TEXTURE_2D, 0, format, width, height,
0, format, GL_UNSIGNED_BYTE, (GLvoid*)pixels);
if ((mnit_opengles_error_code = glGetError()) != GL_NO_ERROR) {
}
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
if ((mnit_opengles_error_code = glGetError()) != GL_NO_ERROR) {
}
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
if ((mnit_opengles_error_code = glGetError()) != GL_NO_ERROR) {
return -1;
}
if ( eglChooseConfig(display, attribs, &config, 1, &numConfigs) == EGL_FALSE) {
return -1;
}
if ( eglChooseConfig(display, attribs, &config, 1, &numConfigs) == EGL_FALSE) {
return -1;
}
if ( eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &format) == EGL_FALSE) {
return -1;
}
if ( eglGetConfigAttrib(display, config, EGL_NATIVE_VISUAL_ID, &format) == EGL_FALSE) {
context = eglCreateContext(display, config, NULL, NULL);
if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE) {
context = eglCreateContext(display, config, NULL, NULL);
if (eglMakeCurrent(display, surface, surface, context) == EGL_FALSE) {
glViewport(0, 0, mnit_width, mnit_height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glViewport(0, 0, mnit_width, mnit_height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();