Skip to content

Commit

Permalink
v3.0.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
cuinjune committed Aug 15, 2019
1 parent dd91844 commit 31a4ede
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ofelia/examples/shader/displacementMap/displacementMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ function M.setup()
ofSetWindowTitle("displacement map")
ofEnableArbTex()
ofBackground(55)
if ofIsGLProgrammableRenderer() then
local platform = ofGetTargetPlatform()
if platform == OF_TARGET_LINUXARMV6L or platform == OF_TARGET_LINUXARMV7L or platform == OF_TARGET_ANDROID or platform == OF_TARGET_IOS or platform == OF_TARGET_EMSCRIPTEN then
shader:load(shaderDir .. "shadersES2/shader")
elseif ofIsGLProgrammableRenderer() then
shader:load(shaderDir .. "shadersGL3/shader")
else
shader:load(shaderDir .. "shadersGL2/shader")
Expand Down
5 changes: 4 additions & 1 deletion ofelia/examples/shader/simpleColorQuad/simpleColorQuad.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ end
function M.setup()
ofSetWindowTitle("simple color quad")
ofBackground(255, 255, 255, 255)
if ofIsGLProgrammableRenderer() then
local platform = ofGetTargetPlatform()
if platform == OF_TARGET_LINUXARMV6L or platform == OF_TARGET_LINUXARMV7L or platform == OF_TARGET_ANDROID or platform == OF_TARGET_IOS or platform == OF_TARGET_EMSCRIPTEN then
shader:load(shaderDir .. "shadersES2/shader")
elseif ofIsGLProgrammableRenderer() then
shader:load(shaderDir .. "shadersGL3/shader")
else
shader:load(shaderDir .. "shadersGL2/shader")
Expand Down

0 comments on commit 31a4ede

Please sign in to comment.