GstGL.GLFramebuffer¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
attachments |
[ |
r |
|
context |
r |
||
fbo_id |
r |
||
object |
r |
Class Details¶
- class GstGL.GLFramebuffer(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
GstGL.GLFramebuffer
represents and holds an OpenGL framebuffer object with it’s associated attachments.A
GstGL.GLFramebuffer
can be created withGstGL.GLFramebuffer.new
() orGstGL.GLFramebuffer.new_with_default_depth
() and bound withGstGL.GLFramebuffer.bind
(). Other resources can be bound withGstGL.GLFramebuffer.attach
()Note: OpenGL framebuffers are not shareable resources so cannot be used between multiple OpenGL contexts.
New in version 1.10.
- classmethod new(context)[source]¶
- Parameters:
context (
GstGL.GLContext
) – aGstGL.GLContext
- Returns:
a new
GstGL.GLFramebuffer
- Return type:
This function will internally create an OpenGL framebuffer object and must be called on context's OpenGL thread.
New in version 1.10.
- classmethod new_with_default_depth(context, width, height)[source]¶
- Parameters:
context (
GstGL.GLContext
) – aGstGL.GLContext
width (
int
) – width for the depth bufferheight (
int
) – for the depth buffer
- Returns:
a new
GstGL.GLFramebuffer
with a depth buffer of width and height- Return type:
This function will internally create an OpenGL framebuffer object and must be called on context's OpenGL thread.
New in version 1.10.
- attach(attachment_point, mem)[source]¶
- Parameters:
attachment_point (
int
) – the OpenGL attachment point to bind mem tomem (
GstGL.GLBaseMemory
) – the memory object to bind to attachment_point
attach mem to attachment_point
Must be called with the same OpenGL context current that self was created with.
New in version 1.10.
- bind()[source]¶
Bind self into the current thread
Must be called with the same OpenGL context current that self was created with.
New in version 1.10.
- draw_to_texture(mem, func, *user_data)[source]¶
- Parameters:
mem (
GstGL.GLMemory
) – theGstGL.GLMemory
to draw tofunc (
GstGL.GLFramebufferFunc
) – the function to run
- Returns:
the result of executing func
- Return type:
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 flagsGst.MapFlags.WRITE
|GstGL.MAP_GL
.Must be called with the same OpenGL context current that self was created with.
New in version 1.10.