unrust / uni-gl

Unrust native/wasm compatibility layer for openGL API
Apache License 2.0
16 stars 7 forks source link

discrepancy between webgl and native #7

Closed jice-nospam closed 4 years ago

jice-nospam commented 4 years ago

The native implementation does not clear the GL framebuffer so you can overdraw a frame on top of the previous one using transparent colors. On the other hand, the default behavior for WebGL context is to clear the buffer. Add parameter preserveDrawingBuffer:true in WebGLContextAttributes to have a consistent behavior between both platforms.