Fixes to webgl/opengl es 3.0 for compatibility with webgl2.0, still does not work though

This commit is contained in:
Juan Linietsky 2017-02-22 19:14:21 -03:00
parent 2c88f4d4b5
commit ffcd954211
11 changed files with 58 additions and 33 deletions

View file

@ -27,7 +27,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "audio_server_javascript.h"
#if 0
#include "emscripten.h"
AudioMixer *AudioServerJavascript::get_mixer() {
@ -847,3 +847,4 @@ AudioServerJavascript::AudioServerJavascript() {
stream_volume_scale=1.0;
}
#endif

View file

@ -28,7 +28,7 @@
/*************************************************************************/
#ifndef AUDIO_SERVER_JAVASCRIPT_H
#define AUDIO_SERVER_JAVASCRIPT_H
#if 0
#include "servers/audio_server.h"
class AudioServerJavascript : public AudioServer {
@ -223,3 +223,4 @@ public:
};
#endif // AUDIO_SERVER_JAVASCRIPT_H
#endif

View file

@ -86,7 +86,6 @@ def configure(env):
env.Append(CPPFLAGS=["-fno-exceptions", '-DNO_SAFE_CAST', '-fno-rtti'])
env.Append(CPPFLAGS=['-DJAVASCRIPT_ENABLED', '-DUNIX_ENABLED', '-DPTHREAD_NO_RENAME', '-DNO_FCNTL', '-DMPC_FIXED_POINT', '-DTYPED_METHOD_BIND', '-DNO_THREADS'])
env.Append(CPPFLAGS=['-DGLES3_ENABLED'])
env.Append(CPPFLAGS=['-DGLES_NO_CLIENT_ARRAYS'])
if env['wasm'] == 'yes':
env.Append(LINKFLAGS=['-s', 'BINARYEN=1'])

View file

@ -151,7 +151,7 @@ int main(int argc, char *argv[]) {
/* Initialize the window */
printf("let it go!\n");
printf("let it go dude!\n");
glutInit(&argc, argv);
os = new OS_JavaScript(_gfx_init,NULL,NULL);
#if 0

View file

@ -282,6 +282,8 @@ void OS_JavaScript::initialize(const VideoMode& p_desired,int p_video_driver,int
javascript_eval = memnew(JavaScript);
GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("JavaScript", javascript_eval));
#endif
visual_server->init();
}
void OS_JavaScript::set_main_loop( MainLoop * p_main_loop ) {