diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 18:11:13 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 18:11:13 +0200 |
commit | 4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 (patch) | |
tree | f000dd831240707a03b8c806db292c2a15cde3ce /gfx/angle/src/common/utilities.h | |
parent | 3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff) | |
download | UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.gz UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.lz UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.xz UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.zip |
Roll back to ANGLE/2845
Diffstat (limited to 'gfx/angle/src/common/utilities.h')
-rwxr-xr-x | gfx/angle/src/common/utilities.h | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/gfx/angle/src/common/utilities.h b/gfx/angle/src/common/utilities.h index 16d6560a7..dc09011a2 100755 --- a/gfx/angle/src/common/utilities.h +++ b/gfx/angle/src/common/utilities.h @@ -68,76 +68,6 @@ bool IsTriangleMode(GLenum drawMode); template <typename outT> outT iround(GLfloat value) { return static_cast<outT>(value > 0.0f ? floor(value + 0.5f) : ceil(value - 0.5f)); } template <typename outT> outT uiround(GLfloat value) { return static_cast<outT>(value + 0.5f); } -// Helper for converting arbitrary GL types to other GL types used in queries and state setting -template <typename ParamType> -GLuint ConvertToGLuint(ParamType param) -{ - return static_cast<GLuint>(param); -} -template <> -GLuint ConvertToGLuint(GLfloat param); - -template <typename ParamType> -GLint ConvertToGLint(ParamType param) -{ - return static_cast<GLint>(param); -} -template <> -GLint ConvertToGLint(GLfloat param); - -// Same conversion as uint -template <typename ParamType> -GLenum ConvertToGLenum(ParamType param) -{ - return static_cast<GLenum>(ConvertToGLuint(param)); -} - -template <typename ParamType> -GLfloat ConvertToGLfloat(ParamType param) -{ - return static_cast<GLfloat>(param); -} - -template <typename ParamType> -ParamType ConvertFromGLfloat(GLfloat param) -{ - return static_cast<ParamType>(param); -} -template <> -GLint ConvertFromGLfloat(GLfloat param); -template <> -GLuint ConvertFromGLfloat(GLfloat param); - -template <typename ParamType> -ParamType ConvertFromGLenum(GLenum param) -{ - return static_cast<ParamType>(param); -} - -template <typename ParamType> -ParamType ConvertFromGLuint(GLuint param) -{ - return static_cast<ParamType>(param); -} - -template <typename ParamType> -ParamType ConvertFromGLint(GLint param) -{ - return static_cast<ParamType>(param); -} - -template <typename ParamType> -ParamType ConvertFromGLboolean(GLboolean param) -{ - return static_cast<ParamType>(param ? GL_TRUE : GL_FALSE); -} - -template <typename ParamType> -ParamType ConvertFromGLint64(GLint64 param) -{ - return clampCast<ParamType>(param); -} - unsigned int ParseAndStripArrayIndex(std::string *name); } // namespace gl |