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 8858839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:55:09+00:00 2026-06-14T14:55:09+00:00

I have been experimenting a lot lately with different technologies for drawing 2D-sprites on

  • 0

I have been experimenting a lot lately with different technologies for drawing 2D-sprites on iOS (CoreAnimation, UIViews, CGContext and Open GL ES). The best performance versus developmenttime I got from CoreAnimation so I will stick to that (for the time being).

To display bitmaps I use CALayers – which works just fine and not much slower than Open GL.
There are multiple patterns which repeat often (which is typical for a platforming game). For memorysaving reasons I would like to reuse a stored Image for multiple CALayers.

Can I do that? How? I imagine something like:

  1. Store Bitmap in whatever form (UIImage?) in memory
  2. Get a CGImageRef from UIImage
  3. Apply CGImageRef to each CALayer which should display that Bitmap

Will this actually store only the pointer to the bitmap for each Layer or does “Apple-magic” create a copy of the bitmap for each CALayer?

Thank you.

  • 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-06-14T14:55:10+00:00Added an answer on June 14, 2026 at 2:55 pm

    After creating an iOS project to test this, here is my conclusion:

    • you can set the content (type id) to UIImage. period. So imho being type id is useless: it should be UIImage
    • hence: you cannot set content to type CGImageRef (if you do with __bridge id) the content is nil and no error is generated (in contrast to Apple Documentation, which says this works on MacOS X 10.6 and higher which iOS is based on afaik).

    I found no way of displaying a tile multiple times without using RAM for each tilebitmap working with CALayer. You have to work with OpenGL ES to do that.

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

Sidebar

Related Questions

I have been experimenting a lot lately with Windows 8, writing C# XAML Metro
I have been experimenting with a lot of web development apps like Drupal, Moodle,
I have been experimenting a lot with some glassy images, such as the one
I have been experimenting a lot with setInterval and clearInterval recently, for creating my
I am a JS programmer and I have been experimenting with jQuery a lot
I have been experimenting with Firefox's Audio API to detecting silence in audio. (The
I have been experimenting with writing applications that use a local SQL Database to
I have been experimenting with sending messages from two .NET Windows Forms applications using
I have been experimenting with TMask in Delphi 2010 and it seems to work
I have been experimenting some problems with the fully distributed version. First of all

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.