cocos2d-x shader

bool HelloWorld::init()
{
//////////////////////////////
// 1. super init first
if ( !CCLayer::init() )
{
return false;
}

CCSprite sprite = CCSprite::create;
const char
vec = CCFileUtils::sharedFileUtils()>fullPathForFilename.c_str;
const char* fragmentSource = CCFileUtils::sharedFileUtils
>fullPathForFilename.c_str;
CCGLProgram *glProgram = new CCGLProgram;
glProgram~~>initWithVertexShaderByteArray;
sprite~~>setShaderProgram(glProgram);

sprite->getShaderProgram()>addAttribute;
sprite
>getShaderProgram()>addAttribute;
this
>addChild(sprite, 100);
return true;
}

#ifdef GL_ES
precision mediump float;
#endif

// 1
attribute vec4 vPosition;

void main()
{ // 2

gl_Position = vPosition;
}
#ifdef GL_ES
precision mediump float;
#endif

// 1
varying vec2 v_texCoord;
uniform sampler2D u_texture;
uniform sampler2D u_colorRampTexture;

void main()
{ // 2

gl_FragColor = vec4(0, 0, 0, 1);
}

why run wrong

What is wrong with it? Did you forget to link/activate the shader program?

@ glProgram~~>link;
glProgram~~>updateUniforms();
glProgram->use();@

2013-08-08 22:00:25.399 shaderdemo[3423:12203] cocos2d: surface size: 480x320
Cocos2d:

cocos2d.x.version: 2.1rc0-x-2.1.4
cocos2d.x.compiled_with_profiler: false
cocos2d.x.compiled_with_gl_state_cache: true
gl.vendor: Apple Computer, Inc.
gl.renderer: Apple Software Renderer
gl.version: OpenGL ES 2.0 APPLE
gl.max_texture_size: 4096
gl.max_texture_units: 8
gl.max_samples_allowed: 4
gl.supports_PVRTC: true
gl.supports_NPOT: true
gl.supports_BGRA8888: false
gl.supports_discard_framebuffer: true
gl.supports_vertex_array_object: true

Cocos2d: cocos2d: ERROR: Failed to compile shader:
precision highp float;
uniform mat4 CC_PMatrix;
uniform mat4 CC_MVMatrix;
uniform mat4 CC_MVPMatrix;
uniform vec4 CC_Time;
uniform vec4 CC_SinTime;
uniform vec4 CC_CosTime;
uniform vec4 CC_Random01;
//CC INCLUDES END

Cocos2d: cocos2d: ERROR: 0:11: ‘<’ : syntax error syntax error

(lldb)

i can’t found demo for it

???

???