We have moved to a new Sailfish OS Forum. Please start new discussions there.

Image and texture size limit

asked 2018-02-24 13:13:50 +0300

Alex gravatar image

updated 2018-02-25 16:20:03 +0300

Since different hardware has different limits for the size of images and textures I am looking for a method to determine this limits. With 'texture size limit' I mean the actually supported dimensions an image/texture can have so that the device's hardware (GPU) and software is able to render it.

So for example some devices are supporting 1024x1024 textures and other support 4096x4096 textures.

So I have two questions regarding the texture size limit in Sailfish OS:

  1. What are the texture size limits for the currently available devices?
  2. Is there a Qt or Sailfish OS function to dynamically determine the image size (and/or dimensions) limit of the current device the app is running on? And is this way of determination compatible with Jolla Harbour?
    • If there is no such way: Do I need to hardcode the size limits for all devices? And if yes: How to determine the current device type (on a Harbour compatible way)?
edit retag flag offensive close delete

2 Answers

Sort by » oldest newest most voted

answered 2018-04-01 01:13:02 +0300

Alex gravatar image

Well I suppose the answer to my question would be the GL_MAX_TEXTURE_SIZE macro, but unfortunately it seems that it is not working on Sailfish OS.

It will give me the value 3379 for the Jolla Phone, the Jolla Tablet and also inside the emulator so maybe it is just hardcoded...

edit flag offensive delete publish link more

answered 2018-04-01 05:47:39 +0300

tortoisedoc gravatar image


edit flag offensive delete publish link more


@tortoisedoc So at what do you want to point me at with this link? :D

Alex ( 2018-04-01 14:34:37 +0300 )edit

@Alex really not anywhere to. But following the advice from above, the format of the result you are getting seems perfectly legal. Is it valid? I have no idea. The biggest texture size on Jolla seems to be 3379x3379, thats an "uncommon" size to say the least.

tortoisedoc ( 2018-04-02 22:44:09 +0300 )edit
Login/Signup to Answer

Question tools

1 follower


Asked: 2018-02-24 13:13:50 +0300

Seen: 346 times

Last updated: Apr 01 '18