GL instructions¶
New in version 1.3.0.
Clearing an FBO¶
To clear an FBO, you can use ClearColor and ClearBuffers instructions like this example:
self.fbo = Fbo(size=self.size)
with self.fbo:
ClearColor(0, 0, 0, 0)
ClearBuffers()
- class kivy.graphics.gl_instructions.ClearColor¶
Bases: kivy.graphics.instructions.Instruction
ClearColor Graphic Instruction.
New in version 1.3.0.
Sets the clear color used to clear buffers with glClear function, or ClearBuffers graphics instructions.
- a¶
Alpha component, between 0-1
- b¶
Blue component, between 0-1
- g¶
Green component, between 0-1
- r¶
Red component, between 0-1
- rgb¶
RGB color, list of 3 values in 0-1 range, alpha will be 1.
- rgba¶
RGBA used for clear color, list of 4 values in 0-1 range