EMI: Implement Specialty Textures in OpenGL
This commit is contained in:
parent
640889b805
commit
78ec6f4aa9
9 changed files with 89 additions and 14 deletions
|
@ -87,4 +87,20 @@ GfxBase *CreateGfxOpenGL() {
|
|||
}
|
||||
#endif // USE_OPENGL
|
||||
|
||||
void SpecialtyMaterial::select() const {
|
||||
if (_texture) {
|
||||
g_driver->selectMaterial(_texture);
|
||||
}
|
||||
}
|
||||
|
||||
void SpecialtyMaterial::create(const char *data, int width, int height) {
|
||||
delete _texture;
|
||||
_texture = new Texture();
|
||||
_texture->_width = width;
|
||||
_texture->_height = height;
|
||||
_texture->_bpp = 4;
|
||||
_texture->_colorFormat = BM_RGBA;
|
||||
g_driver->createMaterial(_texture, data, NULL);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue