Very slow with TRILINEAR and ANISOTROPIC_2X filters

View previous topic View next topic Go down

Very slow with TRILINEAR and ANISOTROPIC_2X filters

Post  dilshod on Tue Mar 03, 2009 3:10 am

In sio2 default settings for filters are (sio2Init)

sio2->tfilter =SIO2_IMAGE_TRILINEAR;
sio2->afilter = SIO2_IMAGE_ANISOTROPIC_2X;

it's very slow for me

sio2->tfilter = SIO2_IMAGE_LINEAR; //SIO2_IMAGE_TRILINEAR;
sio2->afilter = SIO2_IMAGE_ISOTROPIC; //SIO2_IMAGE_ANISOTROPIC_2X;

I added this lines after sio2Init, and now it's ok.

dilshod

Posts : 7
Join date : 2008-12-28

View user profile

Back to top Go down

Re: Very slow with TRILINEAR and ANISOTROPIC_2X filters

Post  sio2interactive on Tue Mar 03, 2009 3:49 am

Are you using a first generation device or 2nd generation?

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Very slow with TRILINEAR and ANISOTROPIC_2X filters

Post  dilshod on Tue Mar 03, 2009 5:05 am

I'm using first generation device.

dilshod

Posts : 7
Join date : 2008-12-28

View user profile

Back to top Go down

Re: Very slow with TRILINEAR and ANISOTROPIC_2X filters

Post  sio2interactive on Tue Mar 03, 2009 6:36 am

Anisotropic 2X is not supported on first generation, the reason why its slow its probably because you fallback on software rendering... or got a s!@t load of GL_ERROR on the console Wink

Cheers,

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Very slow with TRILINEAR and ANISOTROPIC_2X filters

Post  dilshod on Tue Mar 03, 2009 6:50 am

thanks,
i can add some code for testing iphone hardware version, and turn off filters if it's running on first generation iphone.

dilshod

Posts : 7
Join date : 2008-12-28

View user profile

Back to top Go down

Re: Very slow with TRILINEAR and ANISOTROPIC_2X filters

Post  sio2interactive on Tue Mar 03, 2009 7:09 am

exactly Wink

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Very slow with TRILINEAR and ANISOTROPIC_2X filters

Post  zzajin on Fri Mar 06, 2009 6:43 pm

If anyone is looking for how to do this, I found this at ArsTechnica.


Code:
/*
 Platforms
 iPhone1,1 -> iPhone 1G
 iPhone1,2 -> iPhone 3G 
 iPod1,1  -> iPod touch 1G 
 iPod2,1  -> iPod touch 2G 
*/

   size_t size; 
   sysctlbyname("hw.machine", NULL, &size, NULL, 0); 
   char *machine = malloc(size); 
   sysctlbyname("hw.machine", machine, &size, NULL, 0); 


   NSString *platform = [NSString stringWithCString:machine]; 
   NSLog( @"platform    %@\n\n", platform);


   free(machine);

zzajin

Posts : 81
Join date : 2008-10-14

View user profile

Back to top Go down

Re: Very slow with TRILINEAR and ANISOTROPIC_2X filters

Post  sio2interactive on Tue Mar 10, 2009 8:12 pm

added Wink

tks!

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Very slow with TRILINEAR and ANISOTROPIC_2X filters

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum