ciao , ho le seguenti due classi:
codice:function Effect( vertexShader, fragmentShader, m_gl) { this.shaderProgram; this.m_arayConstantsShader; this.SemanticInVertexBuffer; this.MatrixConstants; this.LightConstants; this.program; this.ShaderProgram; var cfragmentShader = this.GetShader(fragmentShader); var cvertexShader = this.GetShader(vertexShader); this.ShaderProgram = m_gl.createProgram(); m_gl.attachShader(this.ShaderProgram, cvertexShader); m_gl.attachShader(this.ShaderProgram, cfragmentShader); m_gl.linkProgram(this.ShaderProgram); if (!m_gl.getProgramParameter(this.ShaderProgram, m_gl.LINK_STATUS)) { alert("errore inizializzazione shader"); } };non riesco a chiamare il costruttore della classe base, mi da un errore la funzione:codice:function MyEffect(vertexShader, fragmentShader, m_gl) { this._super(vertexShader, fragmentShader, m_gl); } MyEffect.prototype = new Effect(); MyEffect.prototype.constructor = Effect;
this._super(vertexShader, fragmentShader, m_gl);
come si fa?
grazie.

Rispondi quotando