Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const char* _VShaderData =
- "\
- #define VSHADER\n\
- \
- uniform mat4 ViewMatrix;\n\
- uniform mat4 ProjectionMatrix;\n\
- \
- attribute vec4 GLVertex;\n\
- attribute vec3 GLNormal;\n\
- attribute vec4 GLTangent;\n\
- attribute vec4 GLColor;\n\
- attribute vec4 GLBlendIndices;\n\
- attribute vec4 GLBlendWeights;\n\
- attribute vec4 GLTexCoord0;\n\
- attribute vec4 GLTexCoord1;\n\
- \n\
- "; // this is prepended to a vertex shader...
- void shBindAttribs( GLuint p )
- {
- glBindAttribLocation( p, VETYPE_POSITION, "GLVertex" );
- glBindAttribLocation( p, VETYPE_NORMAL, "GLNormal" );
- glBindAttribLocation( p, VETYPE_TANGENT, "GLTangent" );
- glBindAttribLocation( p, VETYPE_COLOR, "GLColor" );
- glBindAttribLocation( p, VETYPE_BLENDINDICES, "GLBlendIndices" );
- glBindAttribLocation( p, VETYPE_BLENDWEIGHTS, "GLBlendWeights" );
- glBindAttribLocation( p, VETYPE_TEXCOORD0, "GLTexCoord0" );
- glBindAttribLocation( p, VETYPE_TEXCOORD1, "GLTexCoord1" );
- } // this one simply makes the shader know where the data is exactly
Advertisement
Add Comment
Please, Sign In to add comment