Beispiel #1
0
func (c *Context) DeleteFramebuffer(f Framebuffer) {
	_ = c.runOnContextThread(func() error {
		ff := uint32(f)
		if !gl.IsFramebuffer(ff) {
			return nil
		}
		if c.lastFramebuffer == f {
			c.lastFramebuffer = invalidFramebuffer
			c.lastViewportWidth = 0
			c.lastViewportHeight = 0
		}
		gl.DeleteFramebuffers(1, &ff)
		return nil
	})
}
Beispiel #2
0
// IsFramebuffer reports if fb is a valid frame buffer.
//
// http://www.khronos.org/opengles/sdk/docs/man3/html/glIsFramebuffer.xhtml
func IsFramebuffer(fb Framebuffer) bool {
	return gl.IsFramebuffer(fb.Value)
}