GlTextureFrameBuffer

tee3.webrtc

## 类 GlTextureFrameBuffer

- java.lang.Object
- - tee3.webrtc.GlTextureFrameBuffer

-     public class GlTextureFrameBuffer
      extends java.lang.Object

  Helper class for handling OpenGL framebuffer with only color attachment and no depth or stencil buffer. Intended for simple tasks such as texture copy, texture downscaling, and texture color conversion. This class is not thread safe and must be used by a thread with an active GL context.

- - ### 构造器概要

    构造器
    构造器和说明
    `GlTextureFrameBuffer(int pixelFormat)` Generate texture and framebuffer resources.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | `getFrameBufferId()` Gets the OpenGL frame buffer id.
    `int` | `getHeight()`
    `int` | `getTextureId()` Gets the OpenGL texture id.
    `int` | `getWidth()`
    `void` | `release()` Release texture and framebuffer.
    `void` | `setSize(int width, int height)` (Re)allocate texture.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### GlTextureFrameBuffer

          public GlTextureFrameBuffer(int pixelFormat)

      Generate texture and framebuffer resources. An EGLContext must be bound on the current thread when calling this function. The framebuffer is not complete until setSize() is called.

  - ### 方法详细资料

    - #### setSize

          public void setSize(int width,
                              int height)

      (Re)allocate texture. Will do nothing if the requested size equals the current size. An EGLContext must be bound on the current thread when calling this function. Must be called at least once before using the framebuffer. May be called multiple times to change size.

    - #### getWidth

          public int getWidth()

    - #### getHeight

          public int getHeight()

    - #### getFrameBufferId

          public int getFrameBufferId()

      Gets the OpenGL frame buffer id. This value is only valid after setSize() has been called.

    - #### getTextureId

          public int getTextureId()

      Gets the OpenGL texture id. This value is only valid after setSize() has been called.

    - #### release

          public void release()

      Release texture and framebuffer. An EGLContext must be bound on the current thread when calling this function. This object should not be used after this call.