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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:51:06+00:00 2026-05-28T03:51:06+00:00

If I have an instance of CCTexture2D, is it not possible to modify it?

  • 0

If I have an instance of CCTexture2D, is it not possible to modify it? Like, say, rotate it?

I know I can simply rotate the CCSprite I have. But really, I am curious about only rotating the texture affecting all the CCSprites that refer to 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-28T03:51:07+00:00Added an answer on May 28, 2026 at 3:51 am

    CCTexture2D is immutable, it can not be modified at runtime.

    For this reason someone created a CCMutableTexture2D class, which I used in this example project. Problem is of course that in order to rotate the texture, you would have to apply your own rotation algorithm to rotate individual pixels. That in return would require you to resize the texture to fit an arbitrarily rotated texture without cutting off the edges.

    To better understand this, take a piece of paper and lay it flat in front of you. Now lay another piece of paper on top and start rotating it. You’ll notice that the rotated paper doesn’t fit in the same rectangle as the unrotated paper does.

    Long story short, it’s probably going to be overkill for what you want to do. Rotating sprites is much easier and computationally rather inexpensive compared to shifting thousands of pixels around in memory, then re-binding the texture to OpenGL.

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

Sidebar

Related Questions

I have an instance of System.Type, for which IsArray returns true. How can I
I have for instance the following string: 0x780000105d0e0030 If this is not the string,
I have an instance that implements IDictionary<T, K> , I don't know T and
I have an instance of Windows Web Server 2008. Do you know if it
I have an instance variable in my view controller that I would like to
Let’s say I have instance of MyCollection class called Foo1. MyCollection is basically a
I have an instance of MemoryStream that is closed (don't ask, can't change that
I have an instance of Type (type). How can I determine if it overrides
I have an instance variable declared in the implementation file which can be accessed
I have an instance of ActiveMQ running on an externally facing server and exposing

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.