mirror of
https://gitlab.com/raylibtemplates/rt.git
synced 2026-06-18 14:55:11 -04:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c951468236 | ||
|
|
439ba4478d | ||
|
|
a21cc3c1f4 |
14
src/draw.c
Normal file
14
src/draw.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include "draw.h"
|
||||||
|
#include "main.h"
|
||||||
|
#include "raylib.h"
|
||||||
|
#include "raymath.h"
|
||||||
|
|
||||||
|
void Draw() {
|
||||||
|
ClearBackground(BLACK);
|
||||||
|
DrawCircleV((Vector2){160.0f, 120.0f}, 120.0f, WHITE);
|
||||||
|
BeginMode3D(cam);
|
||||||
|
{
|
||||||
|
DrawModel(cube, Vector3Zero(), 1.0f, WHITE);
|
||||||
|
}
|
||||||
|
EndMode3D();
|
||||||
|
}
|
||||||
1
src/draw.h
Normal file
1
src/draw.h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
extern void Draw();
|
||||||
14
src/main.c
14
src/main.c
@@ -1,10 +1,9 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "consts.h"
|
#include "consts.h"
|
||||||
|
#include "draw.h"
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
#include "raymath.h"
|
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "../data/cube.png.h"
|
#include "../data/cube.png.h"
|
||||||
|
|
||||||
@@ -16,7 +15,6 @@
|
|||||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||||
|
|
||||||
static void MainLoop();
|
static void MainLoop();
|
||||||
static void Draw();
|
|
||||||
|
|
||||||
RenderTexture2D target;
|
RenderTexture2D target;
|
||||||
|
|
||||||
@@ -85,13 +83,3 @@ static void MainLoop() {
|
|||||||
}
|
}
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Draw() {
|
|
||||||
ClearBackground(BLACK);
|
|
||||||
DrawCircleV((Vector2){160.0f, 120.0f}, 120.0f, WHITE);
|
|
||||||
BeginMode3D(cam);
|
|
||||||
{
|
|
||||||
DrawModel(cube, Vector3Zero(), 1.0f, WHITE);
|
|
||||||
}
|
|
||||||
EndMode3D();
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user