Thareh Posted April 28, 2010 Share Posted April 28, 2010 Hi! Seems like 'GetColorBuffer' isn't very good to use when rendering to a texture since it changes with the buffer even after you've used 'GetColorBuffer'. (Which also means that all the buffers I've used to render to texture probably doesn't get freed aswell) I want a static function that saves the current state of the buffer, and doesn't change even if the buffer changes after the command. Is there anything like this in LE? Quote Core2Duo, 3.33GHz, Radeon HD 5850 Black Edition, 4GB RAM, 4 TB HDD, Windows 7. Core2Duo, 2.00GHz, Geforce 9500m, 4GB RAM, 320 GB HDD, Windows 7. Link to comment Share on other sites More sharing options...
Thareh Posted April 28, 2010 Author Share Posted April 28, 2010 I've tried all logical ways of doing this, such as: LoadTexture( GetColorBuffer( Buffer ) ) LoadTexture( Buffer ) LoadTexture( SaveBuffer( Buffer ) ) etc. Still can't get the TTexture to "unlink" from the buffer. Quote Core2Duo, 3.33GHz, Radeon HD 5850 Black Edition, 4GB RAM, 4 TB HDD, Windows 7. Core2Duo, 2.00GHz, Geforce 9500m, 4GB RAM, 320 GB HDD, Windows 7. Link to comment Share on other sites More sharing options...
DaDonik Posted April 29, 2010 Share Posted April 29, 2010 Dunno if i understood you correctly, but that is how i save the current backbuffer, when switching in pause mode: TTexture TeLastRenderBeforePause = NULL; TBuffer TempBuffer = CreateBuffer (GraphicsWidth (), GraphicsHeight (), BUFFER_COLOR0); CopyBuffer (BackBuffer (), TempBuffer, BUFFER_COLOR0); TexLastRenderBeforePause = GetColorBuffer (TempBuffer, 0); FreeBuffer (TempBuffer); Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Thareh Posted April 29, 2010 Author Share Posted April 29, 2010 The problem might be that I can't free a buffer since I'm using BlitzMax. There's no FreeBuffer command, so I just nullify it and hope for the best. Quote Core2Duo, 3.33GHz, Radeon HD 5850 Black Edition, 4GB RAM, 4 TB HDD, Windows 7. Core2Duo, 2.00GHz, Geforce 9500m, 4GB RAM, 320 GB HDD, Windows 7. Link to comment Share on other sites More sharing options...
Thareh Posted April 29, 2010 Author Share Posted April 29, 2010 But still, I want to be able to get a TTexture from a buffer, and then re-use the buffer without the TTexture changing. Quote Core2Duo, 3.33GHz, Radeon HD 5850 Black Edition, 4GB RAM, 4 TB HDD, Windows 7. Core2Duo, 2.00GHz, Geforce 9500m, 4GB RAM, 320 GB HDD, Windows 7. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.