RSS

(root)/iphone/common : 65 : source/NSObject_DeviceDetection.m

To get this branch, use:
bzr branch /browse/iphone/common

« back to all changes in this revision

Viewing changes to source/NSObject_DeviceDetection.m

Dömötör Gulyás
2010-07-04 17:06:19
Revision ID: dognotdog@gmail.com-20100704150619-3vjoon64s20bvxxw
improved device detection; adds CGPosition animation; adds GLString classes

Show diffs side-by-side

added added

removed removed

29
29
        #endif
30
30
}
31
31
 
 
32
static uint32_t nextPot(uint32_t v)
 
33
{
 
34
        v--;
 
35
        v |= v >> 1;
 
36
        v |= v >> 2;
 
37
        v |= v >> 4;
 
38
        v |= v >> 8;
 
39
        v |= v >> 16;
 
40
        v++;
 
41
return v;
 
42
}
 
43
 
 
44
- (uint32_t) fullScreenTexturePotSize
 
45
{
 
46
 
 
47
        CGSize size = [UIScreen mainScreen].currentMode.size;
 
48
        uint32_t px = fmaxf(size.width,size.height);
 
49
        return nextPot(px);
 
50
        
 
51
}
 
52
 
32
53
@end
33
54
 

Loggerhead 1.17 is a web-based interface for Bazaar branches