**
* Copyright (c) 2015 VisionStar Information Technology (Shanghai) Co., Ltd. All Rights Reserved.
* EasyAR is the registered trademark or trademark of VisionStar Information Technology (Shanghai) Co., Ltd in China
* and other countries for the augmented reality technology developed by VisionStar Information Technology (Shanghai) Co., Ltd.
*/
#import <UIKit/UIKit.h>
#import "UnityAppController.h"
// original EasyAR functions
extern "C" void ezarUnitySetGraphicsDevice(void* device, int deviceType, int eventType);
extern "C" void ezarUnityRenderEvent(int marker);
// original Mobile Movie Texture functions (add or modify the below functions)
extern "C" void MMTUnitySetGraphicsDevice(void* device, int deviceType, int eventType);
extern "C" void MMTUnityRenderEvent(int marker);
// merged functions for EasyAR and Mobile Movie Texture (add or modify the callings)
extern "C" void ezarUnitySetGraphicsDeviceMerge(void* device, int deviceType, int eventType)
{
ezarUnitySetGraphicsDevice(device, deviceType, eventType);
MMTUnitySetGraphicsDevice(device, deviceType, eventType);
}
// merged functions for EasyAR and Mobile Movie Texture (add or modify the callings)
extern "C" void ezarUnityRenderEventMerge(int marker)
{
ezarUnityRenderEvent(marker);
MMTUnityRenderEvent(marker);
}
@interface EasyARAppController : UnityAppController
{
}
- (void)shouldAttachRenderDelegate;
@end
@implementation EasyARAppController
- (void)shouldAttachRenderDelegate;
{
// register the new merged functions
UnityRegisterRenderingPlugin(&ezarUnitySetGraphicsDeviceMerge, &ezarUnityRenderEventMerge);
}
@end
IMPL_APP_CONTROLLER_SUBCLASS(EasyARAppController)