コード例 #1
0
ファイル: OgreGLES2PixelFormat.cpp プロジェクト: wjwwood/ogre
    //-----------------------------------------------------------------------------
    GLenum GLES2PixelUtil::getClosestGLInternalFormat(PixelFormat mFormat,
                                                   bool hwGamma)
    {
        GLenum format = getGLInternalFormat(mFormat, hwGamma);
        if (format == GL_NONE)
        {
#if OGRE_NO_GLES3_SUPPORT == 0
            if (hwGamma)
                return GL_SRGB8;
            else
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE_IOS
                return GL_BGRA8_EXT;
#else
                return GL_RGBA8;
#endif
#else
            if (hwGamma)
            {
                // TODO not supported
                return GL_NONE;
            }
            else
            {
                return GL_RGBA8_OES;
            }
#endif
        }

        return format;
    }
コード例 #2
0
ファイル: GLPixelFormat.cpp プロジェクト: katoun/kg_engine
GLenum GLPixelUtil::getClosestGLInternalFormat(PixelFormat mFormat, bool hwGamma)
{
	GLenum format = getGLInternalFormat(mFormat, hwGamma);
	if(format == GL_NONE)
	{
		if (hwGamma)
			return GL_SRGB8;
		else
			return GL_RGBA8;
	}
	else
		return format;
}
コード例 #3
0
	//-----------------------------------------------------------------------------
    GLenum GLES2PixelUtil::getClosestGLInternalFormat(PixelFormat mFormat,
                                                   bool hwGamma)
    {
        GLenum format = getGLInternalFormat(mFormat, hwGamma);
        if (format == GL_NONE)
        {
            if (hwGamma)
            {
                // TODO not supported
                return 0;
            }
            else
            {
                return GL_RGBA8_OES;
            }
        }
        else
        {
            return format;
        }
    }