<commit_before>"""Framebuffer object.

This module is based on code which is

Copyright (c) 2009, <NAME>

and is released under the MIT license.  See LICENSE.txt for more detail.

"""

from pyglet import gl, image
import ctypes

from scikits.gpu.config import require_extension
from scikits.gpu.texture import Texture

class Framebuffer(object):
    require_extension('GL_EXT_framebuffer_object')
    fbo_names = None

    def __init__(self, width, height, bands=3, dtype=gl.GL_UNSIGNED_BYTE):
        """Framebuffer Object (FBO) for off-screen rendering.

        Parameters
        ----------
        width, height : int
            Dimension of framebuffer.  Note that for earlier versions
            of OpenGL, dimensions must be a power of two.
        bands : int
            Number of colour bands.
        dtype : opengl data-type, e.g. GL_FLOAT, GL_UNSIGNED_BYTE<commit_msg>Prevent all GL symbols from polluting the API.<commit_after>"""Framebuffer object.

This module is based on code which is

Copyright (c) 2009, <NAME>

and is released under the MIT license.  See LICENSE.txt for more detail.

"""

__all__ = ['Framebuffer']

from pyglet import gl, image
import ctypes

from scikits.gpu.config import require_extension
from scikits.gpu.texture import Texture

class Framebuffer(object):
    require_extension('GL_EXT_framebuffer_object')
    fbo_names = None

    def __init__(self, width, height, bands=3, dtype=gl.GL_UNSIGNED_BYTE):
        """Framebuffer Object (FBO) for off-screen rendering.

        Parameters
        ----------
        width, height : int
            Dimension of framebuffer.  Note that for earlier versions
            of OpenGL, dimensions must be a power of two.
        bands : int
            Number of colour bands.
        dtype : opengl data-type, e.g. GL_FLOAT, GL_UNSIGNED_BYTE
{'fraction_non_alphanumeric': 0.08096280087527352, 'fraction_numerical': 0.005470459518599562, 'mean_word_length': 2.8668076109936576, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3782404', 'n_tokens_mistral': 533, 'n_tokens_neox': 521, 'n_words': 190}