|
|
using | Format = spk::OpenGL::TextureObject::Format |
| | Texture format type for the bitmap.
|
|
using | Filtering = spk::OpenGL::TextureObject::Filtering |
| | Texture filtering type for the bitmap.
|
|
using | Filter = spk::OpenGL::TextureObject::Filter |
| | Texture filter type for the bitmap.
|
|
using | Wrap = spk::OpenGL::TextureObject::Wrap |
| | Texture wrap type for the bitmap.
|
|
using | Wrapper = spk::OpenGL::TextureObject::Wrapper |
| | Texture wrapper type for the bitmap.
|
|
using | Mipmap = spk::OpenGL::TextureObject::Mipmap |
| | Texture mipmap type for the bitmap.
|
|
using | EditionContract = spk::ContractProvider::Contract |
| | Contract type returned by edition subscriptions.
|
|
using | EditionJob = spk::ContractProvider::Job |
| | Job type invoked on bitmap edits.
|
| enum class | Format : GLenum {
RGB = GL_RGB
, RGBA = GL_RGBA
, BGR = GL_BGR
, BGRA = GL_BGRA
,
GreyLevel = GL_RED
, DualChannel = GL_RG
, DepthComponent = GL_DEPTH_COMPONENT
, DepthStencil = GL_DEPTH_STENCIL
,
Error = GL_NONE
} |
| | Supported GPU pixel formats.
|
| enum class | Filtering : GLenum { Nearest = GL_NEAREST
, Linear = GL_LINEAR
} |
| | Texture sampling algorithms for minification/magnification.
|
| enum class | Wrap : GLenum { Repeat = GL_REPEAT
, ClampToEdge = GL_CLAMP_TO_EDGE
, ClampToBorder = GL_CLAMP_TO_BORDER
} |
| | Texture coordinate wrapping strategies.
|
|
using | Mipmap = spk::ActivationStatus |
| | Indicates whether mipmaps are active.
|
|
using | Contract = StatefulObject<ActivationStatus>::Contract |
| | Subscription handle controlling callback lifetime.
|
|
using | Job = StatefulObject<ActivationStatus>::Job |
| | Callback signature executed on activation state changes.
|
|
using | Contract |
| | Handle allowing subscribers to manage callback lifetimes.
|
|
using | Job |
| | Callable invoked when the object transitions to a state.
|
|
| | Bitmap (const stbtt_fontinfo *p_fontInfo, const Size &p_fontSize) |
| | Builds a bitmap atlas for a font size.
|
| EditionContract | subscribeToEdition (const EditionJob &p_job) |
| | Subscribes to bitmap edition notifications.
|
| const Glyph & | operator[] (const wchar_t &p_glyphChar) |
| | Returns glyph data for the requested codepoint.
|
| int | lineHeight () const |
| | Returns the line height for this font size.
|
| int | kerning (const wchar_t p_previous, const wchar_t p_current) const |
| | Returns kerning adjustment between two glyphs.
|
| void | preloadGlyphs (const std::wstring &p_glyphs) |
| | Preloads glyphs into the bitmap atlas.
|
| | TextureObject (Format p_format=Format::RGBA, Filter p_filter={Filtering::Linear, Filtering::Linear}, Wrapper p_wrapper={Wrap::Repeat, Wrap::Repeat}, Mipmap p_mipmap=Mipmap::Activated) |
| | Constructs a texture with format, filtering, and wrapping options.
|
| | TextureObject (const TextureObject &p_other) |
| | Copy-constructs a texture object including CPU-side data.
|
| TextureObject & | operator= (const TextureObject &p_other) |
| | Copy-assigns a texture object including CPU-side data.
|
| | TextureObject (TextureObject &&p_other) noexcept |
| | Move-constructs a texture object transferring ownership.
|
| TextureObject & | operator= (TextureObject &&p_other) noexcept |
| | Move-assigns a texture object transferring ownership.
|
|
void | activate () const |
| | Activates this texture for rendering.
|
|
void | deactivate () const |
| | Deactivates this texture after rendering.
|
| Format | format () const |
| | Gets the current texture format.
|
| Filter | filter () const |
| | Gets filtering parameters.
|
| Wrapper | wrapper () const |
| | Gets wrapping parameters.
|
| Mipmap | mipmap () const |
| | Gets mipmap activation state.
|
| void | setFormat (Format p_format) |
| | Sets the texture format (affects upload interpretation).
|
| void | setFiltering (Filter p_filter) |
| | Sets min/mag filtering together.
|
| void | setFiltering (Filtering p_minFilter, Filtering p_magFilter) |
| | Sets minification and magnification filters independently.
|
| void | setWrap (Wrapper p_wrapper) |
| | Sets wrapping for both axes.
|
| void | setWrap (Wrap p_wrapS, Wrap p_wrapT) |
| | Sets wrapping for each axis independently.
|
| void | setMipmap (Mipmap p_mipmap) |
| | Sets mipmap activation state.
|
| spk::Vector2UInt | size () const |
| | Returns texture dimensions.
|
| size_t | sizeAsBytes () const |
| | Returns CPU data size in bytes.
|
| GLuint | id () const |
| | Returns GL texture id, creating if needed.
|
| void | setData (const uint8_t *p_data, const spk::Vector2UInt &p_size, Format p_format=Format::RGBA) |
| | Uploads pixel data from raw pointer.
|
| void | setData (std::vector< uint8_t > p_data, const spk::Vector2UInt &p_size, Format p_format=Format::RGBA) |
| | Uploads pixel data by move.
|
|
void | clearData () |
| | Clears CPU data and marks for sync.
|
| void | resize (const spk::Vector2UInt &p_size) |
| | Resizes CPU data and marks for sync.
|
| std::vector< uint8_t > & | data () |
| | Gets CPU-side pixel data.
|
| const std::vector< uint8_t > & | data () const |
| | Gets CPU-side pixel data.
|
| void | flip (const spk::Orientation &p_orientation) |
| | Flips stored pixel data along the given orientation.
|
|
void | activate () |
| | Sets the state to Activated.
|
|
void | deactivate () |
| | Sets the state to Deactivated.
|
|
| ActivableObject () |
| | Builds a deactivated object.
|
| | ActivableObject (ActivationStatus p_initial) |
| | Builds with a custom initial activation state.
|
|
void | activate () |
| | Sets the state to Activated.
|
|
void | deactivate () |
| | Sets the state to Deactivated.
|
|
void | toggle () |
| | Toggles between activated and deactivated states.
|
| bool | isActive () const |
| | Checks whether the object is currently activated.
|
| Contract | addActivationCallback (const Job &p_callback) |
| | Registers a callback executed when the object activates.
|
| Contract | addDeactivationCallback (const Job &p_callback) |
| | Registers a callback executed when the object deactivates.
|
| | StatefulObject (const ActivationStatus &p_initialState) |
| | Builds with an initial state.
|
|
StatefulObject & | operator= (const StatefulObject &p_other)=delete |
| void | setState (const ActivationStatus &p_newState) |
| | Sets a new state and triggers callbacks registered for it.
|
| ActivationStatus | state () const |
| | Returns the current state.
|
| Contract | addCallback (const ActivationStatus &p_state, const Job &p_callback) |
| | Subscribes a callback for a specific state.
|
|
void | requestSynchronization () noexcept |
| | Marks the object as needing synchronization.
|
| bool | needsSynchronization () const noexcept |
| | Checks if synchronization is pending.
|
|
void | synchronize () |
| | Performs synchronization if requested.
|
|
void | forceSynchronization () |
| | Forces synchronization regardless of current flag.
|
Font atlas texture and glyph metadata for a specific size.