/** * Does the current OpenGL context support textures with dimensions * other than power-of-two? */ gcc_pure static bool SupportsNonPowerOfTwoTextures() { return OpenGL::IsExtensionSupported("GL_ARB_texture_non_power_of_two") || (HaveGLES() && SupportsNonPowerOfTwoTexturesGLES()); }
gcc_pure static bool CheckFBO() { return OpenGL::IsExtensionSupported(HaveGLES() ? "GL_OES_framebuffer_object" : "GL_EXT_framebuffer_object"); }
static inline void glTexEnvi(GLenum target, GLenum pname, GLint param) { if (HaveGLES()) /* GLES 1.0 (Android emulator) doesn't support glTexEnvi() */ ::glTexEnvf(target, pname, (GLfloat)param); else ::glTexEnvi(target, pname, param); }
/** * Returns the standard pixel format of the platform. */ constexpr static GLenum GetType() { return HaveGLES() ? GL_UNSIGNED_SHORT_5_6_5 : GL_UNSIGNED_BYTE; }