Variables initialization
This commit is contained in:
parent
5208d57f1e
commit
2fa7e00f16
2 changed files with 4 additions and 5 deletions
|
@ -557,11 +557,10 @@ void DrawGizmo(Vector3 position)
|
||||||
// Load a 3d model (from file)
|
// Load a 3d model (from file)
|
||||||
Model LoadModel(const char *fileName)
|
Model LoadModel(const char *fileName)
|
||||||
{
|
{
|
||||||
VertexData vData;
|
|
||||||
|
|
||||||
Model model;
|
Model model;
|
||||||
|
VertexData vData = { 0 };
|
||||||
|
|
||||||
// TODO: Initialize default data for model in case loading fails, maybe a cube?
|
// NOTE: Initialize default data for model in case loading fails, maybe a cube?
|
||||||
|
|
||||||
if (strcmp(GetExtension(fileName),"obj") == 0) vData = LoadOBJ(fileName);
|
if (strcmp(GetExtension(fileName),"obj") == 0) vData = LoadOBJ(fileName);
|
||||||
else TraceLog(WARNING, "[%s] Model extension not recognized, it can't be loaded", fileName);
|
else TraceLog(WARNING, "[%s] Model extension not recognized, it can't be loaded", fileName);
|
||||||
|
@ -1589,7 +1588,7 @@ static float GetHeightValue(Color pixel)
|
||||||
// Load OBJ mesh data
|
// Load OBJ mesh data
|
||||||
static VertexData LoadOBJ(const char *fileName)
|
static VertexData LoadOBJ(const char *fileName)
|
||||||
{
|
{
|
||||||
VertexData vData;
|
VertexData vData = { 0 };
|
||||||
|
|
||||||
char dataType;
|
char dataType;
|
||||||
char comments[200];
|
char comments[200];
|
||||||
|
|
|
@ -649,7 +649,7 @@ static SpriteFont LoadTTF(const char *fileName, int fontSize)
|
||||||
// 1) Generate sprite sheet image with characters from TTF
|
// 1) Generate sprite sheet image with characters from TTF
|
||||||
// 2) Load image as SpriteFont
|
// 2) Load image as SpriteFont
|
||||||
|
|
||||||
SpriteFont font;
|
SpriteFont font = { 0 };
|
||||||
|
|
||||||
Image image;
|
Image image;
|
||||||
image.width = 512;
|
image.width = 512;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue