Add warn log when falling back to xor texture

This commit is contained in:
Henrik Rydgard committed 2013-03-29 16:55:45 +01:00
1 parent 75e9af1379
commit ede99eecb4
2 files changed
+9

No files matched your search

+2
View File
@@ -113,6 +113,7 @@ bool Texture::Load(const char *filename) {
if (!strcmp("png", &name[len-3]) ||
!strcmp("PNG", &name[len-3])) {
if (!LoadPNG(fn)) {
WLOG("WARNING: Failed to load .png %s, falling back to ugly gray XOR pattern!", fn);
LoadXOR();
return false;
} else {
@@ -124,6 +125,7 @@ bool Texture::Load(const char *filename) {
if (LoadZIM(name)) {
return true;
} else {
WLOG("WARNING: Failed to load .zim texture %s, falling back to ugly gray XOR pattern!", fn);
LoadXOR();
return false;
}
+7
View File
@@ -120,6 +120,13 @@ void DrawBuffer::Flush(const GLSLProgram *program, bool set_blend_state) {
}
void DrawBuffer::V(float x, float y, float z, uint32 color, float u, float v) {
#ifdef _DEBUG
if (count_ >= MAX_VERTS) {
FLOG("Overflowed the DrawBuffer");
return;
}
#endif
Vertex *vert = &verts_[count_++];
vert->x = x;
vert->y = y;