Skip to content

Commit

Permalink
Update image.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
xLive committed Apr 19, 2021
1 parent 06283e0 commit 36e2f91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Core/image.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ function dgsImageSetImage(image,img)
texture,textureExists = dgsImageCreateTextureExternal(image,sourceResource,texture)
if not textureExists then return false end
end
local materialSize = dgsElementData[image].materialInfo
materialSize[0] = texture
local materialInfo = dgsElementData[image].materialInfo
materialInfo[0] = texture
if isElement(texture) then
materialSize[1],materialSize[2] = dxGetMaterialSize(texture)
materialInfo[1],materialInfo[2] = dxGetMaterialSize(texture)
else
materialSize[0] = nil
materialInfo[0] = nil
end
return dgsSetData(image,"image",texture)
end
Expand Down

0 comments on commit 36e2f91

Please sign in to comment.