X-Git-Url: https://git.ucc.asn.au/?p=atyndall%2Fcits2231.git;a=blobdiff_plain;f=helper.c;h=b13e8f9041b1a9dbe0c7785dc3f5c0cc13fd2ed1;hp=14fbe5aa2d0c6520270a2813950893c679850d4d;hb=a850337f703fb7263f851672158e05d30cfb2b77;hpb=abf44d3ed91bc9ee8f342c6c70cacd13d4ff2b70 diff --git a/helper.c b/helper.c index 14fbe5a..b13e8f9 100644 --- a/helper.c +++ b/helper.c @@ -210,7 +210,10 @@ int makeSubmenuFromArray( const char *menuEntries[], unsigned int menuEntriesSiz * Draw a floor by looping over the floorSize and squareSize variables */ void drawFloor() { - if ( currentGroundTexture != 0 ) { + if ( currentGroundTexture == 0 ) { + getTexture(1); + glBindTexture(GL_TEXTURE_2D, 1); + } else { getTexture(currentGroundTexture); glBindTexture(GL_TEXTURE_2D, currentGroundTexture); }