if ((strstr((char*) ext, "GL_EXT_bgra")) ||
(strstr((char*) ext, "GL_EXT_texture_format_BGRA8888")))
shared->info.bgra = 1;
-#endif
+#endif
}
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS,
&(shared->info.max_texture_units));
glGetIntegerv(GL_MAX_TEXTURE_SIZE,
&(shared->info.max_texture_size));
+ shared->info.cutout_max = 512; // hmmm is this good?
+ if (getenv("EVAS_GL_CUTOUT_MAX"))
+ shared->info.cutout_max = atoi(getenv("EVAS_GL_CUTOUT_MAX"));
+
fprintf(stderr, "max tex size %ix%i\n"
"max units %i\n"
"non-power-2 tex %i\n"
"rect tex %i\n"
"bgra : %i\n"
"max ansiotropic filtering: %3.3f\n"
+ "\n"
+ "cutout max: %i\n"
,
shared->info.max_texture_size, shared->info.max_texture_size,
shared->info.max_texture_units,
(int)shared->info.tex_npo2,
(int)shared->info.tex_rect,
(int)shared->info.bgra,
- (double)shared->info.anisotropic
+ (double)shared->info.anisotropic,
+
+ shared->info.cutout_max
);
glDisable(GL_DEPTH_TEST);
static const GLenum rgb_ifmt = GL_RGB;
//#endif
#ifdef GL_BGRA
+# if 0 //tegra 2 below. wtf?
+static const GLenum bgra_fmt = GL_BGRA;
+static const GLenum bgra_ifmt = GL_BGRA;
+static const GLenum bgr_fmt = GL_BGRA;
+static const GLenum bgr_ifmt = GL_BGRA;
+# else // everything else but tegra2
static const GLenum bgra_fmt = GL_BGRA;
static const GLenum bgra_ifmt = GL_RGBA;
static const GLenum bgr_fmt = GL_BGRA;
static const GLenum bgr_ifmt = GL_RGB;
+# endif
#endif
static const GLenum alpha_fmt = GL_ALPHA;
static const GLenum alpha_ifmt = GL_ALPHA;