Merge branch 'raysan5:master' into master

This commit is contained in:
Luiz Pestana 2021-07-30 22:12:33 -03:00 • committed by GitHub
commit 45f27a1d20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 1024 additions and 802 deletions

View file

@ -214,7 +214,7 @@ endif
# -std=gnu99 defines C language mode (GNU C from 1999 revision)
# -Wno-missing-braces ignore invalid warning (GCC bug 53119)
# -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
CFLAGS += -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces
CFLAGS += -Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Wunused-result
ifeq ($(BUILD_MODE),DEBUG)
CFLAGS += -g

View file

@ -11,6 +11,7 @@
#include "raylib.h"
#include "rlgl.h"
#include "raymath.h"
#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330

View file

@ -12,7 +12,7 @@
#include "raylib.h"
#define RNET_IMPLEMENTATION
#include "rnet.h"
#include "extras/rnet.h"
float elapsed = 0.0f;
float delay = 1.0f;

View file

@ -12,7 +12,7 @@
#include "raylib.h"
#define RNET_IMPLEMENTATION
#include "rnet.h"
#include "extras/rnet.h"
int main(void)
{

View file

@ -12,7 +12,7 @@
#include "raylib.h"
#define RNET_IMPLEMENTATION
#include "rnet.h"
#include "extras/rnet.h"
int main(void)
{

View file

@ -12,7 +12,7 @@
#include "raylib.h"
#define RNET_IMPLEMENTATION
#include "rnet.h"
#include "extras/rnet.h"
int main(void)
{

View file

@ -12,7 +12,7 @@
#include "raylib.h"
#define RNET_IMPLEMENTATION
#include "rnet.h"
#include "extras/rnet.h"
#include <assert.h>

View file

@ -12,7 +12,7 @@
#include "raylib.h"
#define RNET_IMPLEMENTATION
#include "rnet.h"
#include "extras/rnet.h"
int main(void)
{

View file

@ -12,7 +12,7 @@
#include "raylib.h"
#define RNET_IMPLEMENTATION
#include "rnet.h"
#include "extras/rnet.h"
int main(void)
{

View file

@ -49,9 +49,10 @@
********************************************************************************************/
#define RLGL_IMPLEMENTATION
#define RLGL_STANDALONE
#define RLGL_SUPPORT_TRACELOG
#include "rlgl.h" // OpenGL 1.1 immediate-mode style coding
#include "rlgl.h" // OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
#define RAYMATH_STATIC_INLINE
#include "raymath.h" // Vector2, Vector3, Quaternion and Matrix functionality
#if defined(__EMSCRIPTEN__)
#define GLFW_INCLUDE_ES2
@ -65,6 +66,9 @@
#define RAYWHITE (Color){ 245, 245, 245, 255 } // My own White (raylib logo)
#define DARKGRAY (Color){ 80, 80, 80, 255 } // Dark Gray
//----------------------------------------------------------------------------------
// Structures Definition
//----------------------------------------------------------------------------------
// Color, 4 components, R8G8B8A8 (32bit)
typedef struct Color {
unsigned char r; // Color red value
@ -94,6 +98,12 @@ static void DrawCube(Vector3 position, float width, float height, float length,
static void DrawCubeWires(Vector3 position, float width, float height, float length, Color color);
static void DrawRectangleV(Vector2 position, Vector2 size, Color color);
// NOTE: We used raymath to get this functionality but it can be implemented here
//static Matrix MatrixIdentity(void);
//static Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far);
//static Matrix MatrixPerspective(double fovy, double aspect, double near, double far);
//static Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up);
//----------------------------------------------------------------------------------
// Main Entry point
//----------------------------------------------------------------------------------

View file

@ -77,7 +77,7 @@ int main(void)
// Try reloading updated shader
Shader updatedShader = LoadShader(0, TextFormat(fragShaderFileName, GLSL_VERSION));
if (updatedShader.id != rlGetShaderDefault().id) // It was correctly loaded
if (updatedShader.id != rlGetShaderIdDefault()) // It was correctly loaded
{
UnloadShader(shader);
shader = updatedShader;