Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Max texture size... — Gideros Forum

Max texture size...

SinisterSoftSinisterSoft Maintainer
edited December 2014 in General questions
Is there any way using Gideros to find the maximum texture for a device? Will the texture simply fail to load?

Using the autoscaling, if I have a 1k x 1k texture with a 2k x 2k copy, will it use the 1k version if the 2k version doesn't load because the texture is too big?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
https://deluxepixel.com

Comments

  • Unfortunately not, it won't., it will use tha large copy which can't be loaded.
    And thus my question would be:
    Is there any way without Gideros to find the maximum texture for a device? :)

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
  • Canvas.getMaximumBitmapWidth() and Canvas.getMaximumBitmapHeight().

    or/and

    int[] maxTextureSize = new int[1];
    gl.glGetIntegerv(GL10.GL_MAX_TEXTURE_SIZE, maxTextureSize, 0);

    I think the image scale system should not bother loading a scaled image if that image is too large for the current hardware's max texture size - it should fall back to a smaller size (the largest that will fit). If it eventually does fail then the result code for the load should reflect this so the program can exit gracefully.

    and/or

    if the load fails because the scaled image is too high to fit in memory then there should be a way to load an image and force the scaling to be disabled for that load.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
Sign In or Register to comment.