1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/angle/src/libGLESv2/Uniform.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +// 1.5 +// Copyright (c) 2010-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 +#ifndef LIBGLESV2_UNIFORM_H_ 1.11 +#define LIBGLESV2_UNIFORM_H_ 1.12 + 1.13 +#include <string> 1.14 +#include <vector> 1.15 + 1.16 +#define GL_APICALL 1.17 +#include <GLES2/gl2.h> 1.18 + 1.19 +#include "common/debug.h" 1.20 + 1.21 +namespace gl 1.22 +{ 1.23 + 1.24 +// Helper struct representing a single shader uniform 1.25 +struct Uniform 1.26 +{ 1.27 + Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize); 1.28 + 1.29 + ~Uniform(); 1.30 + 1.31 + bool isArray() const; 1.32 + unsigned int elementCount() const; 1.33 + 1.34 + const GLenum type; 1.35 + const GLenum precision; 1.36 + const std::string name; 1.37 + const unsigned int arraySize; 1.38 + 1.39 + unsigned char *data; 1.40 + bool dirty; 1.41 + 1.42 + int psRegisterIndex; 1.43 + int vsRegisterIndex; 1.44 + unsigned int registerCount; 1.45 +}; 1.46 + 1.47 +typedef std::vector<Uniform*> UniformArray; 1.48 + 1.49 +} 1.50 + 1.51 +#endif // LIBGLESV2_UNIFORM_H_