ImageSet does not detect that the base texture has been scaled.

Create issue
Issue #45 resolved
Former user created an issue

Automatic migration. Original reporter: "lindquist"

This makes it impossible to use non pow2 textures except for the full_image version.

We can scale the texture coords from the imageset xml and account for it.

or maybe throw an exception?

Reproducibility: always

Comments (1)

  1. Former user Account Deleted

    Original reporter: Dalfy

    I added five functions to the texture object :

    getOriginalWidth() : This function can be redefined in renderer to report the initial with of the image getOriginalHeight(): This function can be redefined in renderer to report the inital height of the image

    updateScales() : This function have to be called after each texture loading in order to update the scales cached in the texture. This is mainly done within loadFrom ... files ?

    getXScale() : Used in the imageset to computes pixels in the width getYScale() : Used in the imageset to computes pixels in the height

    The image set now take in account the scaling applyed while loading the texture if the renderer redefines the getOriginalXXX() function and call updateScales. You can check Irrlicht renderer to see this feature in action.

    I considered this issue resolved cause its now a problem of each renderer. At the moment renderer status is : IrrlichtRenderer: Support Texture scaling OpenGLGUIRenderer: No texture scaling in openGL so its not needed

  2. Log in to comment