mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-05-07 15:51:22 +00:00
texture:: loadTextureGL now fails if no actual texture is present
This commit is contained in:
@@ -210,6 +210,7 @@ template<class T, class U> void scale_colorarray(int origdim, int targetdim, con
|
||||
|
||||
bool texture_data::loadTextureGL() {
|
||||
|
||||
if(!twidth || !theight) return false;
|
||||
if(textureid == 0) glGenTextures(1, &textureid);
|
||||
|
||||
glBindTexture( GL_TEXTURE_2D, textureid);
|
||||
|
||||
Reference in New Issue
Block a user