OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
OpenXcom::helper::ShaderBase< const Pixel > Class Template Reference

This is surface argument to ShaderDraw. More...

#include <ShaderDrawHelper.h>

Inheritance diagram for OpenXcom::helper::ShaderBase< const Pixel >:
OpenXcom::ShaderRepeat< Pixel >

Public Member Functions

 ShaderBase (const ShaderBase &s)
 copy constructor
 
 ShaderBase (const ShaderBase< Pixel > &s)
 copy constructor
 
 ShaderBase (const std::vector< Pixel > &f, int max_x, int max_y)
 create surface using vector f as data source. More...
 

Detailed Description

template<typename Pixel>
class OpenXcom::helper::ShaderBase< const Pixel >

This is surface argument to ShaderDraw.

every pixel of this surface will have type Pixel. You cant modify pixel in that surface.

Constructor & Destructor Documentation

template<typename Pixel>
OpenXcom::helper::ShaderBase< const Pixel >::ShaderBase ( const std::vector< Pixel > &  f,
int  max_x,
int  max_y 
)
inline

create surface using vector f as data source.

surface will have max_y x max_x dimensions. size of f should be bigger than max_y*max_x. Attention: after use of this constructor you change size of f then _orgin will be invalid and use of this object will cause memory exception.

Parameters
fvector that are treated as surface
max_xx dimension of f
max_yy dimension of f

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