Slightly improve getUnicolorTexture
This commit is contained in:
parent
24cd727899
commit
39c56dcb78
@ -16,7 +16,7 @@ namespace HardwareStats
|
||||
|
||||
void initGL();
|
||||
GLuint LoadTFBProgram(const char * vertex_file_path, const char **varyings, unsigned varyingscount);
|
||||
video::ITexture* getUnicolorTexture(video::SColor c);
|
||||
video::ITexture* getUnicolorTexture(const video::SColor &c);
|
||||
void setTexture(unsigned TextureUnit, GLuint TextureId, GLenum MagFilter, GLenum MinFilter, bool allowAF = false);
|
||||
GLuint LoadShader(const char * file, unsigned type);
|
||||
|
||||
|
@ -169,10 +169,13 @@ void saveCompressedTexture(const std::string& compressed_tex)
|
||||
|
||||
static unsigned colorcount = 0;
|
||||
|
||||
video::ITexture* getUnicolorTexture(video::SColor c)
|
||||
video::ITexture* getUnicolorTexture(const video::SColor &c)
|
||||
{
|
||||
video::SColor tmp[4] = {
|
||||
c, c, c, c
|
||||
unsigned tmp[4] = {
|
||||
c.color,
|
||||
c.color,
|
||||
c.color,
|
||||
c.color
|
||||
};
|
||||
video::IImage *img = irr_driver->getVideoDriver()->createImageFromData(video::ECF_A8R8G8B8, core::dimension2d<u32>(2, 2), tmp);
|
||||
img->grab();
|
||||
|
Loading…
Reference in New Issue
Block a user