Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6700605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:50:04+00:00 2026-05-26T06:50:04+00:00

Trying to get Cocos2D and openFrameworks to play nicely together on iOS . Both

  • 0

Trying to get Cocos2D and openFrameworks to play nicely together on iOS. Both want to use GL / EAGLview, and of course they can’t just both do glView = [[EAGLView alloc] init] because you can’t have two root views. One has to init and the other one needs to have its glView pointer assigned to the other. What I’m doing right now:

#ifdef __COCOS2D__
  glView = [[CCDirector sharedDirector] openGLView];
#else // this is the standard openFrameworks GL init code
    glView = [[EAGLView alloc] initWithFrame:screenBounds andDepth:iPhoneGetOFWindow()->isDepthEnabled() andAA:iPhoneGetOFWindow()->isAntiAliasingEnabled() andNumSamples:iPhoneGetOFWindow()->getAntiAliasingSampleCount() andRetina:iPhoneGetOFWindow()->isRetinaSupported()];

And it gives me a black screen if I #define __COCOS2D__.

Where can I learn what I need to know about EAGLView in order to init it in a way that makes both Cocos2D and openFrameworks happy?

Or, if you’re feeling particularly saintly: Why am I getting a black screen and what can I do about it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:50:05+00:00Added an answer on May 26, 2026 at 6:50 am

    My working answer: Have only one of the frameworks (Cocos2D) do all the drawing. openFrameworks can handle modeling and so on behind the scenes, but doesn’t actually ever set up an openGL context.

    Still would love to hear if you’ve gotten them actually, fully, working together though…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use libRocket in an iPhone application (with cocos2d), but I can't
I'm trying to get to grips with Cocos2d by trying to accomplish simple things.
I am trying to get the swiping to work for Cocos2d latest version here
I'm trying to make an application in cocos2d that can be used on multiple
I'm trying to get Cocos2D on the iPhone to clean itself up before I
I am trying get my head around how you can run the following php:
I'm trying to get smooth audio playback for an app that needs to play
I am trying to develop a application by using Cocos2d. I can't getting value
So I'm trying to port some cocos2d iOS apps over to Android and it
I'm trying get values from a GridView using the following code: foreach (GridViewRow row

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.