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.

Newcomers AppGameKit Corner / SetRenderToImage to render (depth buffer)

Author
Message
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 10th Feb 2016 00:11
Has anyone successfully used SetRenderToImage to render a depth buffer (ie. to an image that was previously created by a CreateRenderImage setting the appropriate flag) in version 2.0.16 and can provide a small example?
With all my attempts using SetRenderToImage(0, DepthImageID), I get no depth information at all.
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 10th Feb 2016 18:33
This is a bit of code that the developer Paul helped me with for an app I made called Doodle Draw.
Might help you out. The link is below too.




Check out the link for Doodle Draw here to see how it got to this:

https://forum.thegamecreators.com/thread/214589
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 10th Feb 2016 20:50
Thank you for taking the time to look into this. Alas I'm struggling with the depth buffer (the second parameter of SetRenderToImage). I just can't get any useful depth information out of it; in fact it seems to always return the maximum value for all texels. The image rendering itself works for me.

Login to post a reply

Server time is: 2024-03-29 05:46:41
Your offset time is: 2024-03-29 05:46:41