Everplay Integration

I was looking into integrating Everplay into my app, but I think that some of the files I need to edit for it are archived in the runtime, so I can’t access them. @Simeon - I know that Everplay is integrated into Crabitron (BTW, congrats on GCAP and YOGSCAST), so you probably know something about it. Could you help with integrating it into Codea?
Edit: The main issue is that I don’t have access to the EAGLView, because it is archived in the runtime.

I hate to do this, but I’m aiming to release my app (very) soon, so… Bump.

I see, you do have access to the GLKit view, it’s just not exposed in header files.

Try creating these additional files and including them.

Change CodeaViewController.h to:


@protocol CodeaAddon;

@class RuntimeViewController;

typedef enum CodeaViewMode
} CodeaViewMode;

@interface CodeaViewController : UIViewController

@property (nonatomic, readonly) RuntimeViewController *runtime;
@property (nonatomic, assign) CodeaViewMode viewMode;
@property (nonatomic, assign) BOOL paused;

- (void) setViewMode:(CodeaViewMode)viewMode animated:(BOOL)animated;

- (void) loadProjectAtPath:(NSString*)path;

- (void) registerAddon:(id)addon;



Create a file called `RuntimeViewController.h` in the same place as `CodeaViewController.h`. Put this in it:


@interface RuntimeViewController : GLKViewController

@property (nonatomic, strong) EAGLContext *context;
@property (nonatomic, readonly) GLKView *glView;



From there you should be able to do:


To get the necessary GL bits.

Note I haven't tested the above code, there might be errors, let me know how it goes.

@Simeon - Thanks. I’ll try it out.

@Simeon - As far as I can tell, I can’t do it. Here are the things I’d need in the runtime to be able to use Everplay:

  • Access to the frame buffer right after it was created
  • I need to know when the frame buffer is being deleted
  • I need to add some code in the middle of presentFrameBuffer

If you allowed me to subclass EAGLView, I could do the first two needs. Then, if you put glBindFramebuffer inside its own function and I could subclass it, I could do the third need.
Also, working with the runtime is like working with a magic black box. If you could document the runtime (or, of coarse, open source it), that would make my life much easier. I can always look at the old open source version, but it’s old and there’s no promise it’s up to date.

I’m going to bump this, I hope that’s alright. @Simeon - Is there any solution?

I guess the solution would be to expand the CodeaAddon functionality to call out during the beginning / middle / end of rendering. I was going to do this, but then thought no one would need it. It seems I was lacking in foresight.

@Simeon - Thanks. No worries, I’d just like to have it within the next 4 months or so.