下記は、OpenGLでES1のみ利用し、ObjectC++を有効かする際の設定メモです。
ES2Renderer.h と ES2Renderer.mを削除
EAGLView.m
//
// EAGLView.m
// particle01
//
// Created by mac on 10/08/01.
// Copyright __MyCompanyName__ 2010. All rights reserved.
//
#import "EAGLView.h"
#import "ES1Renderer.h"
// #import "ES2Renderer.h" // 削除
@implementation EAGLView
…省略
// renderer = [[ES2Renderer alloc] init]; //削除
// if (!renderer) //削除
// { // 削除
renderer = [[ES1Renderer alloc] init];
if (!renderer)
{
[self release];
return nil;
}
//} //削除
animating = FALSE;
displayLinkSupported = FALSE;
…省略
EAGLView.h
//
// EAGLView.h
// particle01
//
// Created by mac on 10/08/01.
// Copyright __MyCompanyName__ 2010. All rights reserved.
//
#import
#import
// #import "ESRenderer.h" //削除
#import "ES1Renderer.h" //追加
// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
// The view content is basically an EAGL surface you render your OpenGL scene into.
// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
@interface EAGLView : UIView
{
@private
// id renderer; //削除
ES1Renderer* renderer; //追加
BOOL animating;
BOOL displayLinkSupported;
NSInteger animationFrameInterval;
これで ES1Rendererのみ意識して作れる。
また、既存の ES1Renderer.m などの.mとなっている拡張子を.mmとしてあげればObjectC++を利用できる





