Guest User

Untitled

a guest
Jul 30th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.99 KB | None | 0 0
  1. const char* _VShaderData =
  2. "\
  3. #define VSHADER\n\
  4. \
  5. uniform mat4 ViewMatrix;\n\
  6. uniform mat4 ProjectionMatrix;\n\
  7. \
  8. attribute vec4 GLVertex;\n\
  9. attribute vec3 GLNormal;\n\
  10. attribute vec4 GLTangent;\n\
  11. attribute vec4 GLColor;\n\
  12. attribute vec4 GLBlendIndices;\n\
  13. attribute vec4 GLBlendWeights;\n\
  14. attribute vec4 GLTexCoord0;\n\
  15. attribute vec4 GLTexCoord1;\n\
  16. \n\
  17. "; // this is prepended to a vertex shader...
  18.  
  19. void shBindAttribs( GLuint p )
  20. {
  21.     glBindAttribLocation( p, VETYPE_POSITION, "GLVertex" );
  22.     glBindAttribLocation( p, VETYPE_NORMAL, "GLNormal" );
  23.     glBindAttribLocation( p, VETYPE_TANGENT, "GLTangent" );
  24.     glBindAttribLocation( p, VETYPE_COLOR, "GLColor" );
  25.     glBindAttribLocation( p, VETYPE_BLENDINDICES, "GLBlendIndices" );
  26.     glBindAttribLocation( p, VETYPE_BLENDWEIGHTS, "GLBlendWeights" );
  27.     glBindAttribLocation( p, VETYPE_TEXCOORD0, "GLTexCoord0" );
  28.     glBindAttribLocation( p, VETYPE_TEXCOORD1, "GLTexCoord1" );
  29. } // this one simply makes the shader know where the data is exactly
Advertisement
Add Comment
Please, Sign In to add comment