3 #ifndef GDK_GFX_WEBGL1ES2_TEXTURE_H 4 #define GDK_GFX_WEBGL1ES2_TEXTURE_H 6 #include <gdk/opengl.h> 7 #include <gdk/texture.h> 8 #include <jfc/unique_handle.h> 58 nearest_mipmap_nearest,
63 linear_mipmap_nearest,
70 nearest_mipmap_linear,
128 std::array<std::byte *, 6>
data;
178 jfc::unique_handle<GLuint> m_Handle;
180 size_t m_CurrentDataWidth;
181 size_t m_CurrentDataHeight;
182 GLint m_CurrentDataFormat;
wrap_mode
Definition: webgl1es2_texture.h:94
size_t height
height of a single image in the cube (all must be same)
Definition: webgl1es2_texture.h:122
1 channel input: rgb = luminance, a = 1
GLuint getHandle() const
returns the handle to the webgl1es2_texture in the opengl context
bool operator==(const webgl1es2_texture &) const
equality semantics
bind_target
GLES2.0/Web1.0 defines 2 bind targets.
Definition: webgl1es2_texture.h:110
4channel input: red, green, blue, alpha channels
static webgl1es2_texture make_from_png_rgba32(const std::vector< std::underlying_type< std::byte >::type > aRGBA32PNGData)
constructs a 2d webgl1es2_texture from png rgba32 encoded file data
minification_filter
Definition: webgl1es2_texture.h:45
a texture generally represents the color of a surface
Definition: webgl1es2_texture.h:18
webgl1es2_texture::format format
format of the image data. must be same for all surfaces
Definition: webgl1es2_texture.h:124
std::array< std::byte *, 6 > data
Definition: webgl1es2_texture.h:128
static const std::shared_ptr< gdk::webgl1es2_texture > GetCheckerboardOfDeath()
creates a cubic webgl1es2_texture from decoded image data.
2 channel input: rgb = luminance, a = alpha
magnification_filter
Definition: webgl1es2_texture.h:81
2d color data, usually used to color the surfaces of a 3d model. more accurately: used to color fragm...
Definition: texture.h:17
webgl1es2_texture & operator=(webgl1es2_texture &&)=default
move semantics
virtual void update_data(const image_data_2d_view &) override
replace the texture data with new data
size_t width
width of a single image in the cube (all must be same)
Definition: webgl1es2_texture.h:121
pod struct representing a view on decoded image data
Definition: texture.h:35
bool operator!=(const webgl1es2_texture &) const
equality semantics
format
format of uncompressed image data provided to the ctor & format of the webgl1es2_texture data within ...
Definition: webgl1es2_texture.h:33
1 channel input: rgb=0, a=alpha
webgl1es2_texture(webgl1es2_texture &&)=default
move semantics
Used to attach a texture to one of an FBO's buffers.
3 channel input: red, green, blue channels only, alpha is set to 1
description of a cubic image
Definition: webgl1es2_texture.h:119