Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / What does a Render Target do when it's not doing anything?

Author
Message
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 20th Jan 2013 00:32 Edited at: 20th Jan 2013 00:33
The question is the title. I was thinking, if I set up every image as a render target via ImageKit. What does that render target do when it's not being manipulated? What makes it different from a standard image when nothing is being rendered to it?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Jan 2013 02:00
A render target is held in VRAM, isn't it? So to answer your question, it just uses up GPU memory.

TheComet

http://blankflankstudios.tumblr.com/
Quote: ""
- Randomness 128
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Jan 2013 02:51
I'm guessing it locks the buffer for quicker read/write access, but that's just a guess.

"You're not going crazy. You're going sane in a crazy world!" ~Tick
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 20th Jan 2013 10:50 Edited at: 20th Jan 2013 10:59
Render Targets make image editing a breeze, especially when it comes to alpha. But other methods are no where near as efficient. But I was thinking, even if I was just using them for pre-rendering then just pasting the images when I need them, what resources would they take up? Every where I look isn't clear about this.

Side Question: How do you find out how much memory an image created in DBP takes up? Cause I store loads of text in tiny images and I mean LOADS (only for editors)
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Jan 2013 18:56
A render target is a fancy name for a block of memory on in VRAM. What is a Render Target?

It is a bad idea to load all of your images as render targets if you are not going to use them for anything rendering-related (shaders or backbuffer manipulation). You should only use a render target if absolutely required, otherwise loading the image into RAM is enough.

Render targets cannot be copied into RAM, which means you cannot copy a render target into a normal image, or make a memblock from a render target, or anything like that.

TheComet

http://blankflankstudios.tumblr.com/
Quote: ""
- Randomness 128
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 20th Jan 2013 19:47 Edited at: 20th Jan 2013 19:48
Aha got ya. It's kind of annoying though, cause the sheer amount of gui pre-renders required for my editor is massive, mainly text which is a pain to do efficiently. Alpha elements is also a pain aswell!

Login to post a reply

Server time is: 2026-07-07 00:49:04
Your offset time is: 2026-07-07 00:49:04