[split] Fix compilation for web (and desktop) (#3329)
* Fix compilation for web
* Remove EM_ASM_INT from core_input_gestures_web example
* Fix raymath undefined symbols for desktop and web
* Remove raylib_opengl_interop from examples Makefile
* Revert previous commit (8651c78
)
* Fix TraceLog for web and desktop
This commit is contained in:
parent
1ded340cf1
commit
7840e75a0b
3 changed files with 15 additions and 21 deletions
|
@ -308,14 +308,6 @@ int main(void)
|
|||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
#if defined( PLATFORM_WEB )
|
||||
// Using Emscripten EM_ASM_INT macro, get the page canvas width
|
||||
const int canvasWidth = EM_ASM_INT( return document.getElementById('canvas').getBoundingClientRect().width; );
|
||||
|
||||
if (canvasWidth > 400) screenWidth = canvasWidth;
|
||||
else screenWidth = 400; // Set a minimum width for the screen
|
||||
#endif
|
||||
|
||||
InitWindow(screenWidth, screenHeight, "raylib [core] example - input gestures web");
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -109,7 +109,6 @@
|
|||
#define RLGL_IMPLEMENTATION
|
||||
#include "rlgl.h" // OpenGL abstraction layer to OpenGL 1.1, 3.3+ or ES2
|
||||
|
||||
#define RAYMATH_IMPLEMENTATION // Define external out-of-line implementation
|
||||
#include "raymath.h" // Vector3, Quaternion and Matrix functionality
|
||||
|
||||
#if defined(SUPPORT_GESTURES_SYSTEM)
|
||||
|
|
|
@ -7,9 +7,10 @@
|
|||
#include <time.h> // Required for: time() [Used in InitTimer()]
|
||||
#include <math.h> // Required for: tan() [Used in BeginMode3D()], atan2f() [Used in LoadVrStereoConfig()]
|
||||
|
||||
#define SUPPORT_TRACELOG
|
||||
#include "utils.h" // Required for: TRACELOG() macros
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
||||
#define GLFW_INCLUDE_NONE // Disable the standard OpenGL header inclusion on GLFW3
|
||||
// NOTE: Already provided by rlgl implementation (on glad.h)
|
||||
#include "GLFW/glfw3.h" // GLFW3 library: Windows, OpenGL context and Input management
|
||||
|
@ -27,6 +28,8 @@
|
|||
|
||||
#include "raylib.h"
|
||||
#include "rlgl.h"
|
||||
|
||||
#define RAYMATH_IMPLEMENTATION
|
||||
#include "raymath.h"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue