struct mrpt::opengl::Texture::Options
Overview
Options while creating a texture from an image.
#include <mrpt/opengl/Texture.h> struct Options { // fields bool generateMipMaps = true; bool magnifyLinearFilter = true; bool enableTransparency = false; Wrapping wrappingModeS = Wrapping::Repeat; Wrapping wrappingModeT = Wrapping::Repeat; bool isColorData = true; const void* shareScope = nullptr; // construction Options(); };
Fields
bool magnifyLinearFilter = true
If set (true), interpolation will happen when getting closer to the texture (magnify).
Otherwise (false), it will be not interpolated, so each pixel will be rendered as a square box with constant color (e.g. suitable for gridmaps)
Wrapping wrappingModeS = Wrapping::Repeat
How to repeat texture coordinate “S”.
Wrapping wrappingModeT = Wrapping::Repeat
How to repeat texture coordinate “T”.
bool isColorData = true
If true (default), the texture is treated as sRGB color and auto-decoded to linear space by the GPU.
Set to false for data textures like normal maps.
const void* shareScope = nullptr
Textures assigned from the same image (same pixel buffer, alpha image and options) are uploaded once and shared, but only among those with the same non-null shareScope.
A scope must only be used with one OpenGL context, since texture names are not valid in other contexts (unless explicitly shared). nullptr (default): the texture is never shared. CompiledScene uses the EGL context it is compiled in, or one scope for all non-EGL contexts.