From 34fab09274890849275afd987e04232070e65394 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 13 Jan 2019 23:56:59 +0100 Subject: [PATCH] Remove NaCl support. Google is deprecating it. --- .gitignore | 2 - build/Makefile.am | 2 +- build/autotools/m4/lol-conf.m4 | 13 - build/build-nacl32 | 10 - build/build-nacl64 | 10 - build/lol-build | 10 - build/run-bitten.sh | 15 - doc/doxygen.cfg.in | 1 - doc/samples/Makefile.am | 8 - doc/samples/javascript/empty.html | 10 - doc/samples/javascript/naclloading.js | 105 ----- doc/samples/javascript/progressstatus.js | 118 ------ doc/samples/javascript/typedictionnary.js | 319 --------------- doc/samples/javascript/utils.js | 131 ------ doc/samples/meshviewer/meshviewer.cpp | 2 +- doc/samples/meshviewer/meshviewer.em.html | 190 --------- doc/samples/meshviewer/meshviewer.index.html | 396 ------------------- doc/samples/meshviewer/meshviewer.nacl.html | 14 - doc/samples/meshviewer/meshviewer.vcxproj | 40 -- doc/samples/nacl_phystest.cpp | 126 ------ doc/samples/nacl_phystest.h | 64 --- doc/samples/nacl_phystest.vcxproj | 72 ---- doc/samples/nacl_phystest.vcxproj.filters | 20 - doc/tutorial/11_fractal.cpp | 17 - src/Makefile.am | 10 - src/application/application.cpp | 12 +- src/gpu/texture.cpp | 2 +- src/lol-core.vcxproj | 64 --- src/lol-core.vcxproj.filter | 29 +- src/lol/base/features.h | 6 - src/lol/engine-internal.h | 6 +- src/lol/engine.h | 6 +- src/lol/math/bigint.h | 3 - src/lol/math/functions.h | 4 +- src/lol/math/real.h | 3 - src/platform/nacl/nacl-app.cpp | 70 ---- src/platform/nacl/nacl-app.h | 39 -- src/platform/nacl/nacl-instance.cpp | 277 ------------- src/platform/nacl/nacl-instance.h | 106 ----- src/platform/nacl/nacl-module.cpp | 57 --- src/platform/nacl/opengl_context.cpp | 87 ---- src/platform/nacl/opengl_context.h | 92 ----- src/platform/nacl/opengl_context_ptrs.h | 19 - 43 files changed, 14 insertions(+), 2573 deletions(-) delete mode 100755 build/build-nacl32 delete mode 100755 build/build-nacl64 delete mode 100644 doc/samples/javascript/empty.html delete mode 100644 doc/samples/javascript/naclloading.js delete mode 100644 doc/samples/javascript/progressstatus.js delete mode 100644 doc/samples/javascript/typedictionnary.js delete mode 100644 doc/samples/javascript/utils.js delete mode 100644 doc/samples/meshviewer/meshviewer.em.html delete mode 100644 doc/samples/meshviewer/meshviewer.index.html delete mode 100644 doc/samples/meshviewer/meshviewer.nacl.html delete mode 100644 doc/samples/nacl_phystest.cpp delete mode 100644 doc/samples/nacl_phystest.h delete mode 100644 doc/samples/nacl_phystest.vcxproj delete mode 100644 doc/samples/nacl_phystest.vcxproj.filters delete mode 100644 src/platform/nacl/nacl-app.cpp delete mode 100644 src/platform/nacl/nacl-app.h delete mode 100644 src/platform/nacl/nacl-instance.cpp delete mode 100644 src/platform/nacl/nacl-instance.h delete mode 100644 src/platform/nacl/nacl-module.cpp delete mode 100644 src/platform/nacl/opengl_context.cpp delete mode 100644 src/platform/nacl/opengl_context.h delete mode 100644 src/platform/nacl/opengl_context_ptrs.h diff --git a/.gitignore b/.gitignore index 48bdb823..7b35e34d 100644 --- a/.gitignore +++ b/.gitignore @@ -82,11 +82,9 @@ doc/samples/benchsuite doc/samples/bluenoise doc/samples/btphystest doc/samples/meshviewer/meshviewer -doc/samples/nacl_phystest doc/samples/sandbox/sample doc/samples/math/pi doc/samples/math/poly -doc/samples/nacl_phystest doc/samples/simplex doc/tutorial/01_triangle doc/tutorial/02_cube diff --git a/build/Makefile.am b/build/Makefile.am index e5840ff6..fd9f021f 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -6,7 +6,7 @@ include $(top_srcdir)/build/autotools/common.am EXTRA_DIST += lol-build \ check-source.sh run-bitten.sh \ build-linux build-mingw build-mingw64 \ - build-nacl32 build-nacl64 build-android build-html \ + build-android build-html \ \ msbuild/lolfx.targets \ msbuild/lolfx.xml \ diff --git a/build/autotools/m4/lol-conf.m4 b/build/autotools/m4/lol-conf.m4 index bf23406e..3b99b92d 100644 --- a/build/autotools/m4/lol-conf.m4 +++ b/build/autotools/m4/lol-conf.m4 @@ -90,19 +90,6 @@ fi AM_CONDITIONAL(LOL_USE_BULLET, test "${ac_cv_my_have_bullet}" = "yes") -dnl Use NativeClient? -ac_cv_my_have_nacl="no" -AC_LANG_PUSH(C++) -AC_CHECK_HEADERS(ppapi/cpp/instance.h, - [ac_cv_my_have_nacl="yes" - LOL_LIBS="${LOL_LIBS} -lnosys" - if test "${ac_cv_my_build_mode}" = "xrelease"; then - LOL_TRY_CXXFLAGS(-s, [AM_CXXFLAGS="${AM_CXXFLAGS} -s"]) - fi]) -AC_LANG_POP(C++) -AM_CONDITIONAL(LOL_USE_NACL, test "${ac_cv_my_have_nacl}" != "no") - - dnl Use Android? FIXME: super hacks! ac_cv_my_have_android="no" AC_CHECK_LIB(log, __android_log_vprint, diff --git a/build/build-nacl32 b/build/build-nacl32 deleted file mode 100755 index 2cb0c420..00000000 --- a/build/build-nacl32 +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# This can't hurt -make distclean - -set -e -./build/lol-build "$@" bootstrap nacl-i386 -./build/lol-build "$@" configure nacl-i386 -./build/lol-build "$@" build nacl-i386 - diff --git a/build/build-nacl64 b/build/build-nacl64 deleted file mode 100755 index 850313fe..00000000 --- a/build/build-nacl64 +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# This can't hurt -make distclean - -set -e -./build/lol-build "$@" bootstrap nacl-amd64 -./build/lol-build "$@" configure nacl-amd64 -./build/lol-build "$@" build nacl-amd64 - diff --git a/build/lol-build b/build/lol-build index 4e29fba6..2878b792 100755 --- a/build/lol-build +++ b/build/lol-build @@ -20,8 +20,6 @@ # And is one of: # - linux-i386 # - linux-amd64 -# - nacl-i386 -# - nacl-amd64 # - ios-arm # - osx-amd64 # - android-arm @@ -238,12 +236,6 @@ configure() raspi-arm) do_configure --host=arm-bcm2708hardfp-linux-gnueabi CPPFLAGS="-I$RASPI_SDK_ROOT/firmware/opt/vc/include -I$RASPI_SDK_ROOT/firmware/opt/vc/include/interface/vmcs_host/linux -I$RASPI_SDK_ROOT/chroot/usr/include -I$RASPI_SDK_ROOT/chroot/usr/include/arm-linux-gnueabihf" LDFLAGS="-L$RASPI_SDK_ROOT/firmware/opt/vc/lib -L$RASPI_SDK_ROOT/chroot/lib/arm-linux-gnueabihf -Wl,-rpath-link -Wl,$RASPI_SDK_ROOT/chroot/lib/arm-linux-gnueabihf -L$RASPI_SDK_ROOT/chroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link -Wl,$RASPI_SDK_ROOT/chroot/usr/lib/arm-linux-gnueabihf -Wl,--unresolved-symbols=ignore-in-shared-libs" ;; - nacl-i386) - do_configure CXX=i686-nacl-g++ CC=i686-nacl-gcc ac_cv_exeext=.32.nexe --host=i386 CPPFLAGS="-I$NACL_SDK_ROOT/include" LOL_LIBS="-lppapi -lppapi_gles2 -lppapi_cpp -u _ZN2pp12CreateModuleEv" - ;; - nacl-amd64) - do_configure CXX=x86_64-nacl-g++ CC=x86_64-nacl-gcc ac_cv_exeext=.64.nexe --host=x86_64 CPPFLAGS="-I$NACL_SDK_ROOT/include" LOL_LIBS="-lppapi -lppapi_gles2 -lppapi_cpp -u _ZN2pp12CreateModuleEv" - ;; osx-amd64) # HACK: use clang++ because of a memory leak in llvm-g++. do_configure CXX=clang++ CC=clang @@ -312,8 +304,6 @@ check() ;; raspi-arm) ;; - nacl-*) - ;; web-*) ;; win*-i386) diff --git a/build/run-bitten.sh b/build/run-bitten.sh index 24de5862..92c7c9d7 100755 --- a/build/run-bitten.sh +++ b/build/run-bitten.sh @@ -188,21 +188,6 @@ if [ "$family" != "windows" ]; then fi append "" -# -# Google NaCl SDK -# - -append "[pepper]" -if [ "$family" != "windows" ]; then - if [ -f "$NACL_SDK_ROOT/README" ]; then - pepper_version=$(sed -ne 's/Version: //p' "$NACL_SDK_ROOT/README") - if [ "x$pepper_version" != "x" ]; then - append "version = $pepper_version" - fi - fi -fi -append "" - # # Raspberry Pi cross-compiler # diff --git a/doc/doxygen.cfg.in b/doc/doxygen.cfg.in index 766877e4..ce743f0a 100644 --- a/doc/doxygen.cfg.in +++ b/doc/doxygen.cfg.in @@ -799,7 +799,6 @@ INPUT = .. \ ../src/platform \ ../src/platform/android \ ../src/platform/d3d9 \ - ../src/platform/nacl \ ../src/platform/sdl \ ../src/platform/xbox \ ../src/thread diff --git a/doc/samples/Makefile.am b/doc/samples/Makefile.am index ea99266d..6f4f71ad 100644 --- a/doc/samples/Makefile.am +++ b/doc/samples/Makefile.am @@ -9,7 +9,6 @@ bench: benchsuite$(EXEEXT) if BUILD_SAMPLES noinst_PROGRAMS = bluenoise benchsuite simplex if LOL_USE_GL -noinst_PROGRAMS += nacl_phystest if LOL_USE_BULLET noinst_PROGRAMS += btphystest endif @@ -44,13 +43,6 @@ btphystest_LDFLAGS += \ -s TOTAL_MEMORY=$(shell expr 32 '*' 1024 '*' 1024) endif -nacl_phystest_SOURCES = \ - nacl_phystest.cpp nacl_phystest.h -nacl_phystest_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/3rdparty/bullet3/src \ - -DHAVE_PHYS_USE_BULLET -nacl_phystest_DEPENDENCIES = @LOL_DEPS@ -nacl_phystest_LDFLAGS = $(AM_LDFLAGS) - simplex_SOURCES = simplex.cpp simplex_CPPFLAGS = $(AM_CPPFLAGS) simplex_DEPENDENCIES = @LOL_DEPS@ diff --git a/doc/samples/javascript/empty.html b/doc/samples/javascript/empty.html deleted file mode 100644 index d90c3ef1..00000000 --- a/doc/samples/javascript/empty.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/doc/samples/javascript/naclloading.js b/doc/samples/javascript/naclloading.js deleted file mode 100644 index 674eb2e3..00000000 --- a/doc/samples/javascript/naclloading.js +++ /dev/null @@ -1,105 +0,0 @@ -//------------------------------------------------------------------------- -// MODULE INIT FUNCTIONS -//------------------------------------------------------------------------- -function RegisterListener() -{ - //Register all the correct functions to the listener - var div_listener = GetiFrameDivEmbed(); - if (div_listener) - { - div_listener.addEventListener('loadstart', NaClModuleStartedLoad, true); - div_listener.addEventListener('load', NaClModuleDidLoad, true); - div_listener.addEventListener('error', NaClModuleError, true); - div_listener.addEventListener('progress', NaClModuleLoadUpdate, true); - div_listener.addEventListener('message', NaClModuleSentMessage, true); - div_listener.addEventListener('crash', NaClModuleCrash, true); - window.setTimeout("UpdateTextStatus(0.1)", 100); - } - else if (IsUsingNaCl()) - window.setTimeout("RegisterListener()", 200); -} - -function NaClInitModuleVar() -{ - InitModuleVar(); - if (g_embed_module) - g_embed_module['SendMessage'] = function(message) { g_embed_module.postMessage(message); } -} - -//------------------------------------------------------------------------- -// MODULE LOADING FUNCTIONS -//------------------------------------------------------------------------- -//Indicate page has been loaded. -function NaClLoadingInit() -{ - HideProgressStatus(false); - //Page did load before NaCl module - if (!g_embed_module) - AddTextStatus('Please wait for module loading'); - RegisterListener(); -} - -//Module starts load -function NaClModuleStartedLoad() -{ - AddTextStatus('Module Started Loading'); - NaClInitModuleVar(); -} - -//Module progress event -function NaClModuleLoadUpdate(event) -{ - if (event.lengthComputable) - UpdateProgressBarValue('Please wait, loading', event.loaded, event.total); - else - UpdateProgressBarValue('Please wait, calculating load balance ...'); -} - -//Indicate module load success. -function NaClModuleDidLoad() -{ - if (!g_embed_module) - NaClInitModuleVar(); - - //Hide the progress div - AddTextStatus('Module is live, thank you for your patience.'); - window.setTimeout('HideProgressStatus(true)', GetMaxStatusTime(0.5) * 1000); - - ModuleIsLive(); -} - -//Module did crash -function NaClModuleCrash(event) -{ - NaClRestartModule(); - AddTextStatus("Module has crashed ! Restarting ..."); -} - -//Module had an error -function NaClModuleError(event) -{ - NaClRestartModule(); - AddTextStatus("Module Load/start Error ! Restarting ..."); -} - -//Used to restart module on crash/error/load fail .... -function NaClRestartModule() -{ - var id_frame_embed = GetFrameData(); - if (id_frame_embed) - { - HideProgressStatus(false); - window.setTimeout('GetFrameData().contentDocument.location.reload(true)', 1000); - } -} - -//------------------------------------------------------------------------- -// MODULE COMMUNICATION FUNCTIONS -//------------------------------------------------------------------------- - -//Handle message from the NaCl module -function NaClModuleSentMessage(message) -{ - ModuleSentMessage(message); -} - diff --git a/doc/samples/javascript/progressstatus.js b/doc/samples/javascript/progressstatus.js deleted file mode 100644 index bec032ba..00000000 --- a/doc/samples/javascript/progressstatus.js +++ /dev/null @@ -1,118 +0,0 @@ -g_var_progress_bar = -1; -g_status_text = [null]; -g_status_timer = [-1.0]; - -//------------------------------------------------------------------------- -// PROGRESS BAR STATUS FUNCTIONS -//------------------------------------------------------------------------- - -//Update the actual progress bar -function UpdateProgressBarValue(new_status, new_value, new_max) -{ - var progress_bar = GetProgressBar(); - if (progress_bar) - { - if (new_value != undefined && new_max != undefined) - { - if (progress_bar.value < 0) - g_var_progress_bar = -1; - var loading_text = new_status + '[' + (Math.min(1.0, new_value / new_max) * 100.0).toFixed(0) + '%]'; - //update the progress status - progress_bar.max = new_max; - progress_bar.value = new_value; - g_var_progress_bar = AddTextStatus(loading_text, g_var_progress_bar); - } - //Load length is not usable - else - { - if (progress_bar.value > 0) - g_var_progress_bar = -1; - progress_bar.value = -1; - g_var_progress_bar = AddTextStatus(new_status, g_var_progress_bar); - } - //Force Status text update for coherency - UpdateTextStatus(0.0); - } -} - -//Add text status to the stack -function GetMaxStatusTime(min_value) -{ - var higher_time = (min_value) ? (min_value) : (0.0); - for (var i = 0; i < g_status_timer.length; i++) - if (g_status_timer[i]) - higher_time = Math.max(higher_time, g_status_timer[i]); -} - -//Update progress bar status -function UpdateTextStatus(seconds) -{ - var div_progress_status = GetDivProgressStatus(); - if (div_progress_status) - { - div_progress_status.innerHTML = ''; - for (var i = 0; i < g_status_text.length; i++) - { - if (g_status_timer[i] == undefined || g_status_timer[i] < 0.0) - { - g_status_timer[i] = -1.0; - g_status_text[i] = undefined; - } - else - { - g_status_timer[i] -= seconds; - div_progress_status.innerHTML += g_status_text[i]; - //div_progress_status.innerHTML += '[' + g_status_timer[i].toFixed(2) + ']'; - if (i < g_status_text.length - 1) - div_progress_status.innerHTML += '
'; - } - } - window.setTimeout("UpdateTextStatus(0.1)", 100); - } -} - -//Add text status to the stack -function AddTextStatus(message, message_id) -{ - var msg_timer = 2.0; - if (message_id == undefined || message_id < 0) - { - g_status_text[g_status_text.length] = message; - g_status_timer[g_status_timer.length] = GetMaxStatusTime(msg_timer) + 0.5; - return g_status_timer.length - 1; - } - else - { - g_status_text[message_id] = message; - g_status_timer[message_id] = msg_timer; - return message_id; - } -} - -//Hide Progress Status and empty status texts -function HideProgressStatus(should_hide) -{ - var progress_bar = GetProgressBar(); - var div_progress = GetDivProgress(); - if (div_progress && progress_bar) - { - if (should_hide == true) - { - div_progress.style.visibility = "hidden"; - div_progress.style.zIndex = "-999"; - g_status_text.splice(0, g_status_text.length); - g_status_timer.splice(0, g_status_timer.length); - progress_bar.value = -1; - UpdateTextStatus(1.0); - } - else - { - div_progress.style.visibility = "visible"; - div_progress.style.zIndex = "999"; - progress_bar.value = -1; - AddTextStatus('Please wait for module loading'); - UpdateTextStatus(1.0); - } - } -} - diff --git a/doc/samples/javascript/typedictionnary.js b/doc/samples/javascript/typedictionnary.js deleted file mode 100644 index af7e4550..00000000 --- a/doc/samples/javascript/typedictionnary.js +++ /dev/null @@ -1,319 +0,0 @@ -function TypeDictionnary(m_name) -{ - this.m_name = m_name; - this.m_alphabet = ''; - this.m_cmds = new Array(); - this.m_vars = new Array(); -} - -//----------------------------------------------------------------------------- -//Command Var object -//----------------------------------------------------------------------------- -function CmdVarObj() { } -function CmdVar(m_type, m_syntax) -{ - var current_dict = GetCmdDictionnary(); - - new_obj = new CmdVarObj(); - new_obj.m_type = m_type; - new_obj.m_syntax = m_syntax; - - current_dict.m_vars[current_dict.m_vars.length] = new_obj; -} - -//----------------------------------------------------------------------------- -//Command Argument object -//----------------------------------------------------------------------------- -function CmdArgObj() { } -function CmdArg(m_type, m_name, m_optional) -{ - new_obj = new CmdArgObj(); - - new_obj.m_type = m_type; - new_obj.m_name = m_name; - new_obj.m_optional = m_optional; - - return new_obj; -} - -//----------------------------------------------------------------------------- -//Command Typing object -//----------------------------------------------------------------------------- -function CmdTypeObj() { } -function CmdType(m_name, m_comment, m_arg) -{ - var current_dict = GetCmdDictionnary(); - - new_obj = new CmdTypeObj(); - new_obj.m_name = m_name; - new_obj.m_comment = m_comment; - new_obj.m_arg = m_arg; - - new_obj.CheckCommand = function(check_name) - { - if (m_name != undefined && check_name.length > 0) - { - for (var i = 0; i < m_name.length; i++) - { - if (m_name[i] != undefined) - { - var pattern = new RegExp("^[ ]*" + check_name + "[a-z]*"); - if (pattern.test(m_name[i])) - return true; - } - } - } - return false; - } - current_dict.m_cmds[current_dict.m_cmds.length] = new_obj; -} - -//----------------------------------------------------------------------------- -//Tries to find a matching command in the dictionnary based on the current cursor location in the given TextArea. -//----------------------------------------------------------------------------- -function FindMatchingCommand(src_text_area) -{ - if (src_text_area != undefined) - { - var current_dict = GetCmdDictionnary(); - var found_match = ""; - var check = true; - var cursor = Math.min(src_text_area.selectionStart, src_text_area.value.length - 1); - //Weird test to ensure we don't start searching on the next line or on the next word. - if (!src_text_area.value[cursor].match(/^[ \n]$/)) - cursor++; - cursor = Math.min(cursor, src_text_area.value.length - 1); - - var o = 0; - while (check && o < 10) - { - //Move backward to find the first letter on this line - for (; cursor > 0; cursor--) - if (src_text_area.value[cursor].match(/^[a-z\n]+$/)) - break; - - //Move backward to find the start of the command - for (; cursor > 0; cursor--) - if (!src_text_area.value[cursor - 1].match(/^[#0-9a-z]+$/)) - break; - - //If the cursor is on a "#" and the previous is a " ", we're on a color, repeat the operation - if (cursor > 0 && src_text_area.value[cursor - 1].match(/[ ]/) && - src_text_area.value[cursor].match(/[#]/)) - check = true; - else - check = false; - o++; - } - - //Move forward to find the end of the word - for (; cursor < src_text_area.value.length; cursor++) - { - if (src_text_area.value[cursor].match(/^[a-z]+$/)) - found_match += src_text_area.value[cursor]; - else - break; - } - - //Try to match the command with the dictionnary - var match_data = new Object(); - match_data.match = found_match; - match_data.match_list = new Array(); - for (cursor = 0; cursor < current_dict.m_cmds.length; cursor++) - if (current_dict.m_cmds[cursor].CheckCommand(found_match)) - match_data.match_list[match_data.match_list.length] = cursor; - - return match_data; - } -} - -//----------------------------------------------------------------------------- -//Build a TOC from all commands first letter -//----------------------------------------------------------------------------- -function BuildTOC(with_dot) -{ - var res = ''; - var current_dict = GetCmdDictionnary(); - for (var a = 'a'.charCodeAt(0); a <= 'z'.charCodeAt(0); a++) - { - var stop = false; - for (var i = 0; !stop && i < current_dict.m_cmds.length; i++) - { - for (var j = 0; j < current_dict.m_cmds[i].m_name.length; j++) - { - if (current_dict.m_cmds[i].m_name[j][0] == String.fromCharCode(a)) - { - res += String.fromCharCode(a); - stop = true; - break; - } - } - } - if (!stop && with_dot) - res += '.'; - } - return res; -} - -//----------------------------------------------------------------------------- -//Setup code lookup logic -//----------------------------------------------------------------------------- -function CmdLookup(div_cmds, div_args, div_cmnt, div_vars, text_src) -{ - var cur_dict = GetCmdDictionnary(); - if (text_src != undefined) - { - var type_list = new Array(); - var cmd_size = 8; - var found = FindMatchingCommand(text_src); - if (found.match_list.length > 0) - { - var perfect_match = false; - var best_match = 0; - var best_length = 300000; - //Find the best match to put it in first in the list - for (var i = 0; i < found.match_list.length && best_length > 0; i++) - { - var cur_match = cur_dict.m_cmds[found.match_list[i]]; - for (var j = 0; j < cur_match.m_name.length && best_length > 0; j++) - { - if (cur_match.m_name[j].length == found.match.length) - { - perfect_match = true; - best_match = i; - best_length = 0; - } - else if (cur_match.m_name[j].length < best_length && - cur_match.m_name[j].length > found.match.length) - { - best_match = i; - best_length = cur_match.m_name[j].length; - } - } - } - var tmp = found.match_list[0]; - found.match_list[0] = found.match_list[best_match]; - found.match_list[best_match] = tmp; - - div_cmds[0].innerHTML = ""; - div_cmds[1].innerHTML = ""; - div_args.innerHTML = ""; - div_cmnt.innerHTML = ""; - //Go through the found matches and show them. - for (var i = 0; i < found.match_list.length; i++) - { - var cur_match = cur_dict.m_cmds[found.match_list[i]]; - div_cmds[0].innerHTML += '['; - var max = cur_match.m_name.length; - var word = 0; - for (var j = 0; j < max; j++) - { - var mth = found.match; - var cmd = cur_match.m_name[j]; - //Matching start caracters should be bold - if (mth == cmd.slice(0, mth.length)) - { - div_cmds[word].innerHTML += ' '; - div_cmds[word].innerHTML += '' + mth + ''; - div_cmds[word].innerHTML += cmd.slice(mth.length, cmd.length); - word++; - } - } - //Complete empty command by
so commands in the two columns are on the same line - word = (word > 0)?(2):(0); - while (word-- > 0) - div_cmds[word].innerHTML += "
"; - //Go through the arguments and show them, force if we found the perfect match - if ((perfect_match || found.match_list.length < 4) && i == 0) - { - div_args.innerHTML += " > "; - if (cur_match.m_arg != undefined) - { - max = cur_match.m_arg.length; - var found_optional = false; - for (var j = 0; j < max; j++) - { - if (cur_match.m_arg[j].m_optional != undefined && found_optional == false) - { - var tab = '
'; for (var l = 0; l < 5; l++) tab += ' '; - div_args.innerHTML += tab + 'Opt: ['; - found_optional = true; - } - else if (j > 0) - div_args.innerHTML += ', '; - - //Types are bold - div_args.innerHTML += '' + cur_match.m_arg[j].m_type + ' '; - type_list[type_list.length] = cur_match.m_arg[j].m_type; - //Names are not - div_args.innerHTML += cur_match.m_arg[j].m_name; - if (cur_match.m_arg[j].m_optional != undefined) - div_args.innerHTML += ' = ' + cur_match.m_arg[j].m_optional + ''; - } - if (found_optional == true) - div_args.innerHTML += '] '; - div_args.innerHTML += ' 
'; - } - //Add the comment - if (cur_match.m_comment != undefined) - { - var tb_i = 16; var in_i = 8; - var tab = '
'; - if (cur_match.m_arg == undefined) { tb_i -= 8; in_i -= 8; } - for (var l = 0; l < in_i; l++) div_args.innerHTML += ' '; - for (var l = 0; l < tb_i; l++) tab += ' '; - div_args.innerHTML += cur_match.m_comment + ' '; - while (div_args.innerHTML.indexOf('\n') > -1) - div_args.innerHTML = div_args.innerHTML.replace('\n', tab); - } - } - } - } - else - { - div_cmds[0].innerHTML = "[ ... "; - div_cmds[1].innerHTML = ""; - div_args.innerHTML = ""; - div_cmnt.innerHTML = ""; - } - //Go through the type list and bold the used ones. - if (cur_dict.m_vars != undefined) - { - div_vars.innerHTML = ""; - var max = cur_dict.m_vars.length; - for (var j = 0; j < max; j++) - { - var cur_var = cur_dict.m_vars[j]; - div_vars.innerHTML += " > "; - var k = 0; - for (; k < type_list.length; k++) - if (cur_var.m_type == type_list[k]) - break; - - //Bold the used variables - if (k < type_list.length) - div_vars.innerHTML += "" + cur_var.m_type + ""; - else - div_vars.innerHTML += cur_var.m_type; - - if (cur_var.m_syntax != undefined) - { - var align_size = 9; - var cmd_size = cur_var.m_type.length + 3; - for (var m = 0; m < cur_var.m_syntax.length; m++) - { - for (var l = 0; l < align_size - cmd_size; l++) - div_vars.innerHTML += " "; - div_vars.innerHTML += cur_var.m_syntax[m] + "
"; - cmd_size = 0; - } - var tab = ''; - for (var l = 0; l < align_size - cmd_size; l++) - tab += " "; - while (div_vars.innerHTML.indexOf('\n') > -1) - div_vars.innerHTML = div_vars.innerHTML.replace('\n', '
' + tab); - } - } - } - } -} diff --git a/doc/samples/javascript/utils.js b/doc/samples/javascript/utils.js deleted file mode 100644 index a6cf2dd6..00000000 --- a/doc/samples/javascript/utils.js +++ /dev/null @@ -1,131 +0,0 @@ -//----------------------------------------------------------------------------- -// COOKIE MANAGEMENT - nom nom nom nom - -//----------------------------------------------------------------------------- - -function LolCookie() { } -function LolCookieDays(m_name, m_value, m_expire_days) -{ - var cookie = new LolCookie(); - - cookie.m_name = m_name; - cookie.m_value = m_value; - cookie.m_expire_date = new Date(); - cookie.m_expire_date.setDate(cookie.m_expire_date.getDate() + m_expire_days); - - return cookie; -} -function LolCookieDate(m_name, m_value, m_expire_date) -{ - var cookie = new LolCookie(); - - cookie.m_name = m_name; - cookie.m_value = m_value; - cookie.m_expire_date = m_expire_date; - - return cookie; -} - -//Set a cookie -function StoreLolCookie(cookie) -{ - GetLolCookie(cookie.m_name, true); - - var enc_value = escape(cookie.m_value) + ";"; - - //Add expire days - if (cookie.m_expire_date) - enc_value += " expires=" + cookie.m_expire_date.toUTCString() + ";"; - enc_value = cookie.m_name + "=" + enc_value; - - //Store cookies - document.cookie = enc_value; -} - -//Get a cookie -function GetLolCookie(name, remove) -{ - var cki_doc = document.cookie; - var cookie = null; - - var cki_start = cki_doc.indexOf(name + "="); - if (cki_start > -1) - { - cookie = new LolCookie(); - cookie.m_name = name; - cookie.m_expire_date = null; - - //Retrieve value - var val_start = cki_doc.indexOf("=", cki_start) + 1; - var val_end = cki_doc.indexOf(";", cki_start); - if (val_end < 0) - val_end = cki_doc.length; - cookie.m_value = unescape(cki_doc.substring(val_start, val_end)); - - if (remove) - document.cookie = name + "=; expires=0;"; - } - return cookie; -} - -//Check the existence of a cookie -function DoesLolCookieExist(name) -{ - var cki_doc = document.cookie; - if (cki_doc.indexOf(name + "=") > -1) - return true; - return false; -} - -//----------------------------------------------------------------------------- -// FILE MANAGEMENT -//----------------------------------------------------------------------------- - -//Dynamic load -function DynLoadFile(filename) -{ - var filetype = filename.match(/\.[a-zA-Z]+$/); - //if filename is a external JavaScript file - if (filetype == ".js") - { - var fileref = document.createElement('script'); - fileref.setAttribute("type","text/javascript"); - fileref.setAttribute("src", filename); - } - //if filename is an external CSS file - else if (filetype == ".css") - { - var fileref = document.createElement("link"); - fileref.setAttribute("rel", "stylesheet"); - fileref.setAttribute("type", "text/css"); - fileref.setAttribute("href", filename); - } - if (fileref) - document.getElementsByTagName("head")[0].appendChild(fileref); -} - -//Dynamic remove -function DynRemoveFile(filename) -{ - var filetype = filename.match(/\.[a-zA-Z]+$/); - var targetelement = "none"; - var targetattr = "none"; - //Determine element type to create nodelist from and corresponding attribute to test for - if (filetype==".js") - { - targetelement = "script"; - targetattr = "src"; - } - else if (filetype == ".css") - { - targetelement = "link"; - targetattr = "href"; - } - - var allsuspects = document.getElementsByTagName(targetelement); - //Search backwards within nodelist for matching elements to remove - for (var i = allsuspects.length; i >= 0; i--) - if (allsuspects[i] && - allsuspects[i].getAttribute(targetattr) && - allsuspects[i].getAttribute(targetattr).indexOf(filename) != -1) - allsuspects[i].parentNode.removeChild(allsuspects[i]); //remove element by calling parentNode.removeChild() -} diff --git a/doc/samples/meshviewer/meshviewer.cpp b/doc/samples/meshviewer/meshviewer.cpp index 31393563..24b8a343 100644 --- a/doc/samples/meshviewer/meshviewer.cpp +++ b/doc/samples/meshviewer/meshviewer.cpp @@ -29,7 +29,7 @@ using namespace lol; static int const TEXTURE_WIDTH = 256; //Basic build defines --------------------------------------------------------- -#define HAS_WEB (__native_client__ || EMSCRIPTEN) +#define HAS_WEB (EMSCRIPTEN) #define HAS_INPUT (_WIN32 && !HAS_WEB) //Basic config defines -------------------------------------------------------- diff --git a/doc/samples/meshviewer/meshviewer.em.html b/doc/samples/meshviewer/meshviewer.em.html deleted file mode 100644 index 3e632343..00000000 --- a/doc/samples/meshviewer/meshviewer.em.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - -YOUR PAGE NAME HERE - - - - - -
- -
- - -
- Resize canvas - Lock/hide mouse pointer -     - -
- - - - - - - - - - - - diff --git a/doc/samples/meshviewer/meshviewer.index.html b/doc/samples/meshviewer/meshviewer.index.html deleted file mode 100644 index 196007d3..00000000 --- a/doc/samples/meshviewer/meshviewer.index.html +++ /dev/null @@ -1,396 +0,0 @@ - - - - - - - - - - -Mesh Viewer Web Edition - - - - - - - - - - - - - - - - - - - - - - -

Mesh Viewer : Web version.

- - - - - - - - - -
- -

-

-
- -
-
  - -
....
  -
-
- -
-
-
-

- -
-
- - - - - - -
-
-
-
-
- - - - - - - - - - - - - -
-
- -
-
  -
Variable Types usage :
-
-
-
-
- - - - - - - -
-
- -
- - - diff --git a/doc/samples/meshviewer/meshviewer.nacl.html b/doc/samples/meshviewer/meshviewer.nacl.html deleted file mode 100644 index 940cadf3..00000000 --- a/doc/samples/meshviewer/meshviewer.nacl.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - -
- -
- - diff --git a/doc/samples/meshviewer/meshviewer.vcxproj b/doc/samples/meshviewer/meshviewer.vcxproj index d5b6833e..523351cb 100644 --- a/doc/samples/meshviewer/meshviewer.vcxproj +++ b/doc/samples/meshviewer/meshviewer.vcxproj @@ -56,46 +56,6 @@ true - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - - - true - true - diff --git a/doc/samples/nacl_phystest.cpp b/doc/samples/nacl_phystest.cpp deleted file mode 100644 index cff43eca..00000000 --- a/doc/samples/nacl_phystest.cpp +++ /dev/null @@ -1,126 +0,0 @@ -// -// Lol Engine — BtPhys tutorial -// -// Copyright © 2009—2015 Benjamin “Touky” Huet -// © 2012—2015 Sam Hocevar -// -// Lol Engine is free software. It comes without any warranty, to -// the extent permitted by applicable law. You can redistribute it -// and/or modify it under the terms of the Do What the Fuck You Want -// to Public License, Version 2, as published by the WTFPL Task Force. -// See http://www.wtfpl.net/ for more details. -// - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include "loldebug.h" - -using namespace lol; - -//#include "physics/lolphysics.h" -//#include "physics/easyphysics.h" - -#include "nacl_phystest.h" - -//using namespace lol::phys; - -int gNumObjects = 64; - -Nacl_PhysTest::Nacl_PhysTest(bool editor) -{ - /* Register an input controller for the keyboard */ - m_controller = new Controller("Default"); - m_controller->GetKey(KEY_MOVE_FORWARD).Bind("Keyboard", "Up"); - m_controller->GetKey(KEY_MOVE_BACK).Bind("Keyboard", "Down"); - m_controller->GetKey(KEY_MOVE_LEFT).Bind("Keyboard", "Left"); - m_controller->GetKey(KEY_MOVE_RIGHT).Bind("Keyboard", "Right"); - m_controller->GetKey(KEY_MOVE_JUMP).Bind("Keyboard", "Space"); - m_controller->GetKey(KEY_MOVE_UP).Bind("Keyboard", "PageUp"); - m_controller->GetKey(KEY_MOVE_DOWN).Bind("Keyboard", "PageDown"); - m_controller->GetKey(KEY_QUIT).Bind("Keyboard", "Escape"); - - /* Create a camera that matches the settings of XNA BtPhysTest */ - m_camera = new Camera(); - m_camera->SetView(vec3(50.f, 50.f, 0.f), - vec3(0.f, 0.f, 0.f), - vec3(0, 1, 0)); - m_camera->SetProjection(radians(45.f), .1f, 1000.f, (float)Video::GetSize().x, (float)Video::GetSize().y / (float)Video::GetSize().x); - Scene::GetScene().PushCamera(m_camera); - - m_ready = false; - - /* - m_simulation = new Simulation(); - m_simulation->SetWorldLimit(vec3(-1000.0f, -1000.0f, -1000.0f), vec3(1000.0f, 1000.0f, 1000.0f)); - m_simulation->Init(); - vec3 NewGravity = vec3(.0f, -10.0f, .0f); - m_simulation->SetGravity(NewGravity); - m_simulation->SetContinuousDetection(true); - m_simulation->SetTimestep(1.f / 120.f); - Ticker::Ref(m_simulation); - */ - - /* Add a white directional light */ - m_light1 = new Light(); - m_light1->SetPosition(vec3(0.2f, 0.2f, 0.f)); - m_light1->SetColor(vec4(0.5f, 0.5f, 0.5f, 1.f)); - m_light1->SetType(LightType::Directional); - Ticker::Ref(m_light1); - - /* Add an orangeish point light */ - m_light2 = new Light(); - m_light2->SetPosition(vec3(-15.f, 15.f, 15.f)); - m_light2->SetColor(vec4(0.4f, 0.3f, 0.2f, 1.f)); - m_light2->SetType(LightType::Point); - Ticker::Ref(m_light2); -} - -void Nacl_PhysTest::tick_game(float seconds) -{ - WorldEntity::tick_game(seconds); - - if (m_controller->IsKeyReleased(KEY_QUIT)) - Ticker::Shutdown(); -} - -void Nacl_PhysTest::tick_draw(float seconds, Scene &scene) -{ - WorldEntity::tick_draw(seconds, scene); - - if (!m_ready) - { - /* FIXME: this object never cleans up */ - m_ready = true; - } - else - { - } -} - -Nacl_PhysTest::~Nacl_PhysTest() -{ - Scene::GetScene().PopCamera(m_camera); - - Ticker::Unref(m_light1); - Ticker::Unref(m_light2); - - //Ticker::Unref(m_simulation); -} - -int main(int argc, char **argv) -{ - sys::init(argc, argv); - - Application app("Nacl_PhysTest", ivec2(1280, 960), 60.0f); - - new Nacl_PhysTest(argc > 1); - app.ShowPointer(false); - - app.Run(); - - return EXIT_SUCCESS; -} - diff --git a/doc/samples/nacl_phystest.h b/doc/samples/nacl_phystest.h deleted file mode 100644 index e2e63857..00000000 --- a/doc/samples/nacl_phystest.h +++ /dev/null @@ -1,64 +0,0 @@ -// -// Lol Engine — Bullet physics test -// -// Copyright © 2009—2013 Benjamin “Touky” Huet -// © 2012—2018 Sam Hocevar -// -// Lol Engine is free software. It comes without any warranty, to -// the extent permitted by applicable law. You can redistribute it -// and/or modify it under the terms of the Do What the Fuck You Want -// to Public License, Version 2, as published by the WTFPL Task Force. -// See http://www.wtfpl.net/ for more details. -// - -#pragma once - -class Nacl_PhysTest : public WorldEntity -{ -public: - Nacl_PhysTest(bool editor = false); - virtual ~Nacl_PhysTest(); - - std::string GetName() const { return ""; } - -protected: - virtual void tick_game(float seconds); - virtual void tick_draw(float seconds, Scene &scene); - -private: - enum - { - KEY_MOVE_FORWARD, - KEY_MOVE_BACK, - KEY_MOVE_LEFT, - KEY_MOVE_RIGHT, - KEY_MOVE_UP, - KEY_MOVE_DOWN, - KEY_MOVE_JUMP, - KEY_QUIT, - KEY_MAX, - }; - - TileSet* m_cat_texture; - Shader* m_cat_shader; - Camera* m_camera; - Controller * m_controller; - Light * m_light1; - Light * m_light2; - bool m_ready; - - //lol::phys::Simulation* m_simulation; - //array m_constraint_list; - //array m_physobj_list; - //array m_ground_list; - //array m_platform_list; - //array m_character_list; - //array m_stairs_list; - - float m_loop_value; - float m_target_timer; - int m_cam_target; - float m_fov_dp; - float m_loc_dp; -}; - diff --git a/doc/samples/nacl_phystest.vcxproj b/doc/samples/nacl_phystest.vcxproj deleted file mode 100644 index 23559465..00000000 --- a/doc/samples/nacl_phystest.vcxproj +++ /dev/null @@ -1,72 +0,0 @@ - - - - $(SolutionDir)\lol - $(SolutionDir) - - - - Debug - ORBIS - - - Debug - Win32 - - - Debug - x64 - - - Release - ORBIS - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - {9e62f2fe-3408-4eae-8238-fd84238ceeda} - - - {83d3b207-c601-4025-8f41-01dedc354661} - - - - - true - - - - {ee203b88-44cf-4859-9d42-7a1f43fecb53} - Application - Win32Proj - - - - - - - - - - - - - - - - - diff --git a/doc/samples/nacl_phystest.vcxproj.filters b/doc/samples/nacl_phystest.vcxproj.filters deleted file mode 100644 index ccd5e2f8..00000000 --- a/doc/samples/nacl_phystest.vcxproj.filters +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - {4fc7662b-b17a-49b9-acd1-0cf767183b07} - - - {ccecd634-9321-4c49-9471-e9da50dda6d4} - - - - - - \ No newline at end of file diff --git a/doc/tutorial/11_fractal.cpp b/doc/tutorial/11_fractal.cpp index 2c279733..2c0666cf 100644 --- a/doc/tutorial/11_fractal.cpp +++ b/doc/tutorial/11_fractal.cpp @@ -51,12 +51,7 @@ public: /* Window size decides the world aspect ratio. For instance, 640×480 * will be mapped to (-0.66,-0.5) - (0.66,0.5). */ -#if !defined __native_client__ m_window_size = Video::GetSize(); -#else - /* FIXME: it's illegal to call this on the game thread! */ - m_window_size = ivec2(640, 480); -#endif if (m_window_size.y < m_window_size.x) m_window2world = 0.5 / m_window_size.y; else @@ -98,14 +93,9 @@ public: uint8_t red = (uint8_t)(rgb.r * 256); uint8_t green = (uint8_t)(rgb.g * 256); uint8_t blue = (uint8_t)(rgb.b * 256); -#if defined __native_client__ - m_palette.push(u8vec4(red, green, blue, 255)); -#else m_palette.push(u8vec4(blue, green, red, 255)); -#endif } -#if !defined __native_client__ m_zoomtext = new Text("", "data/font/ascii.png"); m_zoomtext->SetPos(vec3(5, (float)m_window_size.y - 15, 1)); Ticker::Ref(m_zoomtext); @@ -117,7 +107,6 @@ public: m_mousetext = new Text("", "data/font/ascii.png"); m_mousetext->SetPos(vec3(5, (float)m_window_size.y - 43, 1)); Ticker::Ref(m_mousetext); -#endif m_position = vec3::zero; m_aabb.aa = m_position; @@ -143,11 +132,9 @@ public: m_donequeue.pop(); #endif -#if !defined __native_client__ Ticker::Unref(m_centertext); Ticker::Unref(m_mousetext); Ticker::Unref(m_zoomtext); -#endif } inline f128cmplx TexelToWorldOffset(vec2 texel) @@ -299,7 +286,6 @@ public: m_zoom_settings[i][1] -= 0.5f * (1.0f - m_zoom_settings[i][2]); } -#if !defined __native_client__ char buf[256]; std::sprintf(buf, "center: "); m_view.center.x.sprintf(buf + strlen(buf), 30); @@ -313,7 +299,6 @@ public: m_mousetext->SetText(buf); std::sprintf(buf, "[%s] zoom: %g", m_julia ? "Julia" : "Mandelbrot", 1.0 / m_view.radius); m_zoomtext->SetText(buf); -#endif if (m_dirty[m_frame]) { @@ -590,10 +575,8 @@ private: queue m_spawnqueue, m_jobqueue, m_donequeue; #endif -#if !defined __native_client__ /* Debug information */ Text *m_centertext, *m_mousetext, *m_zoomtext; -#endif }; int main(int argc, char **argv) diff --git a/src/Makefile.am b/src/Makefile.am index 5c4a1b2d..c5b63d87 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,7 +21,6 @@ liblol_core_a_SOURCES = \ $(liblol_core_sources) \ \ $(imgui_sources) \ - $(nacl_sources) \ $(sdl_sources) \ $(d3d9_sources) \ $(android_sources) @@ -156,15 +155,6 @@ imgui_sources += \ lolimgui.cpp lolimgui.h \ $(NULL) -if LOL_USE_NACL -nacl_sources = \ - platform/nacl/nacl-app.cpp platform/nacl/nacl-app.h \ - platform/nacl/nacl-instance.cpp platform/nacl/nacl-instance.h \ - platform/nacl/nacl-module.cpp \ - platform/nacl/opengl_context.cpp platform/nacl/opengl_context.h \ - platform/nacl/opengl_context_ptrs.h -endif - android_sources = \ image/codec/android-image.cpp \ platform/android/androidapp.cpp platform/android/androidapp.h diff --git a/src/application/application.cpp b/src/application/application.cpp index db535147..738540d9 100644 --- a/src/application/application.cpp +++ b/src/application/application.cpp @@ -18,9 +18,7 @@ #include "lolgl.h" -#if __native_client__ -# include "platform/nacl/nacl-app.h" -#elif __ANDROID__ +#if __ANDROID__ # include "platform/android/androidapp.h" #elif LOL_USE_SDL # include "platform/sdl/sdlapp.h" @@ -73,9 +71,7 @@ class ApplicationDisplayData { } protected: -#if __native_client__ - //NOT HANDLED YET -#elif __ANDROID__ +#if __ANDROID__ //NOT HANDLED YET #elif LOL_USE_SDL SdlAppDisplay display; @@ -139,9 +135,7 @@ class ApplicationData : app(name, res, framerate) { } -#if __native_client__ - NaClApp app; -#elif __ANDROID__ +#if __ANDROID__ AndroidApp app; #elif LOL_USE_SDL SdlApp app; diff --git a/src/gpu/texture.cpp b/src/gpu/texture.cpp index e22eebb3..20ddeadb 100644 --- a/src/gpu/texture.cpp +++ b/src/gpu/texture.cpp @@ -64,7 +64,7 @@ Texture::Texture(ivec2 size, PixelFormat format) { 0, 0, 0, 0 }, /* Unknown */ /* FIXME: this is all mixed up for the RGBA/ARGB combinations */ -#if defined __native_client__ || defined HAVE_GLES_2X +#if defined HAVE_GLES_2X { GL_LUMINANCE, GL_LUMINANCE, GL_UNSIGNED_BYTE, 1 }, { GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, 3 }, { GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE, 4 }, diff --git a/src/lol-core.vcxproj b/src/lol-core.vcxproj index 432a0410..b3aa74e6 100644 --- a/src/lol-core.vcxproj +++ b/src/lol-core.vcxproj @@ -164,38 +164,6 @@ - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - true @@ -317,38 +285,6 @@ - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - - - true - true - true - true - true - true - true diff --git a/src/lol-core.vcxproj.filter b/src/lol-core.vcxproj.filter index 55fda846..1e67fe69 100644 --- a/src/lol-core.vcxproj.filter +++ b/src/lol-core.vcxproj.filter @@ -79,9 +79,6 @@ {a914e15d-3201-467a-a9c9-d7c5244b13ee} - - {f6cc3470-c841-4581-969b-e60cea841c27} - {63e63eea-c96e-4d37-81f6-f3f17e18b751} @@ -291,18 +288,8 @@ ... - - - platform\nacl - - - platform\nacl - - - platform\nacl - - - platform\nacl + + math easymesh @@ -706,18 +693,6 @@ ... - - platform\nacl - - - platform\nacl - - - platform\nacl - - - platform\nacl - easymesh diff --git a/src/lol/base/features.h b/src/lol/base/features.h index 5f45269e..bcebbd99 100644 --- a/src/lol/base/features.h +++ b/src/lol/base/features.h @@ -195,12 +195,6 @@ namespace lol } -/* XXX: workaround for a compilation bug in NaCl headers */ -#if defined __native_client__ -# define typeid(x) (*(type_info*)nullptr) -#endif - - /* XXX: workaround for X11 headers that try to #define these */ #undef Always #define Always Always diff --git a/src/lol/engine-internal.h b/src/lol/engine-internal.h index 175a87de..c67ba1bd 100644 --- a/src/lol/engine-internal.h +++ b/src/lol/engine-internal.h @@ -22,10 +22,8 @@ # include "config.h" #endif -/* If using NaCl or Android, override main() with our version */ -#if __native_client__ -# define main lol_nacl_main -#elif __ANDROID__ +/* If using Android, override main() with our version */ +#if __ANDROID__ # define main lol_android_main #endif diff --git a/src/lol/engine.h b/src/lol/engine.h index 4679ff51..da5a071e 100644 --- a/src/lol/engine.h +++ b/src/lol/engine.h @@ -17,10 +17,8 @@ // -------------------------------------- // -/* If using NaCl or Android, override main() with our version */ -#if __native_client__ -# define main lol_nacl_main -#elif __ANDROID__ +/* If using Android, override main() with our version */ +#if __ANDROID__ # define main lol_android_main #endif diff --git a/src/lol/math/bigint.h b/src/lol/math/bigint.h index 8b37e923..d422f3c7 100644 --- a/src/lol/math/bigint.h +++ b/src/lol/math/bigint.h @@ -29,9 +29,6 @@ namespace lol #undef min #undef max -/* Avoid issues with NaCl headers */ -#undef log2 - /* * A bigint stores its digits in an array of integers. The MSB of the * integers are unused. The highest used bit is the sign bit. diff --git a/src/lol/math/functions.h b/src/lol/math/functions.h index fce31cd4..5197b121 100644 --- a/src/lol/math/functions.h +++ b/src/lol/math/functions.h @@ -180,8 +180,8 @@ LOL_ATTR_NODISCARD static inline int16_t abs(int16_t x) { return std::abs(x); } LOL_ATTR_NODISCARD static inline uint16_t abs(uint16_t x) { return x; } LOL_ATTR_NODISCARD static inline int32_t abs(int32_t x) { return std::abs(x); } LOL_ATTR_NODISCARD static inline uint32_t abs(uint32_t x) { return x; } -#if defined __native_client__ || defined __ANDROID__ -/* The pepper 19 toolchain doesn't provide abs() for long long int. */ +#if defined __ANDROID__ +/* The Android toolchain doesn't provide abs() for int64_t. */ LOL_ATTR_NODISCARD static inline int64_t abs(int64_t x) { return x > 0 ? x : -x; } #else LOL_ATTR_NODISCARD static inline int64_t abs(int64_t x) { return std::abs(x); } diff --git a/src/lol/math/real.h b/src/lol/math/real.h index 22ef3eeb..55202a9e 100644 --- a/src/lol/math/real.h +++ b/src/lol/math/real.h @@ -29,9 +29,6 @@ namespace lol #undef min #undef max -/* Avoid issues with NaCl headers */ -#undef log2 - /* * The base class for reals. The only real reason for making this a template * class is so we can have implicit constructors ("real x = 1" works) but diff --git a/src/platform/nacl/nacl-app.cpp b/src/platform/nacl/nacl-app.cpp deleted file mode 100644 index 561c909d..00000000 --- a/src/platform/nacl/nacl-app.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// -// Lol Engine -// -// Copyright: (c) 2010-2011 Sam Hocevar -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://www.wtfpl.net/ for more details. -// - -#include - -#include "nacl-app.h" -#include "nacl-instance.h" - -namespace lol -{ - -/* - * NaCl App implementation class - */ - -class NaClAppData -{ - friend class NaClApp; - -private: -#if defined __native_client__ -#endif -}; - -/* - * Public NaClApp class - */ - -NaClApp::NaClApp(char const *title, ivec2 res, float fps) : - data(new NaClAppData()) -{ - Ticker::Setup(fps); -#if defined __native_client__ -#endif -} - -void NaClApp::ShowPointer(bool show) -{ - ; -} - -void NaClApp::Tick() -{ - /* The caller should run forever */ -#if defined __native_client__ - static int init = 0; - if (!init) - { - NaClInstance::MainSignal(); - init = 1; - } -#endif -} - -NaClApp::~NaClApp() -{ -#if defined __native_client__ -#endif - delete data; -} - -} /* namespace lol */ - diff --git a/src/platform/nacl/nacl-app.h b/src/platform/nacl/nacl-app.h deleted file mode 100644 index f0658d1c..00000000 --- a/src/platform/nacl/nacl-app.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// Lol Engine -// -// Copyright: (c) 2010-2011 Sam Hocevar -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://www.wtfpl.net/ for more details. -// - -#pragma once - -// -// The NaClApp class -// ----------------- -// - -#include - -namespace lol -{ - -class NaClAppData; - -class NaClApp -{ -public: - NaClApp(char const *title, ivec2 res, float fps); - virtual ~NaClApp(); - - void ShowPointer(bool show); - void Tick(); - -private: - NaClAppData *data; -}; - -} /* namespace lol */ - diff --git a/src/platform/nacl/nacl-instance.cpp b/src/platform/nacl/nacl-instance.cpp deleted file mode 100644 index 45794c19..00000000 --- a/src/platform/nacl/nacl-instance.cpp +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright (c) 2011 The Native Client Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "platform/nacl/nacl-instance.h" -#include "platform/nacl/opengl_context.h" - -/* One of these wrappers will be overridden by the user's version */ -void lol_nacl_main(void) __attribute__((weak)); -void lol_nacl_main(void) {} -void lol_nacl_main(int argc, char **argv) __attribute__((weak)); -void lol_nacl_main(int argc, char **argv) { UNUSED(argc, argv); } -void lol_nacl_main(int argc, char **argv, char **envp) __attribute__((weak)); -void lol_nacl_main(int argc, char **argv, char **envp) { UNUSED(argc, argv, envp); } - -namespace lol -{ - -/* - * NACL Input implementation class - * This is a ripoff of the SDL one - */ - -NaClInstance::NaClInstance(PP_Instance instance) - : pp::Instance(instance), - m_size(0, 0) -{ - RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_WHEEL); - RequestFilteringInputEvents(PP_INPUTEVENT_CLASS_KEYBOARD); - - m_input_data = new NaClInputData(); - m_input_data->m_keyboard = InputDeviceInternal::CreateStandardKeyboard(); - m_input_data->m_mouse = InputDeviceInternal::CreateStandardMouse(); -} - -NaClInstance::~NaClInstance() -{ - // Destroy the cube view while GL context is current. - m_opengl_ctx->MakeContextCurrent(this); - delete m_input_data; -} - -static double const DELTA_MS = 1000.0 / 60.0; - -void NaClInstance::TickCallback(void* data, int32_t result) -{ - UNUSED(result); - NaClInstance *instance = (NaClInstance *)data; - instance->DrawSelf(); - - /* FIXME: only set if if Ticker isn't finished */ - pp::Module::Get()->core()->CallOnMainThread( - DELTA_MS, pp::CompletionCallback(&TickCallback, data), PP_OK); - - //Tick input : TODO: DELTA_MS is not exactly kasher ? - instance->m_input_data->Tick(DELTA_MS); -} - -mutex NaClInstance::main_mutex; -queue NaClInstance::main_queue; - -bool NaClInstance::Init(uint32_t argc, - const char* /* argn */[], - const char* argv[]) -{ - /* Ensure only one NaClInstance does Init() at the same time. */ - main_mutex.Lock(); - char *env[] = { nullptr }; - Args arglist(argc, const_cast(argv), const_cast(env)); - main_queue.push(&arglist); - m_main_thread = new thread(MainRun, nullptr); - /* Push so that only MainSignal() can unblock us */ - main_queue.push(nullptr); - main_queue.push(nullptr); - main_mutex.Unlock(); - - // My timer callback - pp::Module::Get()->core()->CallOnMainThread( - DELTA_MS, pp::CompletionCallback(&TickCallback, this), PP_OK); - - /* The gamepad interface */ - m_pad_interface = static_cast( - pp::Module::Get()->GetBrowserInterface(PPB_GAMEPAD_INTERFACE)); - - return true; -} - -void * NaClInstance::MainRun(void *data) -{ - UNUSED(data); - Args *arglist = main_queue.pop(); - - /* Call the user's main() function. One of these will work. */ - lol_nacl_main(); - lol_nacl_main(arglist->m_argc, arglist->m_argv); - lol_nacl_main(arglist->m_argc, arglist->m_argv, arglist->m_env); - - return nullptr; -} - -void NaClInstance::MainSignal() -{ - /* FIXME: find something more elegant. */ - main_queue.pop(); - main_queue.pop(); -} - -void NaClInstance::HandleMessage(const pp::Var& message) -{ - if (!message.is_string()) - return; - - /* FIXME: do some shit here */ - MessageService::Send(MessageBucket::AppIn, message.AsString().c_str()); -} - -void NaClInstance::DidChangeView(const pp::Rect& position, const pp::Rect& clip) -{ - UNUSED(clip); - if (position.size().width() == m_size.x && - position.size().height() == m_size.y) - return; // Size didn't change, no need to update anything. - - m_size = ivec2(position.size().width(), position.size().height()); - - if (m_opengl_ctx == nullptr) - m_opengl_ctx.reset(new OpenGLContext(this)); - m_opengl_ctx->InvalidateContext(this); - m_opengl_ctx->ResizeContext(position.size()); - if (!m_opengl_ctx->MakeContextCurrent(this)) - return; - - Video::Setup(m_size); - DrawSelf(); -} - -bool NaClInstance::HandleInputEvent(const pp::InputEvent& event) -{ - m_input_data->m_input_events << event; - return true; -} - -void NaClInstance::DrawSelf() -{ - if (m_opengl_ctx == nullptr) - return; - - m_opengl_ctx->MakeContextCurrent(this); - Ticker::tick_draw(); - m_opengl_ctx->FlushContext(); -} - -void NaClInputData::Tick(float seconds) -{ - UNUSED(seconds); - if (!IsViewportSizeValid()) - InitViewportSize(); - - //Init cursor position, if mouse didn't move. - ivec2 mousepos = m_mouse->GetCursorPixelPos(0); - vec2 mousepos_prev = vec2(mousepos); - /* Handle keyboard and WM events */ - for (int i = 0; i < m_input_events.count(); ++i) - { - pp::InputEvent &e = m_input_events[i]; - switch (e.GetType()) - { - case PP_INPUTEVENT_TYPE_MOUSEDOWN: - case PP_INPUTEVENT_TYPE_MOUSEUP: - { - pp::MouseInputEvent em = pp::MouseInputEvent(e); - //Show probably do a switch. - if (em.GetButton() != PP_INPUTEVENT_MOUSEBUTTON_NONE) - m_mouse->SetKey(em.GetButton(), em.GetType() == PP_INPUTEVENT_TYPE_MOUSEDOWN); - break; - } - case PP_INPUTEVENT_TYPE_MOUSELEAVE: - case PP_INPUTEVENT_TYPE_MOUSEENTER: - { - /* TODO: "InScreen" idx hardcoded, not nice */ - pp::MouseInputEvent em = pp::MouseInputEvent(e); - m_mouse->SetKey(3, em.GetType() == PP_INPUTEVENT_TYPE_MOUSEENTER); - break; - } - case PP_INPUTEVENT_TYPE_MOUSEMOVE: - { - pp::MouseInputEvent em = pp::MouseInputEvent(e); - mousepos = ivec2(em.GetPosition().x(), em.GetPosition().y()); - break; - } - case PP_INPUTEVENT_TYPE_WHEEL: - { - /* TODO: MOUSE WHEEL NOT IMPLEMENTED IN LOL */ - break; - } - // Use ? - //case PP_INPUTEVENT_TYPE_RAWKEYDOWN: - //case PP_INPUTEVENT_TYPE_CHAR: - case PP_INPUTEVENT_TYPE_KEYDOWN: - case PP_INPUTEVENT_TYPE_KEYUP: - { - pp::KeyboardInputEvent ek = pp::KeyboardInputEvent(e); - m_keyboard->SetKey(ek.GetKeyCode(), ek.GetType() == PP_INPUTEVENT_TYPE_KEYUP); - break; - } - case PP_INPUTEVENT_TYPE_UNDEFINED: - default: - { - break; - } - } - } - m_input_events.clear(); - - /* Handle mouse input */ - if (IsViewportSizeValid()) - { - if (mousepos.x >= 0 && mousepos.x < m_app.x && mousepos.y >= 0 && mousepos.y < m_app.y) - { - //We need the max if we want coherent mouse speed between axis - float max_screen_size = lol::max(m_screen.x, m_screen.y); - vec2 vmousepos = vec2(mousepos); - m_mouse->SetCursor(0, vmousepos / m_app, mousepos); - // Note: 100.0f is an arbitrary value that makes it feel about the same than an xbox controller joystick - m_mouse->SetAxis(0, (vmousepos.x - mousepos_prev.x) * 100.0f / max_screen_size); - // Unlike SDL, no need to negate Y axis. - m_mouse->SetAxis(1, (vmousepos.y - mousepos_prev.y) * 100.0f / max_screen_size); - } - - if (m_mousecapture) - { - /* - mousepos = ivec2(m_app * .5f); - NaClInputData::SetMousePos(mousepos); - */ - } - } -} - -//---- -void NaClInputData::InitViewportSize() -{ - if (Scene::GetCount()) - { - m_app = vec2(Video::GetSize()); - //Dunno if its the good idea. - m_screen = vec2(Video::GetSize()); - } - else - { - m_app = vec2(-1.f); - m_screen = vec2(-1.f); - } -} - -void NaClInputData::SetMousePos(ivec2 position) -{ - UNUSED(position); - //? How to do that ? - //SDL_WarpMouse((uint16_t)position.x, (uint16_t)position.y); -} - -} // namespace lol - diff --git a/src/platform/nacl/nacl-instance.h b/src/platform/nacl/nacl-instance.h deleted file mode 100644 index 588c009b..00000000 --- a/src/platform/nacl/nacl-instance.h +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2011 The Native Client Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#pragma once - -#include -#include -#include - -#include "platform/nacl/opengl_context.h" -#include "platform/nacl/opengl_context_ptrs.h" - -#include "input/input.h" -#include "input/input_internal.h" - -namespace lol { - -class NaClInputData -{ - friend class NaClInstance; - -private: - void Tick(float seconds); - bool IsViewportSizeValid() { return (m_app.x > 0.f && m_app.y > 0.f && m_screen.x > 0.f && m_screen.y > 0.f); } - void InitViewportSize(); - - static void SetMousePos(ivec2 position); - - NaClInputData() - : m_mousecapture(false) - { - InitViewportSize(); - } - - array m_input_events; - class InputDeviceInternal* m_mouse; - class InputDeviceInternal* m_keyboard; - - vec2 m_app; - vec2 m_screen; - bool m_mousecapture; -}; - -class NaClInstance : public pp::Instance -{ -public: - explicit NaClInstance(PP_Instance instance); - - // The dtor makes the 3D context current before deleting the cube view, then - // destroys the 3D context both in the module and in the browser. - virtual ~NaClInstance(); - - // Called by the browser when the NaCl module is loaded and all ready to go. - virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]); - - // Called whenever the in-browser window changes size. - virtual void DidChangeView(const pp::Rect& position, const pp::Rect& clip); - - // Called by the browser to handle the postMessage() call in Javascript. - virtual void HandleMessage(const pp::Var& message); - - // Bind and publish the module's methods to JavaScript. - //void InitializeMethods(ScriptingBridge* bridge); - - // Called to draw the contents of the module's browser area. - virtual bool HandleInputEvent(const pp::InputEvent& event); - - void DrawSelf(); - - /* Communication with the application object */ - static void MainSignal(); - -private: - SharedOpenGLContext m_opengl_ctx; - - ivec2 m_size; - - static void TickCallback(void* data, int32_t result); - static void * MainRun(void *data); - - /* Gamepad support */ - PPB_Gamepad const *m_pad_interface; - - //12/09/2013 : Should use new system. - NaClInputData *m_input_data; - - /* Communication with the application object */ - struct Args - { - Args(int argc, char **argv, char **env) - : m_argc(argc), m_argv(argv), m_env(env) {} - Args() {} - - int m_argc; - char **m_argv; - char **m_env; - }; - static mutex main_mutex; - static queue main_queue; - - Thread *m_main_thread; -}; - -} // namespace lol - diff --git a/src/platform/nacl/nacl-module.cpp b/src/platform/nacl/nacl-module.cpp deleted file mode 100644 index d0fb5a99..00000000 --- a/src/platform/nacl/nacl-module.cpp +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2011 The Native Client Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include - -#include -#include -#include - -#include "lolgl.h" /* needed for GL_TRUE */ - -#include "platform/nacl/nacl-instance.h" - -/// The Module class. The browser calls the CreateInstance() method to create -/// an instance of your NaCl module on the web page. The browser creates a new -/// instance for each tag with type="application/x-nacl". -class NaClModule : public pp::Module -{ -public: - NaClModule() : pp::Module() {} - virtual ~NaClModule() - { - glTerminatePPAPI(); - } - - /// Called by the browser when the module is first loaded and ready to run. - /// This is called once per module, not once per instance of the module on - /// the page. - virtual bool Init() - { - return glInitializePPAPI(get_browser_interface()) == GL_TRUE; - } - - /// Create and return a Lol instance object. - /// @param[in] instance The browser-side instance. - /// @return the plugin-side instance. - virtual pp::Instance* CreateInstance(PP_Instance instance) - { - return new lol::NaClInstance(instance); - } -}; - -namespace pp -{ -/// Factory function called by the browser when the module is first loaded. -/// The browser keeps a singleton of this module. It calls the -/// CreateInstance() method on the object you return to make instances. There -/// is one instance per tag on the page. This is the main binding -/// point for your NaCl module with the browser. -Module* CreateModule() -{ - return new NaClModule(); -} - -} // namespace pp - diff --git a/src/platform/nacl/opengl_context.cpp b/src/platform/nacl/opengl_context.cpp deleted file mode 100644 index e6e6f821..00000000 --- a/src/platform/nacl/opengl_context.cpp +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2011 The Native Client Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include - -#include -#include - -#include "platform/nacl/opengl_context.h" - -namespace { -// This is called by the brower when the 3D context has been flushed to the -// browser window. -void FlushCallback(void* data, int32_t result) { - static_cast(data)->set_flush_pending(false); -} -} // namespace - -namespace lol { - -OpenGLContext::OpenGLContext(pp::Instance* instance) - : pp::Graphics3DClient(instance), - flush_pending_(false) { - pp::Module* module = pp::Module::Get(); - assert(module); - gles2_interface_ = static_cast( - module->GetBrowserInterface(PPB_OPENGLES2_INTERFACE)); - assert(gles2_interface_); -} - -OpenGLContext::~OpenGLContext() { - glSetCurrentContextPPAPI(0); -} - -bool OpenGLContext::MakeContextCurrent(pp::Instance* instance) -{ - if (instance == nullptr) - { - glSetCurrentContextPPAPI(0); - return false; - } - // Lazily create the Pepper context. - if (context_.is_null()) { - int32_t attribs[] = { - PP_GRAPHICS3DATTRIB_ALPHA_SIZE, 8, - PP_GRAPHICS3DATTRIB_DEPTH_SIZE, 24, - PP_GRAPHICS3DATTRIB_STENCIL_SIZE, 8, - PP_GRAPHICS3DATTRIB_SAMPLES, 0, - PP_GRAPHICS3DATTRIB_SAMPLE_BUFFERS, 0, - PP_GRAPHICS3DATTRIB_WIDTH, size_.width(), - PP_GRAPHICS3DATTRIB_HEIGHT, size_.height(), - PP_GRAPHICS3DATTRIB_NONE - }; - context_ = pp::Graphics3D(instance, pp::Graphics3D(), attribs); - if (context_.is_null()) { - glSetCurrentContextPPAPI(0); - return false; - } - instance->BindGraphics(context_); - } - glSetCurrentContextPPAPI(context_.pp_resource()); - return true; -} - -void OpenGLContext::InvalidateContext(pp::Instance* instance) { - glSetCurrentContextPPAPI(0); -} - -void OpenGLContext::ResizeContext(const pp::Size& size) { - size_ = size; - if (!context_.is_null()) { - context_.ResizeBuffers(size.width(), size.height()); - } -} - - -void OpenGLContext::FlushContext() { - if (flush_pending()) { - // A flush is pending so do nothing; just drop this flush on the floor. - return; - } - set_flush_pending(true); - context_.SwapBuffers(pp::CompletionCallback(&FlushCallback, this)); -} -} // namespace lol - diff --git a/src/platform/nacl/opengl_context.h b/src/platform/nacl/opengl_context.h deleted file mode 100644 index 0d01a392..00000000 --- a/src/platform/nacl/opengl_context.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2011 The Native Client Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#pragma once - -/// -/// @file -/// OpenGLContext manages the OpenGL context in the browser that is associated -/// with a @a pp::Instance instance. -/// - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include "platform/nacl/opengl_context_ptrs.h" - -namespace lol { - -/// OpenGLContext manages an OpenGL rendering context in the browser. -/// -class OpenGLContext : public pp::Graphics3DClient { - public: - explicit OpenGLContext(pp::Instance* instance); - - /// Release all the in-browser resources used by this context, and make this - /// context invalid. - virtual ~OpenGLContext(); - - /// The Graphics3DClient interfcace. - virtual void Graphics3DContextLost() { - assert(!"Unexpectedly lost graphics context"); - } - - /// Make @a this the current 3D context in @a instance. - /// @param instance The instance of the NaCl module that will receive the - /// the current 3D context. - /// @return success. - bool MakeContextCurrent(pp::Instance* instance); - - /// Flush the contents of this context to the browser's 3D device. - void FlushContext(); - - /// Make the underlying 3D device invalid, so that any subsequent rendering - /// commands will have no effect. The next call to MakeContextCurrent() will - /// cause the underlying 3D device to get rebound and start receiving - /// receiving rendering commands again. Use InvalidateContext(), for - /// example, when resizing the context's viewing area. - void InvalidateContext(pp::Instance* instance); - - /// Resize the context. - void ResizeContext(const pp::Size& size); - - pp::Size const& GetSize() { return size_; } - - /// The OpenGL ES 2.0 interface. - const struct PPB_OpenGLES2* gles2() const { - return gles2_interface_; - } - - /// The PP_Resource needed to make GLES2 calls through the Pepper interface. - PP_Resource gl_context() const { - return context_.pp_resource(); - } - - /// Indicate whether a flush is pending. This can only be called from the - /// main thread; it is not thread safe. - bool flush_pending() const { - return flush_pending_; - } - void set_flush_pending(bool flag) { - flush_pending_ = flag; - } - - private: - pp::Size size_; - pp::Graphics3D context_; - bool flush_pending_; - - const struct PPB_OpenGLES2* gles2_interface_; -}; - -} // namespace lol - diff --git a/src/platform/nacl/opengl_context_ptrs.h b/src/platform/nacl/opengl_context_ptrs.h deleted file mode 100644 index c034f1df..00000000 --- a/src/platform/nacl/opengl_context_ptrs.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2011 The Native Client Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#pragma once - -// A convenience wrapper for a shared OpenGLContext pointer type. As other -// smart pointer types are needed, add them here. - -#include - -namespace lol { - -class OpenGLContext; - -typedef std::tr1::shared_ptr SharedOpenGLContext; - -} // namespace lol -