
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Prevent Color Buffer from Being Cleared in WebGL
Even if removing the color by code:
mycanvas.clearColor(d[1],d[2],d[3],2.0); mycanvas.clear(can.COLOR_BUFFER_BIT );
The screen gets cleared at beginning of next draw cycle.
To create WebGLRenderingContext, previous drawing buffer can be preserved.
gl = someCanvas.getContext("webgl", { preserveDrawingBuffer: true });
The default is preserveDrawingBuffer: false by making this property true, previous drawing can be easily preserved
Advertisements