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.

AppGameKit Studio Chat / [SOLVED] Image Flip with MemBlock - fail with Vulkan when using SetRenderToImage

Author
Message
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 22nd May 2021 19:42 Edited at: 22nd May 2021 19:44
Ok so had some fun making a mirror object here, but cannot get the image in the mirror to flip. I have a simple memblock image flipper function that works fine in other programs, but as soon as you touch the image created from CreateRenderImage the Vulkan engine throws an error when it goes to SetRenderToImage.

My initial idea was that if I could flip the image from CreateRenderImage() before it was populated and it would stick, and I wouldn't need to call the memblock image flip every frame which is a deal breaker on performance. I know this is a silly thought as the pixels are empty, but worth a try for performance. OpenGL does allow me to call the image flip function after CreateRenderImage, but my dream of it being already flipped when SetRenderToImage gets called did not pan out.

Not sure if anyone is able to make sense of this craziness? Has anyone been able to make a mirror object with a properly flipped image in real time?

The author of this post has marked a post as an answer.

Go to answer

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd May 2021 19:52
This post has been marked by the post author as the answer.
if you look at this post by by chafari it has a rear view mirror look further down it a little and its fixed to reverse the image
it works really well in real time

https://forum.thegamecreators.com/thread/223547
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 22nd May 2021 20:39
Thank you!

I had tried setting the object's UV scale to -1 but not the object's scale itself. This solves the typical mirror setup without flipping the image.

Login to post a reply

Server time is: 2024-04-20 04:40:37
Your offset time is: 2024-04-20 04:40:37