Android support, attempt-1 #8
No files matched your search
@@ -1,34 +0,0 @@
|
|||||||
#include "raybri.h"
|
|
||||||
// Const must be before Aux due to Aux referencing constants of Const
|
|
||||||
#define RAYBRI_CONST_IMPLEMENTATION
|
|
||||||
#include "raybriConst.h"
|
|
||||||
#define RAYBRI_AUX_IMPLEMENTATION
|
|
||||||
#include "raybriAux.h"
|
|
||||||
#include "rlgl.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
void raybriInit(void) {
|
|
||||||
//SetTraceLogLevel(LOG_WARNING);
|
|
||||||
|
|
||||||
// Load OpenGL extensions
|
|
||||||
rlLoadExtensions((void *)raybriGLLoader);
|
|
||||||
// Initialize raylib graphics layer with a placeholder 1x1 framebuffer size
|
|
||||||
// Graphics layer includes default texture, shader, render batch and OpenGL state
|
|
||||||
rlglInit(1, 1);
|
|
||||||
// Background is painted in blue
|
|
||||||
rlClearColor(0, 0, 255, 255);
|
|
||||||
}
|
|
||||||
|
|
||||||
void raybriRender(int width, int height) {
|
|
||||||
// Set the drawing area to the current pixel size
|
|
||||||
rlViewport(0, 0, width, height);
|
|
||||||
// Clear color and depth buffers for the next frame
|
|
||||||
rlClearScreenBuffers();
|
|
||||||
// Draw any queued geometry
|
|
||||||
rlDrawRenderBatchActive();
|
|
||||||
}
|
|
||||||
|
|
||||||
void raybriShutdown(void) {
|
|
||||||
// Release rlgl buffers, shaders and textures
|
|
||||||
rlglClose();
|
|
||||||
}
|
|
||||||
@@ -10,8 +10,8 @@ void *raybriGLLoader(const char *name);
|
|||||||
#if defined(RAYBRI_AUX_IMPLEMENTATION)
|
#if defined(RAYBRI_AUX_IMPLEMENTATION)
|
||||||
|
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <stddef.h>
|
|
||||||
#include "raybriConst.h"
|
#include "raybriConst.h"
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
// raylib is built as a static/dynamic library with GLFW baked in, but we never
|
// raylib is built as a static/dynamic library with GLFW baked in, but we never
|
||||||
// call InitWindow(). Instead we render into an OpenGL context owned by the
|
// call InitWindow(). Instead we render into an OpenGL context owned by the
|
||||||
|
|||||||
File renamed without changes.
@@ -16,6 +16,9 @@ func renderInit(_ vm: RenderVM) {
|
|||||||
var swapInterval: Int32 = 1
|
var swapInterval: Int32 = 1
|
||||||
vm.glView.openGLContext?.setValues(&swapInterval, for: .swapInterval)
|
vm.glView.openGLContext?.setValues(&swapInterval, for: .swapInterval)
|
||||||
|
|
||||||
|
// Load OpenGL extensions
|
||||||
|
rlLoadExtensions((void *)raybriGLLoader);
|
||||||
|
|
||||||
raybriInit()
|
raybriInit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
#define EGL_IMPLEMENTATION
|
#define EGL_IMPLEMENTATION
|
||||||
#include "egl.h"
|
#include "egl.h"
|
||||||
|
|
||||||
|
#define RAYBRI_CONST_IMPLEMENTATION
|
||||||
|
#include "raybriConst.h"
|
||||||
|
|
||||||
#define RAYBRI_IMPLEMENTATION
|
#define RAYBRI_IMPLEMENTATION
|
||||||
#include "raybri.h"
|
#include "raybri.h"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
../../../../components/raybri/raybriConst.h
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
#define RAYBRI_CONST_IMPLEMENTATION
|
||||||
|
#include "raybriConst.h"
|
||||||
|
|
||||||
|
#define RAYBRI_AUX_IMPLEMENTATION
|
||||||
|
#include "raybriAux.h"
|
||||||
|
|
||||||
|
#define RAYBRI_IMPLEMENTATION
|
||||||
|
#include "raybri.h"
|
||||||
|
|
||||||
|
#define RLGL_IMPLEMENTATION
|
||||||
|
#include "rlgl.h"
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../../components/raybri/mac/raybri.c
|
|
||||||
@@ -1 +1 @@
|
|||||||
../../../../components/raybri/mac/raybriConst.h
|
../../../../components/raybri/raybriConst.h
|
||||||
Reference in new issue
Block a user