# GstGLFramebuffer

A GstGLFramebuffer represents and holds an OpenGL framebuffer object with it's associated attachments.

A GstGLFramebuffer can be created with gst_gl_framebuffer_new or gst_gl_framebuffer_new_with_default_depth and bound with gst_gl_framebuffer_bind. Other resources can be bound with gst_gl_framebuffer_attach

Note: OpenGL framebuffers are not shareable resources so cannot be used between multiple OpenGL contexts.

## GstGLFramebuffer

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstGLFramebuffer

Opaque GstGLFramebuffer struct

### Class structure

#### GstGLFramebufferClass

Opaque GstGLFramebufferClass struct

### GstGL.GLFramebufferClass

Opaque GstGL.GLFramebufferClass struct

### GstGL.GLFramebufferClass

Opaque GstGL.GLFramebufferClass struct

## GstGL.GLFramebuffer

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──GstGL.GLFramebuffer

Opaque GstGL.GLFramebuffer struct

## GstGL.GLFramebuffer

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──GstGL.GLFramebuffer

Opaque GstGL.GLFramebuffer struct

### Constructors

#### gst_gl_framebuffer_new

    GstGLFramebuffer *
    gst_gl_framebuffer_new (GstGLContext * context)

This function will internally create an OpenGL framebuffer object and must be called on context's OpenGL thread.

Parameters:

`context` –

a GstGLContext

Returns ( [transfer: full]) –

a new GstGLFramebuffer

Since : 1.10

#### GstGL.GLFramebuffer.prototype.new

    function GstGL.GLFramebuffer.prototype.new(context: GstGL.GLContext): {
        // javascript wrapper for 'gst_gl_framebuffer_new'
    }

This function will internally create an OpenGL framebuffer object and must be called on context's OpenGL thread.

Parameters:

`context` (GstGL.GLContext) –

a GstGL.GLContext

Returns (GstGL.GLFramebuffer) –

a new GstGL.GLFramebuffer

Since : 1.10

#### GstGL.GLFramebuffer.new

    def GstGL.GLFramebuffer.new (context):
        #python wrapper for 'gst_gl_framebuffer_new'

This function will internally create an OpenGL framebuffer object and must be called on context's OpenGL thread.

Parameters:

`context` (GstGL.GLContext) –

a GstGL.GLContext

Returns (GstGL.GLFramebuffer) –

a new GstGL.GLFramebuffer

Since : 1.10

#### gst_gl_framebuffer_new_with_default_depth

    GstGLFramebuffer *
    gst_gl_framebuffer_new_with_default_depth (GstGLContext * context,
                                               guint width,
                                               guint height)

This function will internally create an OpenGL framebuffer object and must be called on context's OpenGL thread.

Parameters:

`context` –

a GstGLContext

`width` –

width for the depth buffer

`height` –

for the depth buffer

Returns –

a new GstGLFramebuffer with a depth buffer of width and height

Since : 1.10

#### GstGL.GLFramebuffer.prototype.new_with_default_depth

    function GstGL.GLFramebuffer.prototype.new_with_default_depth(context: GstGL.GLContext, width: Number, height: Number): {
        // javascript wrapper for 'gst_gl_framebuffer_new_with_default_depth'
    }

This function will internally create an OpenGL framebuffer object and must be called on context's OpenGL thread.

Parameters:

`context` (GstGL.GLContext) –

a GstGL.GLContext

`width` (Number) –

width for the depth buffer

`height` (Number) –

for the depth buffer

Returns (GstGL.GLFramebuffer) –

a new GstGL.GLFramebuffer with a depth buffer of width and height

Since : 1.10

#### GstGL.GLFramebuffer.new_with_default_depth

    def GstGL.GLFramebuffer.new_with_default_depth (context, width, height):
        #python wrapper for 'gst_gl_framebuffer_new_with_default_depth'

This function will internally create an OpenGL framebuffer object and must be called on context's OpenGL thread.

Parameters:

`context` (GstGL.GLContext) –

a GstGL.GLContext

`width` (int) –

width for the depth buffer

`height` (int) –

for the depth buffer

Returns (GstGL.GLFramebuffer) –

a new GstGL.GLFramebuffer with a depth buffer of width and height

Since : 1.10

### Methods

#### gst_gl_framebuffer_attach

    gst_gl_framebuffer_attach (GstGLFramebuffer * fb,
                               guint attachment_point,
                               GstGLBaseMemory * mem)

attach mem to attachment_point

Must be called with the same OpenGL context current that fb was created with.

Parameters:

`fb` –

a GstGLFramebuffer

`attachment_point` –

the OpenGL attachment point to bind mem to

`mem` –

the memory object to bind to attachment_point

Since : 1.10

#### GstGL.GLFramebuffer.prototype.attach

    function GstGL.GLFramebuffer.prototype.attach(attachment_point: Number, mem: GstGL.GLBaseMemory): {
        // javascript wrapper for 'gst_gl_framebuffer_attach'
    }

attach mem to attachment_point

Must be called with the same OpenGL context current that fb was created with.

Parameters:

`fb` (GstGL.GLFramebuffer) –

a GstGL.GLFramebuffer

`attachment_point` (Number) –

the OpenGL attachment point to bind mem to

`mem` (GstGL.GLBaseMemory) –

the memory object to bind to attachment_point

Since : 1.10

#### GstGL.GLFramebuffer.attach

    def GstGL.GLFramebuffer.attach (self, attachment_point, mem):
        #python wrapper for 'gst_gl_framebuffer_attach'

attach mem to attachment_point

Must be called with the same OpenGL context current that fb was created with.

Parameters:

`fb` (GstGL.GLFramebuffer) –

a GstGL.GLFramebuffer

`attachment_point` (int) –

the OpenGL attachment point to bind mem to

`mem` (GstGL.GLBaseMemory) –

the memory object to bind to attachment_point

Since : 1.10

#### gst_gl_framebuffer_bind

    gst_gl_framebuffer_bind (GstGLFramebuffer * fb)

Bind fb into the current thread

Must be called with the same OpenGL context current that fb was created with.

Parameters:

`fb` –

a GstGLFramebuffer

Since : 1.10

#### GstGL.GLFramebuffer.prototype.bind

    function GstGL.GLFramebuffer.prototype.bind(): {
        // javascript wrapper for 'gst_gl_framebuffer_bind'
    }

Bind fb into the current thread

Must be called with the same OpenGL context current that fb was created with.

Parameters:

`fb` (GstGL.GLFramebuffer) –

a GstGL.GLFramebuffer

Since : 1.10

#### GstGL.GLFramebuffer.bind

    def GstGL.GLFramebuffer.bind (self):
        #python wrapper for 'gst_gl_framebuffer_bind'

Bind fb into the current thread

Must be called with the same OpenGL context current that fb was created with.

Parameters:

`fb` (GstGL.GLFramebuffer) –

a GstGL.GLFramebuffer

Since : 1.10

#### gst_gl_framebuffer_draw_to_texture

    gboolean
    gst_gl_framebuffer_draw_to_texture (GstGLFramebuffer * fb,
                                        GstGLMemory * mem,
                                        GstGLFramebufferFunc func,
                                        gpointer user_data)

Perform the steps necessary to have the output of a glDraw* command in func update the contents of mem.

Note: this function does not map mem for writing with OpenGL and that must be done manually by the caller using any of the mapping functions such as gst_memory_map with the map flags GST_MAP_WRITE | GST_MAP_GL.

Must be called with the same OpenGL context current that fb was created with.

Parameters:

`fb` –

a GstGLFramebuffer

`mem` –

the GstGLMemory to draw to

`func` ( [scope call]) –

the function to run

`user_data` –

data to pass to func

Returns –

the result of executing func

Since : 1.10

#### GstGL.GLFramebuffer.prototype.draw_to_texture

    function GstGL.GLFramebuffer.prototype.draw_to_texture(mem: GstGL.GLMemory, func: GstGL.GLFramebufferFunc, user_data: Object): {
        // javascript wrapper for 'gst_gl_framebuffer_draw_to_texture'
    }

Perform the steps necessary to have the output of a glDraw* command in func update the contents of mem.

Note: this function does not map mem for writing with OpenGL and that must be done manually by the caller using any of the mapping functions such as Gst.Memory.prototype.map with the map flags Gst.MapFlags.WRITE | GstGL.MAP_GL.

Must be called with the same OpenGL context current that fb was created with.

Parameters:

`fb` (GstGL.GLFramebuffer) –

a GstGL.GLFramebuffer

`mem` (GstGL.GLMemory) –

the GstGL.GLMemory to draw to

`func` (GstGL.GLFramebufferFunc) –

the function to run

`user_data` (Object) –

data to pass to func

Returns (Number) –

the result of executing func

Since : 1.10

#### GstGL.GLFramebuffer.draw_to_texture

    def GstGL.GLFramebuffer.draw_to_texture (self, mem, func, *user_data):
        #python wrapper for 'gst_gl_framebuffer_draw_to_texture'

Perform the steps necessary to have the output of a glDraw* command in func update the contents of mem.

Note: this function does not map mem for writing with OpenGL and that must be done manually by the caller using any of the mapping functions such as Gst.Memory.map with the map flags Gst.MapFlags.WRITE | GstGL.MAP_GL.

Must be called with the same OpenGL context current that fb was created with.

Parameters:

`fb` (GstGL.GLFramebuffer) –

a GstGL.GLFramebuffer

`mem` (GstGL.GLMemory) –

the GstGL.GLMemory to draw to

`func` (GstGL.GLFramebufferFunc) –

the function to run

`user_data` (variadic) –

data to pass to func

Returns (bool) –

the result of executing func

Since : 1.10

#### gst_gl_framebuffer_get_effective_dimensions

    gst_gl_framebuffer_get_effective_dimensions (GstGLFramebuffer * fb,
                                                 guint * width,
                                                 guint * height)

Retrieve the effective dimensions from the current attachments attached to fb.

Parameters:

`fb` –

a GstGLFramebuffer

`width` ( [out][allow-none]) –

output width

`height` ( [out][allow-none]) –

output height

Since : 1.10

#### GstGL.GLFramebuffer.prototype.get_effective_dimensions

    function GstGL.GLFramebuffer.prototype.get_effective_dimensions(): {
        // javascript wrapper for 'gst_gl_framebuffer_get_effective_dimensions'
    }

Retrieve the effective dimensions from the current attachments attached to fb.

Parameters:

`fb` (GstGL.GLFramebuffer) –

a GstGL.GLFramebuffer

Since : 1.10

#### GstGL.GLFramebuffer.get_effective_dimensions

    def GstGL.GLFramebuffer.get_effective_dimensions (self):
        #python wrapper for 'gst_gl_framebuffer_get_effective_dimensions'

Retrieve the effective dimensions from the current attachments attached to fb.

Parameters:

`fb` (GstGL.GLFramebuffer) –

a GstGL.GLFramebuffer

Since : 1.10

#### gst_gl_framebuffer_get_id

    guint
    gst_gl_framebuffer_get_id (GstGLFramebuffer * fb)

Parameters:

`fb` –

a GstGLFramebuffer

Returns –

the OpenGL id for fb

Since : 1.10

#### GstGL.GLFramebuffer.prototype.get_id

    function GstGL.GLFramebuffer.prototype.get_id(): {
        // javascript wrapper for 'gst_gl_framebuffer_get_id'
    }

Parameters:

`fb` (GstGL.GLFramebuffer) –

a GstGL.GLFramebuffer

Returns (Number) –

the OpenGL id for fb

Since : 1.10

#### GstGL.GLFramebuffer.get_id

    def GstGL.GLFramebuffer.get_id (self):
        #python wrapper for 'gst_gl_framebuffer_get_id'

Parameters:

`fb` (GstGL.GLFramebuffer) –

a GstGL.GLFramebuffer

Returns (int) –

the OpenGL id for fb

Since : 1.10

## Function Macros

### GST_GL_FRAMEBUFFER_CAST

    #define GST_GL_FRAMEBUFFER_CAST(obj)        ((GstGLFramebuffer*)(obj))

## Callbacks

### GstGLFramebufferFunc

    gboolean
    (*GstGLFramebufferFunc) (gpointer stuff)

callback definition for operating through a GstGLFramebuffer object

Parameters:

`stuff` –

user data

Returns –
No description available

### GstGL.GLFramebufferFunc

    function GstGL.GLFramebufferFunc(stuff: Object): {
        // javascript wrapper for 'GstGLFramebufferFunc'
    }

callback definition for operating through a GstGL.GLFramebuffer object

Parameters:

`stuff` (Object) –

user data

Returns (Number) –
No description available

### GstGL.GLFramebufferFunc

    def GstGL.GLFramebufferFunc (stuff):
        #python wrapper for 'GstGLFramebufferFunc'

callback definition for operating through a GstGL.GLFramebuffer object

Parameters:

`stuff` (object) –

user data

Returns (bool) –
No description available

The results of the search are