t
Loading...
Searching...
No Matches
t::Texture< BufferType > Class Template Reference

The 2D texture class. More...

#include <Texture.hpp>

Public Member Functions

 Texture (int _width, int _height, TextureFormat _format)
 Creates a new texture with the given width, height, and format.
 
 Texture (std::vector< BufferType > &_image, int _width, int _height, TextureFormat _format)
 Creates a new texture with the given image data, width, height, and format.
 

Public Attributes

int width
 The width of the texture in pixels.
 
int height
 The height of the texture in pixels.
 
TextureFormat format
 The format of the texture.
 
std::vector< BufferType > image
 The image data of the texture.
 

Detailed Description

template<class BufferType>
class t::Texture< BufferType >

The 2D texture class.

A texture is an image that can be used for any purpose, such as a render target, a texture map, a depth map, etc.

Constructor & Destructor Documentation

◆ Texture()

template<class BufferType >
t::Texture< BufferType >::Texture ( std::vector< BufferType > & _image,
int _width,
int _height,
TextureFormat _format )
inline

Creates a new texture with the given image data, width, height, and format.

Parameters
_imageThe image data of the texture.
_widthThe width of the texture in pixels.
_heightThe height of the texture in pixels.
_formatThe format of the texture.

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