LoPollo Posted November 26, 2016 Share Posted November 26, 2016 (edited) Nice, but do you free up the memory? I mean continuing loading the shaders without destroying them. Check performanceBrowser (if running) in the web server of you MTA server after switching on/off some times. Edited November 26, 2016 by LoPollo Link to comment
koragg Posted November 26, 2016 Author Share Posted November 26, 2016 3 minutes ago, LoPollo said: Nice, but do you free up the memory? I mean continuing loading the shaders without destroying them. Check performanceBrowser (if running) in the web server of you MTA server after switching on/off some times. As far as I know it loads them just once when I click the checkbox, not non-stop (onClientRender-ish style ). I also didn't get any lag but I'll test tomorrow with a real player other than me and will check the load if he experiences lag. Link to comment
LoPollo Posted November 27, 2016 Share Posted November 27, 2016 (edited) Loading something in render means that the load happens about 36 times (default fps cap), in one minute there will be 2.160 elements loaded. Loading them when switching means that probably the shaders will get loaded 0-4 times per GAME... but if you get crazy and spam the switch, how many objects will be loaded? While in a case like the render one it's critical, in you case is more like a "right" thing to do After spamming a bit, how many elements are owned by your resource (in performanceBrowser)? EDIT: i also noticed that you are destroying in unloadTile the vars tile.shader and tile.texture... but i can't find where they are created. Also you are not destroying the shaders in the shaders table. Is it possible that the problem was partially caused by that? Edited November 27, 2016 by LoPollo 1 Link to comment
koragg Posted November 27, 2016 Author Share Posted November 27, 2016 5 hours ago, LoPollo said: Loading something in render means that the load happens about 36 times (default fps cap), in one minute there will be 2.160 elements loaded. Loading them when switching means that probably the shaders will get loaded 0-4 times per GAME... but if you get crazy and spam the switch, how many objects will be loaded? While in a case like the render one it's critical, in you case is more like a "right" thing to do After spamming a bit, how many elements are owned by your resource (in performanceBrowser)? EDIT: i also noticed that you are destroying in unloadTile the vars tile.shader and tile.texture... but i can't find where they are created. Also you are not destroying the shaders in the shaders table. Is it possible that the problem was partially caused by that? I have no idea but now it works I'll answer your questions in the coming days as now i just wanna play mta after a hard maths test lol Link to comment
koragg Posted November 28, 2016 Author Share Posted November 28, 2016 (edited) So @LoPollo, I can't use performanceBrowser My connection always times out. Anyway : Edited November 28, 2016 by koragg bugs -.- Link to comment
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