Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / getImageWidth and getImageHeight don't answer good values ?

Author
Message
pprem
11
Years of Service
User Offline
Joined: 14th Jun 2012
Location: Paris, France
Posted: 6th Oct 2013 23:47
Hi

I have a background image of 2318x1594px

I load it and copy the part I need to use depending on device size.

For my PC on Windows, it's good in window and full screen mode.

On a Mac and iOS devices, the picture is truncated !

On iOS (iPad, iPod Touch and iPhone), the size is 579x398 after LoadImage.

On Mac OS (iMac and Mac Book Pro), its size is 1159x797.

Why AppGameKit don't load the image correctly ?

I'm using AppGameKit 108b19

--
Patrick P.
http://www.gamolf.fr
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 6th Oct 2013 23:53
Are you using the default percentage system? Try using SetVirtualResolution(). Also, not all devices can use images that large. Not sure what happens in that case, your problem could be related to that. 1024x1024 is the recommended maximum size for mobile devices. Not all graphics cards can handle images larger than 2048x2048 either.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 7th Oct 2013 00:19 Edited at: 7th Oct 2013 00:19
maybe try this command and use power of 2 size textures.
SetResolutionMode( mode )
1 to use a high (native) resolution
0 to use a low (scaled) resolution
pprem
11
Years of Service
User Offline
Joined: 14th Jun 2012
Location: Paris, France
Posted: 7th Oct 2013 10:09
I'm using pixel mode et tried the two SetResolutionMode. Same problem.

I think it's a limit with graphic library. On mobile devices like iPhone or iPod Touch, I can understand, but why Mac and Windows don't have same capabilities ?

--
Patrick P.
http://www.gamolf.fr
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 7th Oct 2013 13:52
then maybe you are over the max. size limit that the graphics card can handle. else i would also expect the original image size
at native resolution mode.

there exist also a SetIntendedDeviceSize( width, height ) func.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 7th Oct 2013 14:51
It's not an OS problem. I would guess that your Mac can't handle an image larger than 2048x2048, due to limits in the graphics hardware.

JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 7th Oct 2013 14:53
It depends on the Open GL drivers.

-- Jim - When is there going to be a release?
pprem
11
Years of Service
User Offline
Joined: 14th Jun 2012
Location: Paris, France
Posted: 7th Oct 2013 21:46
Quote: "It's not an OS problem. I would guess that your Mac can't handle an image larger than 2048x2048, due to limits in the graphics hardware."


on the Mac Book Pro Retina, I have don't think it's the hardware limits

Quote: "It depends on the Open GL drivers."


I suppose we can't change it in AppGameKit interpreter without having bad surprises ?

So, if TGC can do it with AppGameKit 2, it would be great.

--
Patrick P.
http://www.gamolf.fr
NoUJoe
10
Years of Service
User Offline
Joined: 8th Jul 2013
Location:
Posted: 8th Oct 2013 06:26
Sorry if I'm being stupid, but I don't get the "it's too large for the graphics card to handle" part. Surely if you can open an image larger than 2048 x 2048 normally, as in just opening a jpeg in a folder on your computer. Then why is this not possible in a game? Is it a forced limitation due to the fact that a game will obviously load many images?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 8th Oct 2013 08:44
It's Open GL - it treats all images as textures, and imposes a limit. This frequently 1024x1024, but will be 2048x2048 on some systems. As far as I can see the max is 2048x2048 on a Macbook, and must be a power of two.

-- Jim - When is there going to be a release?

Login to post a reply

Server time is: 2024-05-07 09:05:18
Your offset time is: 2024-05-07 09:05:18