~rebel/horde3d/trunk

« back to all changes in this revision

Viewing changes to trunk/Tools/Dependencies/RecastNavigation/RecastDemo/Source/imguiRenderGL.cpp

  • Committer: felix
  • Date: 2015-07-07 12:57:07 UTC
  • Revision ID: svn-v4:5ce291ac-9df0-446f-9e4f-d57731c4dda7::1699
- Updated RecastNavigation to latest version and fixed multiple issues.
- Adapted GameDetourComponent, GameDetourCrowdComponent, DetourCrowdDemo and AAA accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "imgui.h"
25
25
//#include "SDL.h"
26
26
//#include "SDL_opengl.h"
27
 
#include "GLFW/glfw.h"
 
27
#include "GLFW/glfw.h"
28
28
#include <stdio.h>
29
29
 
30
30
// Some math headers don't have PI defined.
252
252
        FILE* fp = fopen(fontpath, "rb");
253
253
        if (!fp) return false;
254
254
        fseek(fp, 0, SEEK_END);
255
 
        int size = ftell(fp);
 
255
        size_t size = ftell(fp);
256
256
        fseek(fp, 0, SEEK_SET);
257
257
        
258
258
        unsigned char* ttfBuffer = (unsigned char*)malloc(size); 
262
262
                return false;
263
263
        }
264
264
        
265
 
        fread(ttfBuffer, 1, size, fp);
 
265
        size_t readLen = fread(ttfBuffer, 1, size, fp);
266
266
        fclose(fp);
 
267
        if (readLen != size)
 
268
        {
 
269
                free(ttfBuffer);
 
270
                return false;
 
271
        }
 
272
 
267
273
        fp = 0;
268
274
        
269
275
        unsigned char* bmap = (unsigned char*)malloc(512*512);