Skip to content

Commit

Permalink
No SIMD on wasm. Do not initialize uniform gl values
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsando committed Nov 18, 2024
1 parent 1ec9dc3 commit 05ff3d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions project/toolkit/jpeg/files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<!-- nasm on mac x64 generate a whole lot of warning messages. Nice just to skip it? -->
<set name="JPEG_SUPPRESS_SIMD" value="1" if="macos HXCPP_M64 NME_STATIC_LINK" unless="NME_NOISY_SIMD" />
<set name="JPEG_SUPPRESS_SIMD" value="1" if="wasm" />


<files id="native-toolkit-jpeg-depends" >
Expand Down
3 changes: 2 additions & 1 deletion src/nme/gl/ProgramTPosUniformCol.hx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ProgramTPosUniformCol extends ProgramBase

var fragShader =
#if !desktop 'precision mediump float;' + #end
"uniform vec4 col = vec4(1.0, 0.0, 0.0, 1.0);" +
"uniform vec4 col;" +
"void main() {" +
"gl_FragColor = col;"+
"}";
Expand All @@ -74,6 +74,7 @@ class ProgramTPosUniformCol extends ProgramBase
GL.drawArrays(primType, 0, primCount);

GL.disableVertexAttribArray(posLocation);
GL.bindBuffer(GL.ARRAY_BUFFER, null);
}


Expand Down

0 comments on commit 05ff3d7

Please sign in to comment.