def texture_from_description(desc, width, height, suppress_unbind=False):
    target = tex_targets[desc.get('target', 'GL_TEXTURE_2D')]
    format = formats[desc['format']]
    internal_format = internal_formats[desc['internal_format']]
    ttype = types[desc['type']]
    # TODO - add support for texture parameters - clamping, filters, etc
    
    if target == tex_targets['GL_TEXTURE_2D']:
        tex = Texture(0, target)
        tex.bind()
        tex.allocate2D(0, internal_format, width, height, 0, format, ttype, Option.apply(None))
        if not suppress_unbind: tex.unbind()
        return tex
    else:
        raise LWJGLException("FreeBuild Texture objects only know how to allocate 2D textures")
def stage_from_description(src_path,description):
    shader = shader_from_bundle(os.path.join(dir,description["shader_bundle"]))()
    target = Option.apply(None if description.get('target','display') else framebuffer_from_description(description))