Added support for webGL context loss
This commit is contained in:
parent
1997071a9b
commit
53506da65e
7 changed files with 234 additions and 132 deletions
|
@ -3,12 +3,22 @@
|
|||
*/
|
||||
|
||||
PIXI.WebGLShaderManager = function(gl)
|
||||
{
|
||||
this.setContext(gl);
|
||||
|
||||
// the final one is used for the rendering strips
|
||||
//this.stripShader = new PIXI.StripShader(gl);
|
||||
};
|
||||
|
||||
PIXI.WebGLShaderManager.prototype.setContext = function(gl)
|
||||
{
|
||||
this.gl = gl;
|
||||
|
||||
// the next one is used for rendering primatives
|
||||
this.primitiveShader = new PIXI.PrimitiveShader(gl);
|
||||
|
||||
// this shader is used for the default sprite rendering
|
||||
this.defaultShader = new PIXI.PixiShader(gl);
|
||||
//PIXI.defaultShader = this.defaultShader;
|
||||
|
||||
var shaderProgram = this.defaultShader.program;
|
||||
|
||||
|
@ -18,14 +28,8 @@ PIXI.WebGLShaderManager = function(gl)
|
|||
gl.enableVertexAttribArray(this.defaultShader.colorAttribute);
|
||||
gl.enableVertexAttribArray(this.defaultShader.aTextureCoord);
|
||||
|
||||
// the next one is used for rendering primatives
|
||||
this.primitiveShader = new PIXI.PrimitiveShader(gl);
|
||||
|
||||
|
||||
// the final one is used for the rendering strips
|
||||
//this.stripShader = new PIXI.StripShader(gl);
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
PIXI.WebGLShaderManager.prototype.activatePrimitiveShader = function()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue