![]() |
VR-Forces Developer's Guide
|
GPU op that uploads a sub-region of RGBA8 pixels via glTexSubImage2D.
Pixels are copied at construction so the caller may reuse its source buffer immediately after enqueuing the op.

Public Member Functions | |
| DtTextureSubRegionUploadOp (DtDe &de, std::shared_ptr< GLuint > handle, int x, int y, int w, int h, std::vector< uint8_t > pixels) | |
| virtual void | execute () override |
| virtual unsigned int | textureByteCount () const override |
Public Member Functions inherited from makVrv::DtGlTextureOp | |
| DtGlTextureOp (const std::string &name, DtDe &de) | |
| virtual | ~DtGlTextureOp () |
| virtual void | execute (DtGpuArenaUploadState &uploadState) override |
Public Member Functions inherited from makVrv::DtGpuOperation | |
| DtGpuOperation (const std::string &name, DtDe &de) | |
| virtual | ~DtGpuOperation () |
Private Attributes | |
| std::shared_ptr< GLuint > | myHandle |
| int | myX |
| int | myY |
| int | myW |
| int | myH |
| std::vector< uint8_t > | myPixels |
Additional Inherited Members | |
Protected Attributes inherited from makVrv::DtGpuOperation | |
| DtDe & | myDe |
| const std::string | myName |
| makVrv::DtTextureSubRegionUploadOp::DtTextureSubRegionUploadOp | ( | DtDe & | de, |
| std::shared_ptr< GLuint > | handle, | ||
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| std::vector< uint8_t > | pixels | ||
| ) |
Construct a sub-region upload op.
| de | Engine context. |
| handle | Shared GL handle of an already-allocated texture. |
| x | Left pixel offset of the region. |
| y | Top pixel offset of the region. |
| w | Width of the region in pixels. |
| h | Height of the region in pixels. |
| pixels | RGBA8 pixel data (w*h*4 bytes), moved into the op. |
|
overridevirtual |
Bind the texture and call glTexSubImage2D with the captured pixels.
Implements makVrv::DtGpuOperation.
Returns w*h*4 bytes credited to the upload state.
Reimplemented from makVrv::DtGlTextureOp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |