Fix line endings in the Uniform source and header files to be UNIX-style.

TRAC #22858 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2304 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 6d7b61c2
//
// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "compiler/Uniform.h"
namespace sh
{
Uniform::Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex)
{
this->type = type;
this->precision = precision;
this->name = name;
this->arraySize = arraySize;
this->registerIndex = registerIndex;
}
}
//
// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "compiler/Uniform.h"
namespace sh
{
Uniform::Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex)
{
this->type = type;
this->precision = precision;
this->name = name;
this->arraySize = arraySize;
this->registerIndex = registerIndex;
}
}
//
// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#ifndef COMPILER_UNIFORM_H_
#define COMPILER_UNIFORM_H_
#include <string>
#include <vector>
#define GL_APICALL
#include <GLES3/gl3.h>
#include <GLES2/gl2.h>
namespace sh
{
struct Uniform
{
Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex);
GLenum type;
GLenum precision;
std::string name;
unsigned int arraySize;
int registerIndex;
};
typedef std::vector<Uniform> ActiveUniforms;
}
#endif // COMPILER_UNIFORM_H_
//
// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#ifndef COMPILER_UNIFORM_H_
#define COMPILER_UNIFORM_H_
#include <string>
#include <vector>
#define GL_APICALL
#include <GLES3/gl3.h>
#include <GLES2/gl2.h>
namespace sh
{
struct Uniform
{
Uniform(GLenum type, GLenum precision, const char *name, int arraySize, int registerIndex);
GLenum type;
GLenum precision;
std::string name;
unsigned int arraySize;
int registerIndex;
};
typedef std::vector<Uniform> ActiveUniforms;
}
#endif // COMPILER_UNIFORM_H_
#include "precompiled.h"
//
// Copyright (c) 2010-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "libGLESv2/Uniform.h"
#include "libGLESv2/utilities.h"
namespace gl
{
Uniform::Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize)
: type(type), precision(precision), name(name), arraySize(arraySize)
{
int bytes = gl::UniformInternalSize(type) * elementCount();
data = new unsigned char[bytes];
memset(data, 0, bytes);
dirty = true;
psRegisterIndex = -1;
vsRegisterIndex = -1;
registerCount = VariableRowCount(type) * elementCount();
}
Uniform::~Uniform()
{
delete[] data;
}
bool Uniform::isArray() const
{
return arraySize > 0;
}
unsigned int Uniform::elementCount() const
{
return arraySize > 0 ? arraySize : 1;
}
}
//
// Copyright (c) 2010-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#include "libGLESv2/Uniform.h"
#include "libGLESv2/utilities.h"
namespace gl
{
Uniform::Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize)
: type(type), precision(precision), name(name), arraySize(arraySize)
{
int bytes = gl::UniformInternalSize(type) * elementCount();
data = new unsigned char[bytes];
memset(data, 0, bytes);
dirty = true;
psRegisterIndex = -1;
vsRegisterIndex = -1;
registerCount = VariableRowCount(type) * elementCount();
}
Uniform::~Uniform()
{
delete[] data;
}
bool Uniform::isArray() const
{
return arraySize > 0;
}
unsigned int Uniform::elementCount() const
{
return arraySize > 0 ? arraySize : 1;
}
}
//
// Copyright (c) 2010-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#ifndef LIBGLESV2_UNIFORM_H_
#define LIBGLESV2_UNIFORM_H_
#include <string>
#include <vector>
#define GL_APICALL
#include <GLES3/gl3.h>
#include <GLES2/gl2.h>
#include "common/debug.h"
namespace gl
{
// Helper struct representing a single shader uniform
struct Uniform
{
Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize);
~Uniform();
bool isArray() const;
unsigned int elementCount() const;
const GLenum type;
const GLenum precision;
const std::string name;
const unsigned int arraySize;
unsigned char *data;
bool dirty;
int psRegisterIndex;
int vsRegisterIndex;
unsigned int registerCount;
};
typedef std::vector<Uniform*> UniformArray;
}
#endif // LIBGLESV2_UNIFORM_H_
//
// Copyright (c) 2010-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#ifndef LIBGLESV2_UNIFORM_H_
#define LIBGLESV2_UNIFORM_H_
#include <string>
#include <vector>
#define GL_APICALL
#include <GLES3/gl3.h>
#include <GLES2/gl2.h>
#include "common/debug.h"
namespace gl
{
// Helper struct representing a single shader uniform
struct Uniform
{
Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize);
~Uniform();
bool isArray() const;
unsigned int elementCount() const;
const GLenum type;
const GLenum precision;
const std::string name;
const unsigned int arraySize;
unsigned char *data;
bool dirty;
int psRegisterIndex;
int vsRegisterIndex;
unsigned int registerCount;
};
typedef std::vector<Uniform*> UniformArray;
}
#endif // LIBGLESV2_UNIFORM_H_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment