@@ -14,8 +14,8 @@ var glpPixelInspector = function (gl) {
1414 this . originalPrograms = { } ;
1515 this . locationMap = { } ;
1616 this . enabled = false ;
17- this . FramebufferIsBound = false ;
18- this . RenderbufferIsBound = false ;
17+ this . framebufferIsBound = false ;
18+ this . renderbufferIsBound = false ;
1919}
2020
2121/**
@@ -96,7 +96,7 @@ glpPixelInspector.prototype.applyUniform = function (uniform) {
9696 * @return {WebGLShader } Pixel Inspector Shader
9797 */
9898glpPixelInspector . prototype . enable = function ( ) {
99- if ( this . FramebufferIsBound || this . RenderbufferIsBound ) {
99+ if ( this . framebufferIsBound || this . renderbufferIsBound ) {
100100 return ;
101101 }
102102 this . blendProp = this . gl . getParameter ( this . gl . BLEND ) ;
@@ -151,14 +151,22 @@ glpPixelInspector.prototype.disable = function() {
151151 }
152152}
153153
154+ glpPixelInspector . prototype . bindFrameBuffer = function ( enable ) {
155+ this . framebufferIsBound = ! ! enable ;
156+ this . toggleByBuffer ( ! ! enable ) ;
157+ }
158+
159+ glpPixelInspector . prototype . bindRenderBuffer = function ( enable ) {
160+ this . renderbufferIsBound = ! ! enable ;
161+ this . toggleByBuffer ( ! ! enable ) ;
162+ }
163+
154164glpPixelInspector . prototype . toggleByBuffer = function ( enable ) {
155- this . FramebufferIsBound = ! ! enable ;
156- this . RenderbufferIsBound = ! ! enable ;
157165 if ( ! this . enabled ) {
158166 return ;
159167 }
160168
161- if ( ! this . FramebufferIsBound && ! this . RenderbufferIsBound ) {
169+ if ( ! this . framebufferIsBound && ! this . renderbufferIsBound ) {
162170 this . enable ( ) ;
163171 } else {
164172 this . disable ( ) ;
0 commit comments