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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:14:46+00:00 2026-06-14T08:14:46+00:00

i wanted to use CCRenderTexture in my project because i have a lot of

  • 0

i wanted to use CCRenderTexture in my project because i have a lot of CCLabelBMFont that are mostly static. Adding them all to my Scene caused some performance issues (Yes you can use BatchNotes etc. but it didnt really help). So I rendered them into a single Texture which increased the performance significantly! But the problem is that the rendered texture and the directly rendered node look different. I have no idea why!

I created a cocos2d-sample project and and created this:

CCSprite* testImage = [CCSprite spriteWithFile:@"N.png"];
testImage.position = ccp(100,100);
CCRenderTexture *rt = [CCRenderTexture renderTextureWithWidth:786 height:1024];
[rt beginWithClear:0 g:0 b:0 a:0];
[testImage visit];
[rt end];
CCSprite* renderedSprite = [CCSprite spriteWithTexture:rt.sprite.texture];
renderedSprite.position = ccp(386,512);
// Flip because CCRenderTexture is flipped
renderedSprite.flipY = YES;
// Add normal node an the rendered sprite
testImage.position = ccp(130,100);
[self addChild:testImage];
[self addChild:renderedSprite];

The results look like this:
The texture has less glow

How can this be? How can i make them look the same?
The N on the right is the sprite added the “normal” way and it is displayed correctly. The N on the left is the texture.

Edit:
i found this tutorial which hints that the blend functions are different. so can i am looking for the correct function to make them look the same.

  • 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-14T08:14:48+00:00Added an answer on June 14, 2026 at 8:14 am

    I found the solution!
    I used this example to create the sprite but when i looked into the cocos2d-manual again i saw, that you can add the CCRenderTexture directly to your scene. Thats what i did and it solved the problem!

    So the correct code should be:

    CCSprite* testImage = [CCSprite spriteWithFile:@"N.png"];
    testImage.position = ccp(100,100);
    CCRenderTexture *rt = [CCRenderTexture renderTextureWithWidth:786 height:1024];
    [rt begin];
    [testImage visit];
    [rt end];
    rt.position = ccp(386,512);
    // Add normal node an the rendered sprite
    testImage.position = ccp(130,100);
    [self addChild:testImage];
    [self addChild:rt];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to use full import names in my project (see this question ).
I wanted to use find to find every file in a directory that starts
I wanted to use monotouch, but unfortunately I don't have $400 to spend. So
I use log4j in my project and wanted to use FallbackErrorHandler for Backup-Reasons. So,
I wanted to use gson in my android project so I followed a tutorial
I wanted to use memcached for my C++ application. To do that I need
I recently wanted use regex in Cocoa app. But I found that Cocoa does
I wanted to use the following code from here: How can I save all
I wanted to use boost accumulators to calculate statistics of a variable that is
I wanted to use threads in my code and thought that the upcoming C++0x

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.