g4tools  5.4.0
Functions
tools::device Namespace Reference

Functions

bool is_iOS ()
 
bool is_Android ()
 
bool is_emscripten ()
 
bool small_screen ()
 
bool stop_app_button ()
 
bool slow_cpu ()
 
unsigned int tex_mem_limit ()
 

Function Documentation

◆ is_Android()

bool tools::device::is_Android ( )
inline

Definition at line 43 of file platform.

43 {return false;}

◆ is_emscripten()

bool tools::device::is_emscripten ( )
inline

Definition at line 49 of file platform.

49 {return false;}

◆ is_iOS()

bool tools::device::is_iOS ( )
inline

Definition at line 37 of file platform.

37 {return false;}

◆ slow_cpu()

bool tools::device::slow_cpu ( )
inline

Definition at line 69 of file platform.

69 {return false;}

◆ small_screen()

bool tools::device::small_screen ( )
inline

Definition at line 62 of file platform.

62 {return false;}

◆ stop_app_button()

bool tools::device::stop_app_button ( )
inline

Definition at line 64 of file platform.

64 {return false;}

◆ tex_mem_limit()

unsigned int tools::device::tex_mem_limit ( )
inline

Definition at line 72 of file platform.

72  {
73  // glGet(GL_MAX_TEXTURE_SIZE) :
74  // MacBookPro : it returns 8192.
75  // SGS : it returns 2048.
76  // iPad1 : it returns 2048.
77  // iPod : it returns ?
78  // Nexus 10 : it returns ?
79 
80  // 1024*1024 //*3 = 3 145 728
81  // 2048*2048 //*3 = 12 582 912
82  // 4096*4096 //*3 = 50 331 648
83  // 8192*8192 //*3 = 201 326 592
84  // 8192*4096 //*3 = 100 663 296
85  if(small_screen()) {
86  //iOS : Apple says that max 2D tex size is 1024*1024 with two units
87  // texture available. From doc on PowerVR MBX.
88  return 2048*2048*3;
89  } else {
90  //limit = 4096*4096*3; //=8192*2048 //permit to pass ATLAS big image.
91  //permit to pass fete_science_2010/power2/image_0.jpg
92  return 8192*4096*3; //100663296
93  }
94 }
tools::device::small_screen
bool small_screen()
Definition: platform:62