TTexture problem with size and aspect ratio.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

TTexture problem with size and aspect ratio.

rogerther
Hello all.

I’m importing a project from croquet 1.0 beta to croquet 1.0.18 and all
textures are appearing in a small frame rather then in their original size and
aspect ratio. This problem was not occurring with the previous version.
I’m using the following code.

pic := TTexture new initializeWithFileName: afile
mipmap: true
        shrinkFit: false.

I have compared both class and didn’t found anything that could cause this
problem.

Any tips to import textures in their original size and aspect ratio?

Thanks all.
Reply | Threaded
Open this post in threaded view
|

TTexture problem with size and aspect ratio.

rogerther
I guess I found the problem.

It is necessary to implicit specify the scale.
Now the cod looks likes this:

pic := TTexture new initializeWithFileName: afile
     mipmap: true
     shrinkFit: false.
pic scale: 1.

It is a little strange since the previous version this was not necessary.
Maybe this is just a workaround or maybe this is the new way to create TTexture
objects.

Thanks all.