WIP OSX and TvOS support

This commit is contained in:
2016-01-30 20:13:23 -08:00
parent 3913345a28
commit f356df178f
48 changed files with 1185 additions and 269 deletions

40
kraken/KRContext_ios.mm Normal file
View File

@@ -0,0 +1,40 @@
//
// KRContext-ios.mm
// Kraken
//
// Created by Kearwood Gilbert on 11/1/2013.
// Copyright (c) 2013 Kearwood Software. All rights reserved.
//
#include "KREngine-common.h"
#include "KRContext.h"
EAGLContext *gStreamerContext = nil;
EAGLContext *gRenderContext = nil;
void KRContext::destroyDeviceContexts()
{
[gStreamerContext release];
[gRenderContext release];
}
void KRContext::createDeviceContexts()
{
gRenderContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
gStreamerContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2 sharegroup: gStreamerContext.sharegroup];
// FIXME: need to add code check for iOS 7 and also this appears to cause crashing
//gTextureStreamerContext.multiThreaded = TRUE;
}
void KRContext::activateStreamerContext()
{
[EAGLContext setCurrentContext: gStreamerContext];
}
void KRContext::activateRenderContext()
{
[EAGLContext setCurrentContext: gRenderContext];
}