title: AndEngine - how to use standalone shaders
body: <p>I've found andengine sample with blur effect and it works fine, i found that i can use ShaderProgram class and in PreDraw of the Sprite use some shaders (setShaders).</p>
  
  <p>Can i use the same class ShaderProgramm and use shader without attach to sprite ?</p>
  
  <p>For example in onDraw use Shader that only draw a grenn triangle on scene (like in android opengl example). Is there simple way to use ShaderProgram in this way (how can i attach shaders out of PreDraw of Sprite) ?</p>
  
  <p>I've tried smth like this:</p>
  
  <pre><code>BrushShaderProgram bs = BrushShaderProgram.getInstance();
  bs.link(pGLState);
  GLES20.glUseProgram(bs.getId());
  GLES20.glVertexAttribPointer(bs.maPositionHandle, 3, GLES20.GL_FLOAT, false, 12, triangleVB);
  GLES20.glEnableVertexAttribArray(bs.maPositionHandle);
  GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 3);
  </code></pre>
  
  <p>shader is simple:</p>
  
  <pre><code>public static final String VERTEXSHADER =  
                  "attribute vec4 vPosition; \n" +
                  "void main(){              \n" +
                  " gl_Position = vPosition; \n" +
                  "}                         \n";
  
  public static final String FRAGMENTSHADER = "precision mediump float;  \n" +
                  "void main(){              \n" +
                  " gl_FragColor = vec4 (0.63671875, 0.76953125, 0.22265625, 1.0); \n" +
                  "}                         \n";
  </code></pre>