![]() |
VR-Forces Developer's Guide
|
GPU op that uploads a full RGBA8 image to an already-allocated GL texture.
On execute(): if the shared handle is non-zero and pixels is non-null, glBindTexture + glTexImage2D copying width*height*4 bytes from pixels. Captures the pixel pointer non-owning at construction time — caller must keep the buffer alive until the arena drains the op (typically the same or next frame).

Public Member Functions | |
| DtTextureUploadOp (DtDe &de, std::shared_ptr< GLuint > handle, int width, int height, const 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 | myWidth |
| int | myHeight |
| const uint8_t * | myPixels |
Additional Inherited Members | |
Protected Attributes inherited from makVrv::DtGpuOperation | |
| DtDe & | myDe |
| const std::string | myName |
| makVrv::DtTextureUploadOp::DtTextureUploadOp | ( | DtDe & | de, |
| std::shared_ptr< GLuint > | handle, | ||
| int | width, | ||
| int | height, | ||
| const uint8_t * | pixels | ||
| ) |
Construct a full-image upload op.
| de | Engine context. |
| handle | Shared GL handle of an already-allocated texture. |
| width | Texture width in pixels. |
| height | Texture height in pixels. |
| pixels | Non-owning pointer to width*height*4 RGBA8 bytes. Must remain valid until the op executes. |
|
overridevirtual |
Bind the texture and upload the full image.
Implements makVrv::DtGpuOperation.
Returns width*height*4 bytes credited to the upload state.
Reimplemented from makVrv::DtGlTextureOp.
|
private |
|
private |
|
private |
|
private |