Implemented aliased attributes support
TRAC #11092
Signed-off-by: Shannon Woods
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/trunk@177 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Program.h b/src/libGLESv2/Program.h
index 3d37f09..ea9616a 100644
--- a/src/libGLESv2/Program.h
+++ b/src/libGLESv2/Program.h
@@ -13,6 +13,7 @@
#include <d3dx9.h>
#include <string>
#include <vector>
+#include <set>
#include "libGLESv2/Context.h"
@@ -50,8 +51,7 @@
void bindAttributeLocation(GLuint index, const char *name);
GLuint getAttributeLocation(const char *name);
- bool isActiveAttribute(int attributeIndex);
- int getInputMapping(int attributeIndex);
+ int getSemanticIndex(int attributeIndex);
GLint getSamplerMapping(unsigned int samplerIndex);
SamplerType getSamplerType(unsigned int samplerIndex);
@@ -107,6 +107,7 @@
bool linkVaryings();
bool linkAttributes();
+ int getAttributeBinding(const char *name);
bool linkUniforms(ID3DXConstantTable *constantTable);
bool defineUniform(const D3DXHANDLE &constantHandle, const D3DXCONSTANT_DESC &constantDescription, std::string name = "");
@@ -129,7 +130,7 @@
bool applyUniform3iv(GLint location, GLsizei count, const GLint *v);
bool applyUniform4iv(GLint location, GLsizei count, const GLint *v);
- void appendToInfoLog(const char *info);
+ void appendToInfoLog(const char *info, ...);
FragmentShader *mFragmentShader;
VertexShader *mVertexShader;
@@ -142,8 +143,9 @@
ID3DXConstantTable *mConstantTablePS;
ID3DXConstantTable *mConstantTableVS;
- char *mAttributeName[MAX_VERTEX_ATTRIBS];
- int mInputMapping[MAX_VERTEX_ATTRIBS];
+ std::set<std::string> mAttributeBinding[MAX_VERTEX_ATTRIBS];
+ std::string mLinkedAttribute[MAX_VERTEX_ATTRIBS];
+ int mSemanticIndex[MAX_VERTEX_ATTRIBS];
struct Sampler
{