gdk-graphics  1b6d84e044c2c953fd7c9501e628a67e80f4da0d
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
gdk::texture Class Referenceabstract

2d color data, usually used to color the surfaces of a 3d model. more accurately: used to color fragments produced from the rasterization of primitive surfaces. ultimately textures are just a uniform type, they can be used in any number of ways and may not contribute to the color of any fragments, Example: being used as a "heightmap", to displace vertex position in the programmable vertex stage. More...

#include <texture.h>

Inheritance diagram for gdk::texture:
gdk::webgl1es2_texture

Classes

struct  image_data_2d_view
 pod struct representing a view on decoded image data More...
 

Public Types

enum  data_format { data_format::rgb, data_format::rgba, data_format::depth_component }
 < format of data in the byte array More...
 

Public Member Functions

virtual void update_data (const image_data_2d_view &)=0
 replace the texture data with new data
 
virtual void update_data (const image_data_2d_view &, const size_t offsetX, const size_t offsetY)=0
 
virtual ~texture ()=default
 trivial destructor
 

Protected Member Functions

 texture ()=default
 interface type cannot be instantiated
 

Detailed Description

2d color data, usually used to color the surfaces of a 3d model. more accurately: used to color fragments produced from the rasterization of primitive surfaces. ultimately textures are just a uniform type, they can be used in any number of ways and may not contribute to the color of any fragments, Example: being used as a "heightmap", to displace vertex position in the programmable vertex stage.

Member Enumeration Documentation

◆ data_format

< format of data in the byte array

Enumerator
rgb 

data is a sequence of bytes representing red, green, blue, ...

rgba 

data is a sequence of bytes representing red, green, blue, alpha, ...

depth_component 

special format used by textures attached to the depth buffer of a texture_camera

Member Function Documentation

◆ update_data()

virtual void gdk::texture::update_data ( const image_data_2d_view ,
const size_t  offsetX,
const size_t  offsetY 
)
pure virtual

update a section of texture data formats must match new data must be kept within bounds of the existing data

Implemented in gdk::webgl1es2_texture.


The documentation for this class was generated from the following file: