mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-03 04:53:35 +00:00
More emscripten stuff;
SwapInterval was removed to ensure RAF timing is used.
This commit is contained in:
parent
7222d1fa26
commit
017066d45e
|
@ -5,14 +5,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// WEBGL_compressed_texture_s3tc_srgb isn't ratified yet...
|
|
||||||
#ifdef EMSCRIPTEN
|
|
||||||
#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C
|
|
||||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D
|
|
||||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E
|
|
||||||
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FORMAT_RGB,
|
FORMAT_RGB,
|
||||||
FORMAT_RGBA,
|
FORMAT_RGBA,
|
||||||
|
|
|
@ -94,7 +94,9 @@ void lovrGraphicsCreateWindow(int w, int h, bool fullscreen, int msaa, const cha
|
||||||
glfwSetWindowCloseCallback(state.window, onCloseWindow);
|
glfwSetWindowCloseCallback(state.window, onCloseWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef EMSCRIPTEN
|
||||||
glfwSwapInterval(0);
|
glfwSwapInterval(0);
|
||||||
|
#endif
|
||||||
glfwGetFramebufferSize(state.window, &state.width, &state.height);
|
glfwGetFramebufferSize(state.window, &state.width, &state.height);
|
||||||
lovrGpuInit(state.gammaCorrect, glfwGetProcAddress);
|
lovrGpuInit(state.gammaCorrect, glfwGetProcAddress);
|
||||||
VertexFormat format;
|
VertexFormat format;
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
#if EMSCRIPTEN
|
#if EMSCRIPTEN
|
||||||
#include <GLES3/gl3.h>
|
#include <GLES3/gl3.h>
|
||||||
#include <GLES2/gl2ext.h>
|
#include <GLES2/gl2ext.h>
|
||||||
|
#include <GL/gl.h>
|
||||||
|
#include <GL/glext.h>
|
||||||
#else
|
#else
|
||||||
#include "lib/glad/glad.h"
|
#include "lib/glad/glad.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue