mirror of https://github.com/bjornbytes/lovr.git
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
|
||||
|
||||
// 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 {
|
||||
FORMAT_RGB,
|
||||
FORMAT_RGBA,
|
||||
|
|
|
@ -94,7 +94,9 @@ void lovrGraphicsCreateWindow(int w, int h, bool fullscreen, int msaa, const cha
|
|||
glfwSetWindowCloseCallback(state.window, onCloseWindow);
|
||||
}
|
||||
|
||||
#ifndef EMSCRIPTEN
|
||||
glfwSwapInterval(0);
|
||||
#endif
|
||||
glfwGetFramebufferSize(state.window, &state.width, &state.height);
|
||||
lovrGpuInit(state.gammaCorrect, glfwGetProcAddress);
|
||||
VertexFormat format;
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#if EMSCRIPTEN
|
||||
#include <GLES3/gl3.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
#else
|
||||
#include "lib/glad/glad.h"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue