Tchernobill Posted September 5, 2022 Share Posted September 5, 2022 Hi, Do you think I should continue to call getTexture within the render loop or is it worth the added work/complexity to store getTexture to minimise thoses calls. 1/ keep it simple s. function ISUICustom:render() self:drawTexture(getTexture("MyPrettyPic.png"), 0, 0, 1, 1, 1, 1); end 2/ preload getTexture function ISUICustom:render() self:drawTexture(self.texture, 0, 0, 1, 1, 1, 1); end function ISUICustom:new() self.texture = getTexture("MyPrettyPic.png"); end Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now