|
4 | 4 | * SPDX-License-Identifier: MIT
|
5 | 5 | */
|
6 | 6 |
|
| 7 | +assert(LEGACY_GL_EMULATION, 'libglemu.js should only be included with LEGACY_GL_EMULATION set') |
| 8 | +assert(!FULL_ES2, 'cannot emulate both ES2 and legacy GL'); |
| 9 | +assert(!FULL_ES3, 'cannot emulate both ES3 and legacy GL'); |
| 10 | + |
7 | 11 | {{{
|
8 | 12 | const copySigs = (func) => {
|
9 | 13 | if (!RELOCATABLE) return '';
|
@@ -3616,7 +3620,7 @@ var LibraryGLEmulation = {
|
3616 | 3620 |
|
3617 | 3621 | // OpenGL Immediate Mode matrix routines.
|
3618 | 3622 | // Note that in the future we might make these available only in certain modes.
|
3619 |
| - glMatrixMode__deps: ['$GL', '$GLImmediateSetup', '$GLEmulation'], // emulation is not strictly needed, this is a workaround |
| 3623 | + glMatrixMode__deps: ['$GL', '$GLImmediateSetup'], |
3620 | 3624 | glMatrixMode: (mode) => {
|
3621 | 3625 | if (mode == 0x1700 /* GL_MODELVIEW */) {
|
3622 | 3626 | GLImmediate.currentMatrix = 0/*m*/;
|
@@ -3948,14 +3952,8 @@ var LibraryGLEmulation = {
|
3948 | 3952 | gluOrtho2D: (left, right, bottom, top) => _glOrtho(left, right, bottom, top, -1, 1),
|
3949 | 3953 | };
|
3950 | 3954 |
|
3951 |
| -// Legacy GL emulation |
3952 |
| -if (LEGACY_GL_EMULATION) { |
3953 |
| - extraLibraryFuncs.push('$GLEmulation'); |
3954 |
| -} |
| 3955 | +extraLibraryFuncs.push('$GLEmulation'); |
3955 | 3956 |
|
3956 | 3957 | recordGLProcAddressGet(LibraryGLEmulation);
|
3957 | 3958 |
|
3958 | 3959 | addToLibrary(LibraryGLEmulation);
|
3959 |
| - |
3960 |
| -assert(!(FULL_ES2 && LEGACY_GL_EMULATION), 'cannot emulate both ES2 and legacy GL'); |
3961 |
| -assert(!(FULL_ES3 && LEGACY_GL_EMULATION), 'cannot emulate both ES3 and legacy GL'); |
0 commit comments