Resolved linker errors, now able to cross-compile the OSX framework and iOS library from the same source

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4016
This commit is contained in:
kearwood
2012-03-15 23:58:37 +00:00
parent bb38ede18e
commit d43989cd88
21 changed files with 95 additions and 58 deletions

View File

@@ -33,6 +33,7 @@
#ifndef KRBOUNDINGVOLUME_H
#define KRBOUNDINGVOLUME_H
#import "KREngine-common.h"
#import "KRVector3.h"
#import "KRMat4.h"

View File

@@ -32,6 +32,8 @@
#ifndef KRCAMERA_H
#define KRCAMERA_H
#import "KREngine-common.h"
#import "KRMat4.h"
class KRCamera {

View File

@@ -0,0 +1,35 @@
//
// KREngine-common.h
// KREngine
//
// Created by Kearwood Gilbert on 12-03-15.
// Copyright (c) 2012 Kearwood Software. All rights reserved.
//
#ifndef KREngine_KREngine_common_h
#define KREngine_KREngine_common_h
#import <stdint.h>
#import <vector>
#import <string>
#ifdef __APPLE__
#include "TargetConditionals.h"
#endif
#if TARGET_OS_IPHONE
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#else
#import <OpenGL/gl.h>
#import <OpenGL/glext.h>
#endif
#endif

View File

@@ -29,9 +29,6 @@
// or implied, of Kearwood Gilbert.
//
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
// #import "KRTextureManager.h"
#import <map>
#import "KRMat4.h"
@@ -44,6 +41,8 @@
#import "KRModelManager.h"
#import "KRCamera.h"
#import "KREngine-common.h"
typedef enum KREngineParameterType {KRENGINE_PARAMETER_INT, KRENGINE_PARAMETER_FLOAT, KRENGINE_PARAMETER_BOOL} KREngineParameterType;
#define KRENGINE_MAX_SHADOW_BUFFERS 3

View File

@@ -36,8 +36,7 @@
#import "KRInstance.h"
#import "KRCamera.h"
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import "KREngine-common.h"
#ifndef KRINSTANCE_H
#define KRINSTANCE_H

View File

@@ -29,11 +29,11 @@
// or implied, of Kearwood Gilbert.
//
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import "KRVector3.h"
#import "KREngine-common.h"
#ifndef KRMAT4_I
#define KRMAT4_I

View File

@@ -29,12 +29,12 @@
// or implied, of Kearwood Gilbert.
//
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import <stdint.h>
#import <list>
#import <string>
#import "KREngine-common.h"
using std::list;
#ifndef KRMATERIAL_H

View File

@@ -32,6 +32,9 @@
#ifndef KRMATERIALMANAGER_H
#define KRMATERIALMANAGER_H
#import "KREngine-common.h"
#include "KRMaterial.h"
#include "KRTextureManager.h"

View File

@@ -29,11 +29,8 @@
// or implied, of Kearwood Gilbert.
//
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import <stdint.h>
#import <vector>
#import <string>
#import "KREngine-common.h"
#define MAX_VBO_SIZE 65535
// MAX_VBO_SIZE must be divisible by 3 so triangles aren't split across VBO objects...
@@ -43,8 +40,6 @@
#ifndef KREngine_KRMesh_h
#define KREngine_KRMesh_h
using std::vector;
class KRMesh {

View File

@@ -28,15 +28,14 @@
// authors and should not be interpreted as representing official policies, either expressed
// or implied, of Kearwood Gilbert.
//
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import <stdint.h>
#import <vector>
#import <set>
#import <string>
#import "KRMesh.h"
#import "KREngine-common.h"
using std::vector;
using std::set;

View File

@@ -32,6 +32,8 @@
#ifndef KRMODELMANAGER_H
#define KRMODELMANAGER_H
#import "KREngine-common.h"
#include "KRModel.h"
#include <map>

View File

@@ -32,6 +32,8 @@
#ifndef KRSCENE_H
#define KRSCENE_H
#import "KREngine-common.h"
#import <vector>
#import "KRInstance.h"
#import "KRBoundingVolume.h"

View File

@@ -168,7 +168,7 @@ void KRShader::bind(KRCamera *pCamera, KRMat4 &mvpMatrix, KRVector3 &cameraPosit
glUniform1i(m_uniforms[KRENGINE_UNIFORM_SHADOWTEXTURE3], 5);
#if defined(DEBUG)
GLint logLength, status;
GLint logLength;
glValidateProgram(m_iProgram);
glGetProgramiv(m_iProgram, GL_INFO_LOG_LENGTH, &logLength);

View File

@@ -29,12 +29,12 @@
// or implied, of Kearwood Gilbert.
//
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import <stdint.h>
#import <vector>
#import <string>
#import "KREngine-common.h"
using std::vector;
#ifndef KRSHADER_H

View File

@@ -29,8 +29,6 @@
// or implied, of Kearwood Gilbert.
//
#import <OpenGLES/ES2/gl.h>
#import <OpenGLES/ES2/glext.h>
#import <stdint.h>
#import <vector>
#import <map>

View File

@@ -29,12 +29,12 @@
// or implied, of Kearwood Gilbert.
//
#import <OpenGLES/ES1/gl.h>
#import <OpenGLES/ES1/glext.h>
#import <stdint.h>
#import <list>
#import <string>
#import "KREngine-common.h"
using std::list;
#ifndef KRTEXTURE_H

View File

@@ -33,6 +33,8 @@
#define KRVECTOR3
#include <math.h>
#import "KREngine-common.h"
class KRVector3
{
@@ -41,7 +43,7 @@ public:
//default constructor
KRVector3(float X = 0, float Y = 0, float Z = 0);
KRVector3(float X, float Y, float Z);
KRVector3();
~KRVector3();