소스 검색

fix for read pixels

David Catuhe 8 년 전
부모
커밋
dc1d7c9309
4개의 변경된 파일2133개의 추가작업 그리고 2132개의 파일을 삭제
  1. 1064 1064
      dist/preview release/babylon.d.ts
  2. 1064 1064
      dist/preview release/babylon.module.d.ts
  3. 4 3
      dist/preview release/what's new.md
  4. 1 1
      src/babylon.engine.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1064 - 1064
dist/preview release/babylon.d.ts


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 1064 - 1064
dist/preview release/babylon.module.d.ts


+ 4 - 3
dist/preview release/what's new.md

@@ -29,10 +29,11 @@
  - New blur mode for mirrors. [Demo](https://www.babylonjs-playground.com/#9I6NX1) ([deltakosh](https://github.com/deltakosh)) 
 
 ### Updates
+- New way to force compilation of materials. [Doc here](http://doc.babylonjs.com/tutorials/How_materials_work) ([deltakosh](https://github.com/deltakosh))
 - Added a Physics tab to the inspector ([abow](https://github.com/abow))
-- New Debug.PhysicsViewer class for viewing PhysicsImpostors [Demo](http://www.babylonjs-playground.com/#CA51CM#2) ([abow](https://github.com/abow))
-- New ColorPicker for GUI [Demo](https://www.babylonjs-playground.com/#91I2RE#1) ([abow](https://github.com/abow))
-- Added slerp and limits to BoneLookController [Demo](https://www.babylonjs-playground.com/#1YEPX6#11) ([abow](https://github.com/abow)) 
+- New Debug.PhysicsViewer class for viewing PhysicsImpostors. [Demo](http://www.babylonjs-playground.com/#CA51CM#2) ([abow](https://github.com/abow))
+- New ColorPicker for GUI. [Demo](https://www.babylonjs-playground.com/#91I2RE#1) ([abow](https://github.com/abow))
+- Added slerp and limits to BoneLookController. [Demo](https://www.babylonjs-playground.com/#1YEPX6#11) ([abow](https://github.com/abow)) 
 - new `Texture.readPixels()` function to read texture content ([deltakosh](https://github.com/deltakosh))
 - New helpers to use ExtrudePolygon. [Demo](http://www.babylonjs-playground.com/#RNCYVM#10) ([Cubees](https://github.com/Cubees))
 - PostProcess can now use alpha blending and share outputs ([deltakosh](https://github.com/deltakosh))

+ 1 - 1
src/babylon.engine.ts

@@ -3982,7 +3982,7 @@
                 gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, lodIndex);
             }
 
-            let readFormat = gl.RGBA;
+            let readFormat = (texture.type !== undefined) ? this._getRGBABufferInternalSizedFormat(texture.type) : gl.RGBA;
             let readType = (texture.type !== undefined) ? this._getWebGLTextureType(texture.type) : gl.UNSIGNED_BYTE;
             let buffer: ArrayBufferView;