@@ -2459,12 +2459,12 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2459
2459
#if GL_ASSERTIONS
2460
2460
assert ( GL . currentContext . version >= 2 ) ;
2461
2461
#endif
2462
- count && GLctx . uniform1iv ( webglGetUniformLocation ( location ) , HEAP32 , value >> 2 , count ) ;
2462
+ count && GLctx . uniform1iv ( webglGetUniformLocation ( location ) , HEAP32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count ) ;
2463
2463
#else
2464
2464
2465
2465
#if MAX_WEBGL_VERSION >= 2
2466
2466
if ( { { { isCurrentContextWebGL2( ) } } } ) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible.
2467
- count && GLctx . uniform1iv ( webglGetUniformLocation ( location) , HEAP32 , value> > 2 , count) ;
2467
+ count && GLctx . uniform1iv ( webglGetUniformLocation ( location ) , HEAP32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count) ;
2468
2468
return ;
2469
2469
}
2470
2470
#endif
@@ -2500,12 +2500,12 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2500
2500
#if GL_ASSERTIONS
2501
2501
assert ( GL . currentContext . version >= 2 ) ;
2502
2502
#endif
2503
- count && GLctx . uniform2iv ( webglGetUniformLocation ( location ) , HEAP32 , value >> 2 , count * 2 ) ;
2503
+ count && GLctx . uniform2iv ( webglGetUniformLocation ( location ) , HEAP32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 2 ) ;
2504
2504
#else
2505
2505
2506
2506
#if MAX_WEBGL_VERSION >= 2
2507
2507
if ( { { { isCurrentContextWebGL2( ) } } } ) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible.
2508
- count && GLctx . uniform2iv ( webglGetUniformLocation ( location) , HEAP32 , value> > 2 , count* 2 ) ;
2508
+ count && GLctx . uniform2iv ( webglGetUniformLocation ( location ) , HEAP32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count* 2 ) ;
2509
2509
return ;
2510
2510
}
2511
2511
#endif
@@ -2542,12 +2542,12 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2542
2542
#if GL_ASSERTIONS
2543
2543
assert ( GL . currentContext . version >= 2 ) ;
2544
2544
#endif
2545
- count && GLctx . uniform3iv ( webglGetUniformLocation ( location ) , HEAP32 , value >> 2 , count * 3 ) ;
2545
+ count && GLctx . uniform3iv ( webglGetUniformLocation ( location ) , HEAP32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 3 ) ;
2546
2546
#else
2547
2547
2548
2548
#if MAX_WEBGL_VERSION >= 2
2549
2549
if ( { { { isCurrentContextWebGL2( ) } } } ) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible.
2550
- count && GLctx . uniform3iv ( webglGetUniformLocation ( location) , HEAP32 , value> > 2 , count* 3 ) ;
2550
+ count && GLctx . uniform3iv ( webglGetUniformLocation ( location ) , HEAP32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count* 3 ) ;
2551
2551
return ;
2552
2552
}
2553
2553
#endif
@@ -2585,14 +2585,14 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2585
2585
#if GL_ASSERTIONS
2586
2586
assert ( GL . currentContext . version >= 2 ) ;
2587
2587
#endif
2588
- count && GLctx . uniform4iv ( webglGetUniformLocation ( location ) , HEAP32 , value >> 2 , count * 4 ) ;
2588
+ count && GLctx . uniform4iv ( webglGetUniformLocation ( location ) , HEAP32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 4 ) ;
2589
2589
#else
2590
2590
2591
2591
#if MAX_WEBGL_VERSION >= 2
2592
2592
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2593
2593
// those always when possible.
2594
2594
if ( { { { isCurrentContextWebGL2( ) } } } ) {
2595
- count && GLctx . uniform4iv ( webglGetUniformLocation ( location ) , HEAP32 , value >> 2 , count * 4 ) ;
2595
+ count && GLctx . uniform4iv ( webglGetUniformLocation ( location ) , HEAP32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 4 ) ;
2596
2596
return ;
2597
2597
}
2598
2598
#endif
@@ -2631,12 +2631,12 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2631
2631
#if GL_ASSERTIONS
2632
2632
assert ( GL . currentContext . version >= 2 ) ;
2633
2633
#endif
2634
- count && GLctx . uniform1fv ( webglGetUniformLocation ( location ) , HEAPF32 , value >> 2 , count ) ;
2634
+ count && GLctx . uniform1fv ( webglGetUniformLocation ( location ) , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count ) ;
2635
2635
#else
2636
2636
2637
2637
#if MAX_WEBGL_VERSION >= 2
2638
2638
if ( { { { isCurrentContextWebGL2( ) } } } ) { // WebGL 2 provides new garbage-free entry points to call to WebGL. Use those always when possible.
2639
- count && GLctx . uniform1fv ( webglGetUniformLocation ( location) , HEAPF32 , value> > 2 , count) ;
2639
+ count && GLctx . uniform1fv ( webglGetUniformLocation ( location ) , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count) ;
2640
2640
return ;
2641
2641
}
2642
2642
#endif
@@ -2672,14 +2672,14 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2672
2672
#if GL_ASSERTIONS
2673
2673
assert ( GL . currentContext . version >= 2 ) ;
2674
2674
#endif
2675
- count && GLctx . uniform2fv ( webglGetUniformLocation ( location ) , HEAPF32 , value >> 2 , count * 2 ) ;
2675
+ count && GLctx . uniform2fv ( webglGetUniformLocation ( location ) , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 2 ) ;
2676
2676
#else
2677
2677
2678
2678
#if MAX_WEBGL_VERSION >= 2
2679
2679
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2680
2680
// those always when possible.
2681
2681
if ( { { { isCurrentContextWebGL2( ) } } } ) {
2682
- count && GLctx . uniform2fv ( webglGetUniformLocation ( location) , HEAPF32 , value> > 2 , count* 2 ) ;
2682
+ count && GLctx . uniform2fv ( webglGetUniformLocation ( location ) , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 2 ) ;
2683
2683
return ;
2684
2684
}
2685
2685
#endif
@@ -2709,21 +2709,21 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2709
2709
glUniform3fv : ( location , count , value ) = > {
2710
2710
#if GL_ASSERTIONS
2711
2711
GL . validateGLObjectID ( GLctx . currentProgram . uniformLocsById , location , 'glUniform3fv' , 'location' ) ;
2712
- assert ( ( value & 3 ) == 0 , 'Pointer to float data passed to glUniform3fv must be aligned to four bytes!' + value ) ;
2712
+ assert ( ( value % 4 ) == 0 , 'Pointer to float data passed to glUniform3fv must be aligned to four bytes!' + value ) ;
2713
2713
#endif
2714
2714
2715
2715
#if MIN_WEBGL_VERSION >= 2
2716
2716
#if GL_ASSERTIONS
2717
2717
assert ( GL . currentContext . version >= 2 ) ;
2718
2718
#endif
2719
- count && GLctx . uniform3fv ( webglGetUniformLocation ( location ) , HEAPF32 , value >> 2 , count * 3 ) ;
2719
+ count && GLctx . uniform3fv ( webglGetUniformLocation ( location ) , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 3 ) ;
2720
2720
#else
2721
2721
2722
2722
#if MAX_WEBGL_VERSION >= 2
2723
2723
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2724
2724
// those always when possible.
2725
2725
if ( { { { isCurrentContextWebGL2( ) } } } ) {
2726
- count && GLctx . uniform3fv ( webglGetUniformLocation ( location ) , HEAPF32 , value >> 2 , count * 3 ) ;
2726
+ count && GLctx . uniform3fv ( webglGetUniformLocation ( location ) , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 3 ) ;
2727
2727
return ;
2728
2728
}
2729
2729
#endif
@@ -2761,14 +2761,14 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2761
2761
#if GL_ASSERTIONS
2762
2762
assert ( GL . currentContext . version >= 2 ) ;
2763
2763
#endif
2764
- count && GLctx . uniform4fv ( webglGetUniformLocation ( location ) , HEAPF32 , value >> 2 , count * 4 ) ;
2764
+ count && GLctx . uniform4fv ( webglGetUniformLocation ( location ) , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 4 ) ;
2765
2765
#else
2766
2766
2767
2767
#if MAX_WEBGL_VERSION >= 2
2768
2768
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2769
2769
// those always when possible.
2770
2770
if ( { { { isCurrentContextWebGL2( ) } } } ) {
2771
- count && GLctx . uniform4fv ( webglGetUniformLocation ( location ) , HEAPF32 , value >> 2 , count * 4 ) ;
2771
+ count && GLctx . uniform4fv ( webglGetUniformLocation ( location ) , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 4 ) ;
2772
2772
return ;
2773
2773
}
2774
2774
#endif
@@ -2811,14 +2811,14 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2811
2811
#if GL_ASSERTIONS
2812
2812
assert ( GL . currentContext . version >= 2 ) ;
2813
2813
#endif
2814
- count && GLctx . uniformMatrix2fv ( webglGetUniformLocation ( location ) , ! ! transpose , HEAPF32 , value >> 2 , count * 4 ) ;
2814
+ count && GLctx . uniformMatrix2fv ( webglGetUniformLocation ( location ) , ! ! transpose , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 4 ) ;
2815
2815
#else
2816
2816
2817
2817
#if MAX_WEBGL_VERSION >= 2
2818
2818
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2819
2819
// those always when possible.
2820
2820
if ( { { { isCurrentContextWebGL2( ) } } } ) {
2821
- count && GLctx . uniformMatrix2fv ( webglGetUniformLocation ( location ) , ! ! transpose , HEAPF32 , value >> 2 , count * 4 ) ;
2821
+ count && GLctx . uniformMatrix2fv ( webglGetUniformLocation ( location ) , ! ! transpose , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 4 ) ;
2822
2822
return ;
2823
2823
}
2824
2824
#endif
@@ -2857,14 +2857,14 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
2857
2857
#if GL_ASSERTIONS
2858
2858
assert ( GL . currentContext . version >= 2 ) ;
2859
2859
#endif
2860
- count && GLctx . uniformMatrix3fv ( webglGetUniformLocation ( location ) , ! ! transpose , HEAPF32 , value >> 2 , count * 9 ) ;
2860
+ count && GLctx . uniformMatrix3fv ( webglGetUniformLocation ( location ) , ! ! transpose , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 9 ) ;
2861
2861
#else
2862
2862
2863
2863
#if MAX_WEBGL_VERSION >= 2
2864
2864
// WebGL 2 provides new garbage-free entry points to call to WebGL. Use
2865
2865
// those always when possible.
2866
2866
if ( { { { isCurrentContextWebGL2( ) } } } ) {
2867
- count && GLctx . uniformMatrix3fv ( webglGetUniformLocation ( location ) , ! ! transpose , HEAPF32 , value >> 2 , count * 9 ) ;
2867
+ count && GLctx . uniformMatrix3fv ( webglGetUniformLocation ( location ) , ! ! transpose , HEAPF32 , { { { getHeapOffset ( ' value' , 'float' ) } } } , count * 9 ) ;
2868
2868
return ;
2869
2869
}
2870
2870
#endif
@@ -3966,9 +3966,9 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
3966
3966
GLctx . multiDrawWebgl [ 'multiDrawArraysWEBGL' ] (
3967
3967
mode ,
3968
3968
HEAP32 ,
3969
- firsts >> 2 ,
3969
+ { { { getHeapOffset ( ' firsts' , 'i32' ) } } } ,
3970
3970
HEAP32 ,
3971
- counts >> 2 ,
3971
+ { { { getHeapOffset ( ' counts' , 'i32' ) } } } ,
3972
3972
drawcount ) ;
3973
3973
} ,
3974
3974
@@ -3978,11 +3978,11 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
3978
3978
GLctx . multiDrawWebgl [ 'multiDrawArraysInstancedWEBGL' ] (
3979
3979
mode ,
3980
3980
HEAP32 ,
3981
- firsts >> 2 ,
3981
+ { { { getHeapOffset ( ' firsts' , 'i32' ) } } } ,
3982
3982
HEAP32 ,
3983
- counts >> 2 ,
3983
+ { { { getHeapOffset ( ' counts' , 'i32' ) } } } ,
3984
3984
HEAP32 ,
3985
- instanceCounts >> 2 ,
3985
+ { { { getHeapOffset ( ' instanceCounts' , 'float' ) } } } ,
3986
3986
drawcount ) ;
3987
3987
} ,
3988
3988
@@ -4017,10 +4017,10 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
4017
4017
GLctx . multiDrawWebgl [ 'multiDrawElementsWEBGL' ] (
4018
4018
mode ,
4019
4019
HEAP32 ,
4020
- counts >> 2 ,
4020
+ { { { getHeapOffset ( ' counts' , 'float' ) } } } ,
4021
4021
type ,
4022
4022
HEAP32 ,
4023
- offsets >> 2 ,
4023
+ { { { getHeapOffset ( ' offsets' , 'float' ) } } } ,
4024
4024
drawcount ) ;
4025
4025
#if MEMORY64
4026
4026
stackRestore ( stack ) ;
@@ -4040,12 +4040,12 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
4040
4040
GLctx . multiDrawWebgl [ 'multiDrawElementsInstancedWEBGL' ] (
4041
4041
mode ,
4042
4042
HEAP32 ,
4043
- counts >> 2 ,
4043
+ { { { getHeapOffset ( ' counts' , 'float' ) } } } ,
4044
4044
type ,
4045
4045
HEAP32 ,
4046
- offsets >> 2 ,
4046
+ { { { getHeapOffset ( ' offsets' , 'float' ) } } } ,
4047
4047
HEAP32 ,
4048
- instanceCounts >> 2 ,
4048
+ { { { getHeapOffset ( ' instanceCounts' , 'float' ) } } } ,
4049
4049
drawcount ) ;
4050
4050
#if MEMORY64
4051
4051
stackRestore ( stack ) ;
0 commit comments