diff --git a/C++ProjectTemplate.wasm b/C++ProjectTemplate.wasm index 10504f6..64780fc 100755 Binary files a/C++ProjectTemplate.wasm and b/C++ProjectTemplate.wasm differ diff --git a/main.cpp b/main.cpp index 458c7a7..1d6e7fd 100644 --- a/main.cpp +++ b/main.cpp @@ -8,7 +8,7 @@ using namespace olc; class Example : public olc::PixelGameEngine { - + float lastIncrease=0.f; public: Example() @@ -20,21 +20,29 @@ public: olc::Key last; bool OnUserCreate() override { - std::cout<<"Test"< vDroppedFilesCache; olc::vi2d vDroppedFilesPoint; olc::vi2d vDroppedFilesPointCache; + uint8_t mosaic=0; // Command Console Specific bool bConsoleShow = false; @@ -3588,6 +3592,13 @@ namespace olc bool PixelGameEngine::IsTextEntryEnabled() const { return bTextEntryEnable; } + const uint8_t PixelGameEngine::GetMosaicEffect()const{ + return mosaic; + } + void PixelGameEngine::SetMosaicEffect(uint8_t effectLevel){ + mosaic=effectLevel; + } + void PixelGameEngine::UpdateTextEntry() { @@ -4963,7 +4974,7 @@ namespace olc glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); locUseProgram(m_nQuadShader); GLint myUniformLocation = glGetUniformLocation(m_nQuadShader, "mosaic"); - glUniform1i(myUniformLocation,0); + glUniform1i(myUniformLocation,ptrPGE->GetMosaicEffect()); locBindVertexArray(m_vaQuad); #if defined(OLC_PLATFORM_EMSCRIPTEN) diff --git a/pixelGameEngine_wasm.o b/pixelGameEngine_wasm.o index d75e11f..1ca05aa 100644 Binary files a/pixelGameEngine_wasm.o and b/pixelGameEngine_wasm.o differ