add missing GL dependency for GLFW #3530
This commit is contained in:
Родитель
3cf4e7e4f6
Коммит
5d970d5a49
|
@ -32,7 +32,7 @@
|
|||
******************************************************************************/
|
||||
|
||||
var LibraryGLFW = {
|
||||
$GLFW__deps: ['emscripten_get_now'],
|
||||
$GLFW__deps: ['emscripten_get_now', '$GL'],
|
||||
$GLFW: {
|
||||
|
||||
Window: function(id, width, height, title, monitor, share) {
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<emscripten/emscripten.h>
|
||||
#define GLFW_INCLUDE_ES2
|
||||
#include<GL/glfw.h>
|
||||
|
||||
int main() {
|
||||
printf("main function started\n");
|
||||
if (glfwInit() != GL_TRUE) {
|
||||
printf("glfwInit() failed\n");
|
||||
glfwTerminate();
|
||||
} else {
|
||||
printf("glfwInit() success\n");
|
||||
if (glfwOpenWindow(640, 480, 8, 8, 8, 8, 16, 0, GLFW_WINDOW) != GL_TRUE){
|
||||
printf("glfwOpenWindow() failed\n");
|
||||
glfwTerminate();
|
||||
} else {
|
||||
printf("glfwOpenWindow() success\n");
|
||||
}
|
||||
}
|
||||
#ifdef REPORT_RESULT
|
||||
int result = 1;
|
||||
REPORT_RESULT();
|
||||
#endif
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
@ -1110,6 +1110,10 @@ keydown(100);keyup(100); // trigger the end
|
|||
self.btest('glfw.c', '1', args=['-s', 'LEGACY_GL_EMULATION=1'])
|
||||
self.btest('glfw.c', '1', args=['-s', 'LEGACY_GL_EMULATION=1', '-s', 'USE_GLFW=2'])
|
||||
|
||||
def test_glfw_minimal(self):
|
||||
self.btest('glfw_minimal.c', '1', args=[])
|
||||
self.btest('glfw_minimal.c', '1', args=['-s', 'USE_GLFW=2'])
|
||||
|
||||
def test_egl(self):
|
||||
open(os.path.join(self.get_dir(), 'test_egl.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'test_egl.c')).read()))
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче