瀏覽代碼

Fix uninitialized vboId in GenMeshHeightmap (#949)

Oraoto 6 年之前
父節點
當前提交
7ebcd06652
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/models.c

+ 1 - 0
src/models.c

@@ -1769,6 +1769,7 @@ Mesh GenMeshHeightmap(Image heightmap, Vector3 size)
     #define GRAY_VALUE(c) ((c.r+c.g+c.b)/3)
 
     Mesh mesh = { 0 };
+    mesh.vboId = (unsigned int *)RL_CALLOC(MAX_MESH_VBO*sizeof(unsigned int), 1);
 
     int mapX = heightmap.width;
     int mapZ = heightmap.height;