SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
ViewController.mm File Reference
#import <ViewController.h>
#import <CoreMotion/CoreMotion.h>
#include <Utils.h>
#include <Utils_iOS.h>
#include <SLAssetManager.h>
#include <SLInterface.h>
#include <SLAssetLoader.h>
#include <CVCapture.h>
#include <AppCommon.h>
#include <App.h>
#include <mach/mach_time.h>
#import <sys/utsname.h>
#import <mach-o/arch.h>
Include dependency graph for ViewController.mm:

Go to the source code of this file.

Functions

float GetSeconds ()
 
SLbool onPaintRTGL ()
 

Variables

GLKView * myView = 0
 
int svIndex = 0
 
float screenScale = 1.0f
 

Function Documentation

◆ GetSeconds()

float GetSeconds ( )

Returns the absolute time in seconds since the system started. It is based on a CPU clock counter.

Definition at line 60 of file ViewController.mm.

61 {
62  static mach_timebase_info_data_t info;
63  mach_timebase_info(&info);
64  uint64_t now = mach_absolute_time();
65  now *= info.numer;
66  now /= info.denom;
67  double sec = (double)now / 1000000000.0;
68  return (float)sec;
69 }

◆ onPaintRTGL()

SLbool onPaintRTGL ( )

Definition at line 49 of file ViewController.mm.

50 {
51  [myView display];
52  return true;
53 }
GLKView * myView

Variable Documentation

◆ myView

GLKView* myView = 0

Definition at line 39 of file ViewController.mm.

◆ screenScale

float screenScale = 1.0f

Definition at line 45 of file ViewController.mm.

◆ svIndex

int svIndex = 0

Definition at line 42 of file ViewController.mm.