forked from sunglab/StarEngine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StarMain.h
101 lines (85 loc) · 3.08 KB
/
StarMain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//
// StarMain.h
//
// Created by sungwoo choi on 8/25/12.
// Copyright (c) 2012 SungLab. All rights reserved.
//
#ifndef StarEngine_Main_Header
#define StarEngine_Main_Header
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// Case IOS //////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef IOS
#import "GLView.h"
#import <UIKit/UIKit.h>
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#include <iostream>
#endif
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// Case ANDROID //////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef ANDROID
#include <jni.h>
#include <android/log.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <stdlib.h>
#include <iostream>
#include <string.h>
#define LOG_TAG "StarEngine"
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)
#endif
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// Case MAC //////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef MAC
//#import <OpenGL/OpenGL.h>
#import <OpenGL/gl3.h>
#import <OpenGL/glext.h>
//#import <OpenGL/glu.h>
#import <Cocoa/Cocoa.h>
//#import "GLView.h"
#elif _WIN32 //Windows
#include <SDL.h>
#include <GL/glew.h>
#include <SDL_opengl.h>
#include <gl/glu.h>
#include <stdio.h>
#include <string>
#include <cstdlib>
void winprintf(const char *fmt, ...);
#endif
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// OS Free ///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "./renderer/StarShader.h"
#include "./renderer/StarFBO.h"
#include "./renderer/StarTexture.h"
#include "./math/StarMath.h"
#include "./tool/StarTimer.h"
#include "./tool/StarTouch.h"
#include "./tool/StarUtil.h"
#include "./effect/StarEffect.h"
#include "./effect/StarParticle.h"
#include "./geometry/StarStructure.h"
#include "./geometry/StarOBJ.h"
#include "./geometry/StarGEO.h"
#include "./geometry/StarMesh.h"
#include "./ai/StarAnt.h"
//#include "./ui/StarButton.h"
#include "./ui/StarView.hpp"
//#include "./ui/StarBar.h"
#include "./cv/StarCV.h"
#define STRINGIFY(A) #A
#ifdef IOS
#define starLOG printf
#elif MAC
#define starLOG printf
#elif ANDROID
#define starLOG LOGE
#elif _WIN32
#define starLOG winprintf
#endif
#endif