void UILabelTTF::listenToBackground(cocos2d::CCObject *obj) { #if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID CCLog("UILabelTTF::listenToBackground"); updateRenderTexture(); #endif }
boolean Renderer::update() { boolean ret = updateRenderGraph(); ret = ret && updateContent(); ret = ret && updateRenderTexture(); ret = ret && updateRenderWindow(); return true; }
void UILabelTTF::setString(const char *label) { if(m_labelTTf) { m_labelTTf->setString(label); updateRenderTexture(); } }
void UILabelTTF::setColor(const ccColor3B& color) { if(m_labelTTf) { m_labelTTf->setColor(color); updateRenderTexture(); } }
void UILabelTTF::setStringWithColor(const char *label,const ccColor3B& color) { if(m_labelTTf) { m_labelTTf->setColor(color); m_labelTTf->setString(label); updateRenderTexture(); } }
//----------------------------------------------------------------------------- void D3D9HardwarePixelBuffer::bind(IDirect3DDevice9 *dev, IDirect3DSurface9 *surface, IDirect3DSurface9* fsaaSurface, bool writeGamma, uint fsaa, const String& srcName, IDirect3DBaseTexture9 *mipTex) { D3D9_DEVICE_ACCESS_CRITICAL_SECTION BufferResources* bufferResources = getBufferResources(dev); bool isNewBuffer = false; if (bufferResources == NULL) { bufferResources = createBufferResources(); mMapDeviceToBufferResources[dev] = bufferResources; isNewBuffer = true; } bufferResources->mipTex = mipTex; bufferResources->surface = surface; bufferResources->surface->AddRef(); bufferResources->fSAASurface = fsaaSurface; D3DSURFACE_DESC desc; if(surface->GetDesc(&desc) != D3D_OK) OGRE_EXCEPT(Exception::ERR_RENDERINGAPI_ERROR, "Could not get surface information", "D3D9HardwarePixelBuffer::D3D9HardwarePixelBuffer"); mWidth = desc.Width; mHeight = desc.Height; mDepth = 1; mFormat = D3D9Mappings::_getPF(desc.Format); // Default mRowPitch = mWidth; mSlicePitch = mHeight*mWidth; mSizeInBytes = PixelUtil::getMemorySize(mWidth, mHeight, mDepth, mFormat); if(mUsage & TU_RENDERTARGET) updateRenderTexture(writeGamma, fsaa, srcName); if (isNewBuffer && mOwnerTexture->isManuallyLoaded()) { DeviceToBufferResourcesIterator it = mMapDeviceToBufferResources.begin(); while (it != mMapDeviceToBufferResources.end()) { if (it->second != bufferResources && it->second->surface != NULL && it->first->TestCooperativeLevel() == D3D_OK && dev->TestCooperativeLevel() == D3D_OK) { Box fullBufferBox(0,0,0,mWidth,mHeight,mDepth); PixelBox dstBox(fullBufferBox, mFormat); dstBox.data = OGRE_MALLOC (getSizeInBytes(), MEMCATEGORY_RESOURCE); blitToMemory(fullBufferBox, dstBox, it->second, it->first); blitFromMemory(dstBox, fullBufferBox, bufferResources); OGRE_FREE(dstBox.data, MEMCATEGORY_RESOURCE); break; } ++it; } } }
void ShaderNode::setContentSize(const Size& contentSize) { Node::setContentSize(contentSize); updateRenderTexture(); }