Skip to content

Instantly share code, notes, and snippets.

@amalgamatedclyde
Created March 21, 2014 15:55
Show Gist options
  • Save amalgamatedclyde/9689351 to your computer and use it in GitHub Desktop.
Save amalgamatedclyde/9689351 to your computer and use it in GitHub Desktop.
using Color() in a frame buffer object
#this draws a magenta ellipse:
c = Ellipse(size = (200,279), pos = (220,118))
with self.fbo:
Color(1,0,1,1)
c
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
Rectangle(size = (640,480), texture = self.tex.texture)
#this doesn't:
c = Color(1,0,1,1)
with self.fbo:
c
Ellipse(size = (200,279), pos = (220,118))
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
Rectangle(size = (640,480), texture = self.tex.texture)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment