dugasz1 Posted April 30, 2017 Share Posted April 30, 2017 (edited) Hello guys. First question: local width = 1024 local height = 256 local target = dxCreateRenderTarget ( width, height, true) So, i created a 1024*256 render target with alpha. But get dxGetStatus() says i used 2mb of video ram. Why? I guess an rgba color takes 4 byte. 1024*256 = 262144 pixel 262144 * 4 byte = 1048576 byte 1048576 / 1024 = 1024 kb 1024 / 1024 = 1 mb (Am i missed something?) So it should be 1 mb but it 2 mb so render targets uses double buffering? And if yes can i disable this, somehow? Because i only draw my render target once then use it forever. So it's just take my vram for nothing. Second question: What is exactly streaming memory? I mean is it the video memory? And what is the problem with it? SA doesn't manage it good enough and if i use too much modell in the same place then the video memory will be full then crash or wierd things happen? Edited April 30, 2017 by dugasz1 Link to comment
NeXuS™ Posted May 1, 2017 Share Posted May 1, 2017 (edited) I think it's 2 mb because of the alpha layer. Edited May 1, 2017 by NeXuS™ Link to comment
dugasz1 Posted May 1, 2017 Author Share Posted May 1, 2017 This is why i calculated with 4 byte(rgba) instead of 3 (rgb). Or am i wrong? Link to comment
3aGl3 Posted May 1, 2017 Share Posted May 1, 2017 You are totally correct. An image with those dimensions is 1MB in size. No idea why MTA uses 2MB to save it to RAM...maybe it has mip maps...? Link to comment
dugasz1 Posted May 1, 2017 Author Share Posted May 1, 2017 Hmm good idea might be cause of that. I should check with more values is it always twice as big as it should be. 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