gfx/angle/src/libGLESv2/utilities.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/src/libGLESv2/utilities.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,67 @@
     1.4 +//
     1.5 +// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
     1.6 +// Use of this source code is governed by a BSD-style license that can be
     1.7 +// found in the LICENSE file.
     1.8 +//
     1.9 +
    1.10 +// utilities.h: Conversion functions and other utility routines.
    1.11 +
    1.12 +#ifndef LIBGLESV2_UTILITIES_H
    1.13 +#define LIBGLESV2_UTILITIES_H
    1.14 +
    1.15 +#define GL_APICALL
    1.16 +#include <GLES2/gl2.h>
    1.17 +#include <GLES2/gl2ext.h>
    1.18 +
    1.19 +#include <string>
    1.20 +
    1.21 +namespace gl
    1.22 +{
    1.23 +
    1.24 +struct Color;
    1.25 +
    1.26 +int UniformComponentCount(GLenum type);
    1.27 +GLenum UniformComponentType(GLenum type);
    1.28 +size_t UniformInternalSize(GLenum type);
    1.29 +size_t UniformExternalSize(GLenum type);
    1.30 +int VariableRowCount(GLenum type);
    1.31 +int VariableColumnCount(GLenum type);
    1.32 +
    1.33 +int AllocateFirstFreeBits(unsigned int *bits, unsigned int allocationSize, unsigned int bitsSize);
    1.34 +
    1.35 +void MakeValidSize(bool isImage, bool isCompressed, GLsizei *requestWidth, GLsizei *requestHeight, int *levelOffset);
    1.36 +int ComputePixelSize(GLint internalformat);
    1.37 +GLsizei ComputePitch(GLsizei width, GLint internalformat, GLint alignment);
    1.38 +GLsizei ComputeCompressedPitch(GLsizei width, GLenum format);
    1.39 +GLsizei ComputeCompressedSize(GLsizei width, GLsizei height, GLenum format);
    1.40 +GLsizei ComputeTypeSize(GLenum type);
    1.41 +bool IsCompressed(GLenum format);
    1.42 +bool IsDepthTexture(GLenum format);
    1.43 +bool IsStencilTexture(GLenum format);
    1.44 +bool IsCubemapTextureTarget(GLenum target);
    1.45 +bool IsInternalTextureTarget(GLenum target);
    1.46 +GLint ConvertSizedInternalFormat(GLenum format, GLenum type);
    1.47 +GLenum ExtractFormat(GLenum internalformat);
    1.48 +GLenum ExtractType(GLenum internalformat);
    1.49 +
    1.50 +bool IsColorRenderable(GLenum internalformat);
    1.51 +bool IsDepthRenderable(GLenum internalformat);
    1.52 +bool IsStencilRenderable(GLenum internalformat);
    1.53 +
    1.54 +bool IsFloat32Format(GLint internalformat);
    1.55 +bool IsFloat16Format(GLint internalformat);
    1.56 +
    1.57 +GLuint GetAlphaSize(GLenum colorFormat);
    1.58 +GLuint GetRedSize(GLenum colorFormat);
    1.59 +GLuint GetGreenSize(GLenum colorFormat);
    1.60 +GLuint GetBlueSize(GLenum colorFormat);
    1.61 +GLuint GetDepthSize(GLenum depthFormat);
    1.62 +GLuint GetStencilSize(GLenum stencilFormat);
    1.63 +bool IsTriangleMode(GLenum drawMode);
    1.64 +
    1.65 +}
    1.66 +
    1.67 +std::string getTempPath();
    1.68 +void writeFile(const char* path, const void* data, size_t size);
    1.69 +
    1.70 +#endif  // LIBGLESV2_UTILITIES_H

mercurial