Using libraries with emscripten

I just started using Emscripten and would like to start using GLFW and other libraries. I completely lost how to create, link and use other libraries with Emscripten.

I tried following the instructions on the Emscripten website, but they did not help me. http://kripken.imtqy.com/emscripten-site/docs/compiling/Building-Projects.html#using-libraries

Is there a place with detailed instructions on how to use libraries with Emscripten? Or specifically GLFW?

+4
source share
1 answer

Emscripten provides very few libraries. These libraries are minimal to get some OperationalSystem functionality for emscripten C ++ code (audio, input, video)

  • libc : standard library for C
  • libC ++ : standard library for C ++
  • SDL : SimpleDirectmediaLayer (SDL 1.X - open source cross-platform project)
  • GLES2 : OpenGL ES 2 API
  • GLFW : GLFW 2.X

For example, the standard way to enable OpenGLES2 in Emscripten is:

#include <GLES2/gl2.h>

For now enable GLFW:

#include <GL/glfw.h>

, , GLFW, , Emscripten , ( Emscripten Emscripten).

emscripten, ( ) , . ( , javascript funciontalities C)

, Emscripten, , : , Boost UBLAS.

GLFW , , :

-lglfw

OpenGL Emscripten :

https://github.com/QafooLabs/emscripten-opengl-example

, make

+7

Source: https://habr.com/ru/post/1569135/


All Articles