Cleaning up code.
This commit is contained in:
142
main.c
142
main.c
@@ -5,7 +5,6 @@
|
|||||||
#include "stddef.h"
|
#include "stddef.h"
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
#include "time.h"
|
|
||||||
#include "rlgl.h"
|
#include "rlgl.h"
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
@@ -71,9 +70,6 @@ static inline float hash01_to_m05p05(uint32_t h_bits)
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
//Defining program structure
|
//Defining program structure
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
|
||||||
//bob
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
Camera camera; // <- now part of the game state
|
Camera camera; // <- now part of the game state
|
||||||
@@ -99,21 +95,6 @@ typedef struct
|
|||||||
Player player;
|
Player player;
|
||||||
} Master;
|
} Master;
|
||||||
|
|
||||||
// GLSL 330 core fragment shader (desktop)
|
|
||||||
// Discards fragments with alpha below a threshold so depth is only written on real pixels.
|
|
||||||
static const char *ALPHA_CLIP_FS =
|
|
||||||
"#version 330 core\n"
|
|
||||||
"in vec2 fragTexCoord;\n"
|
|
||||||
"in vec4 fragColor;\n"
|
|
||||||
"uniform sampler2D texture0;\n"
|
|
||||||
"uniform float u_alphaCutoff; // e.g., 0.3\n"
|
|
||||||
"out vec4 finalColor;\n"
|
|
||||||
"void main(){\n"
|
|
||||||
" vec4 texel = texture(texture0, fragTexCoord);\n"
|
|
||||||
" if(texel.a < u_alphaCutoff) discard;\n"
|
|
||||||
" finalColor = texel * fragColor;\n"
|
|
||||||
"}\n";
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
// Function Initation
|
// Function Initation
|
||||||
//------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------
|
||||||
@@ -154,7 +135,7 @@ int main(void)
|
|||||||
g.state = STATE_MENU;
|
g.state = STATE_MENU;
|
||||||
g.shouldExit = 0;
|
g.shouldExit = 0;
|
||||||
|
|
||||||
//Define
|
//Define player values
|
||||||
g.player.sensitivity = (Vector2){ 0.001f, 0.001f };
|
g.player.sensitivity = (Vector2){ 0.001f, 0.001f };
|
||||||
g.player.lookRotation = (Vector2){ 0 };
|
g.player.lookRotation = (Vector2){ 0 };
|
||||||
g.player.headTimer = 0.0f;
|
g.player.headTimer = 0.0f;
|
||||||
@@ -169,26 +150,27 @@ int main(void)
|
|||||||
g.player.position.y + (BOTTOM_HEIGHT + g.player.headLerp),
|
g.player.position.y + (BOTTOM_HEIGHT + g.player.headLerp),
|
||||||
g.player.position.z,
|
g.player.position.z,
|
||||||
};
|
};
|
||||||
|
g.player.camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
|
||||||
//g.player.camera.target = (Vector3){ 0.0f, 0.0f, 1.0f }; // Camera target
|
|
||||||
g.player.camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Up vector
|
|
||||||
g.player.camera.fovy = 60.0f;
|
g.player.camera.fovy = 60.0f;
|
||||||
g.player.camera.projection = CAMERA_PERSPECTIVE;
|
g.player.camera.projection = CAMERA_PERSPECTIVE;
|
||||||
g.player.cameraMode = CAMERA_FIRST_PERSON;
|
g.player.cameraMode = CAMERA_FIRST_PERSON;
|
||||||
|
|
||||||
UpdateCameraAngle(&g);
|
UpdateCameraAngle(&g);
|
||||||
|
|
||||||
|
/*
|
||||||
// Load GLTF model (no animations)
|
// Load GLTF model (no animations)
|
||||||
//Model model = LoadModel("resources/3d_models/bad_sphere.glb");
|
//Model model = LoadModel("resources/3d_models/bad_sphere.glb");
|
||||||
//Vector3 position = { 0.0f, 0.0f, 0.0f };
|
//Vector3 position = { 0.0f, 0.0f, 0.0f };
|
||||||
|
|
||||||
// Load a 2D image as texture for the billboard
|
// Load a 2D image as texture for the billboard
|
||||||
//Billboards always point toward the active camera.
|
//Billboards always point toward the active camera.
|
||||||
|
|
||||||
Texture2D sign = LoadTexture("resources/sprites/diard-charles.jpg");
|
Texture2D sign = LoadTexture("resources/sprites/diard-charles.jpg");
|
||||||
GenTextureMipmaps(&sign);
|
GenTextureMipmaps(&sign);
|
||||||
SetTextureFilter(sign, TEXTURE_FILTER_BILINEAR); // optional but looks nicer
|
SetTextureFilter(sign, TEXTURE_FILTER_BILINEAR); // optional but looks nicer
|
||||||
Vector3 bbPos = (Vector3){ 1.0f, 2.5f, 1.0f }; // where in 3D world to place it
|
Vector3 bbPos = (Vector3){ 1.0f, 2.5f, 1.0f }; // where in 3D world to place it
|
||||||
float bbSize = 5.0f; // billboard height in world units
|
float bbSize = 5.0f; // billboard height in world units
|
||||||
|
*/
|
||||||
|
|
||||||
// Load a 2D image as texture for the billboard
|
// Load a 2D image as texture for the billboard
|
||||||
//Billboards always point toward the active camera.
|
//Billboards always point toward the active camera.
|
||||||
@@ -197,34 +179,26 @@ int main(void)
|
|||||||
SetTextureFilter(tree, TEXTURE_FILTER_BILINEAR); // optional but looks nicer
|
SetTextureFilter(tree, TEXTURE_FILTER_BILINEAR); // optional but looks nicer
|
||||||
Vector3 treepos = (Vector3){ 0.0f, 0.0f, 0.0f }; // where in 3D world to place it
|
Vector3 treepos = (Vector3){ 0.0f, 0.0f, 0.0f }; // where in 3D world to place it
|
||||||
float treeSize = 15.0f; // billboard height in world units
|
float treeSize = 15.0f; // billboard height in world units
|
||||||
|
float cutoffAlpha = 0.3f; // Threshold for transparency cut off.
|
||||||
|
|
||||||
// --- Grass tile setup ---
|
// Grass tile setup
|
||||||
Texture2D texGrass = LoadTexture("resources/textures/grass_textures/Grass_01.png"); // adjust path
|
Texture2D texGrass = LoadTexture("resources/textures/grass_textures/Grass_01.png");
|
||||||
GenTextureMipmaps(&texGrass);
|
GenTextureMipmaps(&texGrass);
|
||||||
SetTextureFilter(texGrass, TEXTURE_FILTER_TRILINEAR); // nicer at angles
|
SetTextureFilter(texGrass, TEXTURE_FILTER_TRILINEAR); // nicer at angles
|
||||||
SetTextureWrap(texGrass, TEXTURE_WRAP_REPEAT);
|
SetTextureWrap(texGrass, TEXTURE_WRAP_REPEAT);
|
||||||
|
|
||||||
// A 3D plane (centered at origin) of size tileSize x tileSize
|
// A 3D plane (centered at origin) of size tileSize x tileSize
|
||||||
const float tileSize = 5.0f; // match your DrawLevel tileSize
|
const float tileSize = TILE_SIZE;
|
||||||
Mesh meshTile = GenMeshPlane(tileSize, tileSize, 1, 1);
|
Mesh meshTile = GenMeshPlane(tileSize, tileSize, 1, 1);
|
||||||
Model mdlTile = LoadModelFromMesh(meshTile);
|
Model mdlTile = LoadModelFromMesh(meshTile);
|
||||||
mdlTile.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = texGrass;
|
mdlTile.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = texGrass;
|
||||||
|
|
||||||
|
|
||||||
Shader shAlphaClip = LoadShaderFromMemory(NULL, ALPHA_CLIP_FS);
|
|
||||||
int locCutoff = GetShaderLocation(shAlphaClip, "u_alphaCutoff");
|
|
||||||
float cutoff = 0.3f; // tweak to taste; 0.3 - 0.5 works well for tree PNGs
|
|
||||||
SetShaderValue(shAlphaClip, locCutoff, &cutoff, SHADER_UNIFORM_FLOAT);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// --- Skybox setup ---
|
// --- Skybox setup ---
|
||||||
// Generate cube mesh
|
// Generate cube mesh
|
||||||
Mesh cube = GenMeshCube(1.0f, 1.0f, 1.0f);
|
Mesh cube = GenMeshCube(1.0f, 1.0f, 1.0f);
|
||||||
Model skybox = LoadModelFromMesh(cube);
|
Model skybox = LoadModelFromMesh(cube);
|
||||||
|
|
||||||
// Load skybox shader
|
// Load skybox shader
|
||||||
// Make sure the .vs/.fs are in your resources/shaders/glsl330/ folder
|
|
||||||
Shader skyboxShader = LoadShader(
|
Shader skyboxShader = LoadShader(
|
||||||
"resources/shaders/skybox.vs",
|
"resources/shaders/skybox.vs",
|
||||||
"resources/shaders/skybox.fs"
|
"resources/shaders/skybox.fs"
|
||||||
@@ -232,31 +206,22 @@ int main(void)
|
|||||||
|
|
||||||
// Attach shader to skybox
|
// Attach shader to skybox
|
||||||
skybox.materials[0].shader = skyboxShader;
|
skybox.materials[0].shader = skyboxShader;
|
||||||
|
|
||||||
// Load your cubemap (cross layout image)
|
|
||||||
Image img = LoadImage("resources/cubemap/cubemap.png");
|
Image img = LoadImage("resources/cubemap/cubemap.png");
|
||||||
// AUTO_DETECT will figure out layout (works for cross 4x3, panorama, etc.)
|
skybox.materials[0].maps[MATERIAL_MAP_CUBEMAP].texture = LoadTextureCubemap(img, CUBEMAP_LAYOUT_AUTO_DETECT);
|
||||||
skybox.materials[0].maps[MATERIAL_MAP_CUBEMAP].texture =
|
UnloadImage(img); //no longer need image loaded.
|
||||||
LoadTextureCubemap(img, CUBEMAP_LAYOUT_AUTO_DETECT);
|
|
||||||
UnloadImage(img);
|
|
||||||
|
|
||||||
// Tell the shader which material map is the environmentMap
|
// Tell the shader which material map is the environmentMap
|
||||||
int mapType = MATERIAL_MAP_CUBEMAP;
|
int mapType = MATERIAL_MAP_CUBEMAP;
|
||||||
SetShaderValue(skyboxShader,
|
SetShaderValue(skyboxShader, GetShaderLocation(skyboxShader, "environmentMap"), &mapType, SHADER_UNIFORM_INT);
|
||||||
GetShaderLocation(skyboxShader, "environmentMap"),
|
|
||||||
&mapType, SHADER_UNIFORM_INT);
|
|
||||||
|
|
||||||
// Flip/gamma options (set to 0 for PNG cross)
|
//Flip/gamma options (set to 0 for PNG cross)
|
||||||
int vflipped = 0;
|
int vflipped = 0;
|
||||||
int doGamma = 0;
|
int doGamma = 0;
|
||||||
SetShaderValue(skyboxShader, GetShaderLocation(skyboxShader, "vflipped"), &vflipped, SHADER_UNIFORM_INT);
|
SetShaderValue(skyboxShader, GetShaderLocation(skyboxShader, "vflipped"), &vflipped, SHADER_UNIFORM_INT);
|
||||||
SetShaderValue(skyboxShader, GetShaderLocation(skyboxShader, "doGamma"), &doGamma, SHADER_UNIFORM_INT);
|
SetShaderValue(skyboxShader, GetShaderLocation(skyboxShader, "doGamma"), &doGamma, SHADER_UNIFORM_INT);
|
||||||
|
|
||||||
// Load the fog-of-war shader
|
// Load the fog-of-war shader
|
||||||
Shader fog = LoadShader(
|
Shader fog = LoadShader("resources/shaders/fog.vs", "resources/shaders/fog.fs");
|
||||||
"resources/shaders/fog.vs",
|
|
||||||
"resources/shaders/fog.fs"
|
|
||||||
);
|
|
||||||
|
|
||||||
// Grab uniform locations (cache them)
|
// Grab uniform locations (cache them)
|
||||||
int locPlayer = GetShaderLocation(fog, "u_playerPos");
|
int locPlayer = GetShaderLocation(fog, "u_playerPos");
|
||||||
@@ -271,7 +236,6 @@ int main(void)
|
|||||||
// Optional if you added the sharpness curve in the shader
|
// Optional if you added the sharpness curve in the shader
|
||||||
int locSharpness = GetShaderLocation(fog, "u_sharpness");
|
int locSharpness = GetShaderLocation(fog, "u_sharpness");
|
||||||
|
|
||||||
|
|
||||||
// Let raylib know which matrices the shader expects
|
// Let raylib know which matrices the shader expects
|
||||||
fog.locs[SHADER_LOC_MATRIX_MODEL] = GetShaderLocation(fog, "matModel");
|
fog.locs[SHADER_LOC_MATRIX_MODEL] = GetShaderLocation(fog, "matModel");
|
||||||
fog.locs[SHADER_LOC_MATRIX_VIEW] = GetShaderLocation(fog, "matView");
|
fog.locs[SHADER_LOC_MATRIX_VIEW] = GetShaderLocation(fog, "matView");
|
||||||
@@ -279,21 +243,24 @@ int main(void)
|
|||||||
|
|
||||||
// --- Apply shader to your ground tile model ---
|
// --- Apply shader to your ground tile model ---
|
||||||
mdlTile.materials[0].shader = fog; // same shader also works for opaque
|
mdlTile.materials[0].shader = fog; // same shader also works for opaque
|
||||||
// (texture0 already set on mdlTile)
|
|
||||||
|
|
||||||
// Defaults for opaque geometry (no alpha cut)
|
// Defaults for opaque geometry (no alpha cut)
|
||||||
float cutoffOpaque = 0.0f;
|
float cutoffOpaque = 0.0f;
|
||||||
SetShaderValue(fog, locCutoff_fog, &cutoffOpaque, SHADER_UNIFORM_FLOAT);
|
SetShaderValue(fog, locCutoff_fog, &cutoffOpaque, SHADER_UNIFORM_FLOAT);
|
||||||
|
|
||||||
// You’ll reuse the *same* shader for trees (alpha cut).
|
// Fog/vignette tuning
|
||||||
// We won’t assign it to a Model because billboards aren’t models;
|
float inner = 0.0f; // start radius (center under player)
|
||||||
// instead we’ll render trees inside BeginShaderMode(fog) so they use it.
|
float outer = 45.0f; // how far until full fog
|
||||||
|
float minShadow = 0.45f; // baseline darkness at the center (0 = none, 1 = pitch black)
|
||||||
|
float sharpness = 2.0f; // steeper edge (optional if shader uses it)
|
||||||
|
Vector4 fogColor = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SetShaderValue(fog, locInner, &inner, SHADER_UNIFORM_FLOAT);
|
||||||
|
SetShaderValue(fog, locOuter, &outer, SHADER_UNIFORM_FLOAT);
|
||||||
|
SetShaderValue(fog, locMinShadow, &minShadow, SHADER_UNIFORM_FLOAT);
|
||||||
|
SetShaderValue(fog, locFogColor, &fogColor, SHADER_UNIFORM_VEC4);
|
||||||
|
SetShaderValue(fog, locSharpness, &sharpness, SHADER_UNIFORM_FLOAT);
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
@@ -378,17 +345,6 @@ int main(void)
|
|||||||
g.player.lean.y = Lerp(g.player.lean.y, forward*0.015f, 10.0f*delta);
|
g.player.lean.y = Lerp(g.player.lean.y, forward*0.015f, 10.0f*delta);
|
||||||
|
|
||||||
UpdateCameraAngle(&g);
|
UpdateCameraAngle(&g);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
int bbdifx = g.player.position.x - bbPos.x;
|
|
||||||
int bbdifz = g.player.position.z - bbPos.z;
|
|
||||||
|
|
||||||
bbPos.x += 0.01 * bbdifx;
|
|
||||||
bbPos.z += 0.01 * bbdifz;
|
|
||||||
*/
|
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -412,69 +368,50 @@ int main(void)
|
|||||||
{
|
{
|
||||||
ClearBackground(BLACK);
|
ClearBackground(BLACK);
|
||||||
|
|
||||||
// Fog/vignette tuning
|
|
||||||
float inner = 0.0f; // start radius (center under player)
|
|
||||||
float outer = 45.0f; // how far until full fog
|
|
||||||
float minShadow = 0.40f; // baseline darkness at the center (0 = none, 1 = pitch black)
|
|
||||||
float sharpness = 2.0f; // steeper edge (optional if shader uses it)
|
|
||||||
Vector4 fogColor = {0.0f, 0.0f, 0.0f, 1.0f};
|
|
||||||
|
|
||||||
SetShaderValue(fog, locPlayer, &g.player.position, SHADER_UNIFORM_VEC3);
|
SetShaderValue(fog, locPlayer, &g.player.position, SHADER_UNIFORM_VEC3);
|
||||||
SetShaderValue(fog, locInner, &inner, SHADER_UNIFORM_FLOAT);
|
|
||||||
SetShaderValue(fog, locOuter, &outer, SHADER_UNIFORM_FLOAT);
|
|
||||||
SetShaderValue(fog, locMinShadow, &minShadow, SHADER_UNIFORM_FLOAT);
|
|
||||||
SetShaderValue(fog, locFogColor, &fogColor, SHADER_UNIFORM_VEC4);
|
|
||||||
|
|
||||||
// Only if you added sharpness
|
|
||||||
SetShaderValue(fog, locSharpness, &sharpness, SHADER_UNIFORM_FLOAT);
|
|
||||||
|
|
||||||
|
|
||||||
BeginMode3D(g.player.camera);
|
BeginMode3D(g.player.camera);
|
||||||
|
|
||||||
rlDisableBackfaceCulling();
|
rlDisableBackfaceCulling();
|
||||||
rlDisableDepthMask();
|
rlDisableDepthMask();
|
||||||
|
|
||||||
// keep it centered on the camera
|
// keep it centered on the camera
|
||||||
skybox.transform = MatrixTranslate(
|
skybox.transform = MatrixTranslate(
|
||||||
g.player.camera.position.x,
|
g.player.camera.position.x,
|
||||||
g.player.camera.position.y,
|
g.player.camera.position.y,
|
||||||
g.player.camera.position.z
|
g.player.camera.position.z
|
||||||
);
|
);
|
||||||
|
|
||||||
DrawModel(skybox, (Vector3){0}, 1.0f, WHITE);
|
DrawModel(skybox, (Vector3){0}, 1.0f, WHITE);
|
||||||
|
|
||||||
rlEnableDepthMask();
|
rlEnableDepthMask();
|
||||||
rlEnableBackfaceCulling();
|
rlEnableBackfaceCulling();
|
||||||
|
|
||||||
DrawLevel(mdlTile);
|
DrawLevel(mdlTile);
|
||||||
|
|
||||||
/*
|
|
||||||
BeginShaderMode(shAlphaClip);
|
|
||||||
{
|
|
||||||
RenderTrees(&g, tree, treepos, treeSize);
|
|
||||||
}
|
|
||||||
EndShaderMode();
|
|
||||||
*/
|
|
||||||
|
|
||||||
// --- Trees use same fog shader but with alpha-cut enabled ---
|
// --- Trees use same fog shader but with alpha-cut enabled ---
|
||||||
float cutoffAlpha = 0.3f;
|
|
||||||
SetShaderValue(fog, locCutoff_fog, &cutoffAlpha, SHADER_UNIFORM_FLOAT);
|
SetShaderValue(fog, locCutoff_fog, &cutoffAlpha, SHADER_UNIFORM_FLOAT);
|
||||||
|
|
||||||
BeginShaderMode(fog);
|
BeginShaderMode(fog);
|
||||||
|
|
||||||
RenderTrees(&g, tree, treepos, treeSize);
|
RenderTrees(&g, tree, treepos, treeSize);
|
||||||
|
|
||||||
EndShaderMode();
|
EndShaderMode();
|
||||||
|
|
||||||
// Restore opaque cutoff for anything else you draw with that material later
|
// Restore opaque cutoff for anything else you draw with that material later
|
||||||
SetShaderValue(fog, locCutoff_fog, &cutoffOpaque, SHADER_UNIFORM_FLOAT);
|
SetShaderValue(fog, locCutoff_fog, &cutoffOpaque, SHADER_UNIFORM_FLOAT);
|
||||||
|
|
||||||
|
|
||||||
//DrawBillboard(g.player.camera, sign, bbPos, bbSize, WHITE); //This was the texture chasing you.
|
|
||||||
EndMode3D();
|
EndMode3D();
|
||||||
|
|
||||||
// Draw info box
|
// Draw info box
|
||||||
DrawRectangle(5, 5, 330, 75, Fade(SKYBLUE, 0.5f));
|
DrawRectangle(5, 5, 330*1.5, 75*1.25, Fade(SKYBLUE, 0.5f));
|
||||||
DrawRectangleLines(5, 5, 330, 75, BLUE);
|
DrawRectangleLines(5, 5, 330*1.5, 75*1.25, BLUE);
|
||||||
|
|
||||||
DrawText("Camera controls:", 15, 15, 10, BLACK);
|
DrawText("Camera controls:", 15, 15, 20, BLACK);
|
||||||
DrawText("- Move keys: W, A, S, D, Space, Left-Ctrl", 15, 30, 10, BLACK);
|
DrawText("- Move keys: W, A, S, D, Space, Left-Ctrl", 15, 30, 20, BLACK);
|
||||||
DrawText("- Look around: arrow keys or mouse", 15, 45, 10, BLACK);
|
DrawText("- Look around: arrow keys or mouse", 15, 45, 20, BLACK);
|
||||||
DrawText(TextFormat("- Velocity Len: (%06.3f)", Vector2Length((Vector2){ g.player.velocity.x, g.player.velocity.z })), 15, 60, 10, BLACK);
|
DrawText(TextFormat("- Velocity Len: (%06.3f)", Vector2Length((Vector2){ g.player.velocity.x, g.player.velocity.z })), 15, 60, 20, BLACK);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -482,8 +419,8 @@ int main(void)
|
|||||||
EndDrawing();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
};
|
};
|
||||||
//--------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------
|
||||||
// De-Initialization
|
// De-Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------
|
||||||
// Detach the texture from the model so UnloadModel won't try to free it.
|
// Detach the texture from the model so UnloadModel won't try to free it.
|
||||||
@@ -492,7 +429,6 @@ int main(void)
|
|||||||
// Now free resources you loaded:
|
// Now free resources you loaded:
|
||||||
UnloadModel(mdlTile); // frees the model and its mesh/VBOs
|
UnloadModel(mdlTile); // frees the model and its mesh/VBOs
|
||||||
UnloadTexture(texGrass); // frees the grass texture you loaded
|
UnloadTexture(texGrass); // frees the grass texture you loaded
|
||||||
UnloadTexture(sign); // frees billboard texture
|
|
||||||
UnloadTexture(tree); // frees tree texture
|
UnloadTexture(tree); // frees tree texture
|
||||||
|
|
||||||
CloseWindow(); // Close window and OpenGL context
|
CloseWindow(); // Close window and OpenGL context
|
||||||
|
|||||||
Reference in New Issue
Block a user