Jump to content

Render to Texture again.


Thareh
 Share

Recommended Posts

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? :)

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

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.

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

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);

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

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.

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

But still, I want to be able to get a TTexture from a buffer, and then re-use the buffer without the TTexture changing.

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...