Images loading regardless of if you use loadimage?
-
I seem to have discovered a bug (or is it a feature?) whilst working on a game.
I noticed my game was taking longer and longer to run when I pressed + or even pressed - to leave the editor.I did some testing and it seems to me that Fuze is loading images even if you don't tell it to do so?
Repeatable example:-
Create a new project, only put the following codeloop
clear()
printat(0,0,"Working...")
update()
repeatNow press + and it'll show the text instantly.
Now open the image editor, create a single sprite 1920x1080, just make it anything(not blank) and then copy this image twice, so you have three images.
Now return to your code and press +
all of a sudden it takes like 4 seconds to display "Working.." and you are not loading the images at all..
bug or not?
-
A very good question - probably need someone like @Luke to let us know if this is a side effect of the way things work internally.
-
This one is identified and is being addressed!
-
Thanks Dave, you're a gem.
-
Is there a size limit to images created with createImage()?
My attempts to make images with a height greater than 1080 are meeting with complications.
Imageh() returns the defined height but the images themselves are truncated at a height of 1080. -
@Gothon said in Texture mapping:
These are some good questions @Spacemario
- What are the current limitations to your approach? For instance, limits on texture or surface size?
The largest image buffer I can create with createImage() has the same dimensions as the docked screen (1920x1080). And I can make several of them, I don't know what the max is. The bottleneck is more on the geometry side since I am processing the vertices in the FUZE interpreter. I can actually get over 1000 calls to drawQuad() into a frame but only if there is 0 computation (everything is pre-computed). I only fully rotate a small number of corner vertices, and calculate the rest of vertex positions using lerp() at the moment.
(link to post)So it seems the limit of
createImage
currently is indeed the screen resolution :) -
@DomDom I raised this issue and it has been fixed in a future update. I will be testing the fix tonight hopefully. You beat me to it, i wanted to test it before reporting back about it.
-
So, this thread has two issues in it - but the one about creating images larger than the screen size is corrected in the next version. More specifically, the concept of being able to create an image that is 720 x 1280 (so vertical) and use native co-ordinates on it, then during the final render you rotate it and offset it giving you the ability to rotate the switch into vertical mode. That will be perfectly do-able in the next release.