mirror of https://github.com/axmolengine/axmol.git
commit
80389d0611
|
@ -1,15 +1,11 @@
|
|||
#ifndef __CCPLATFORMDEFINE_H__
|
||||
#define __CCPLATFORMDEFINE_H__
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#define CC_DLL
|
||||
|
||||
#define CC_ASSERT(cond) \
|
||||
if (! (cond)) \
|
||||
{ \
|
||||
char content[100]; \
|
||||
sprintf(content, "%s function:%s line:%d", __FILE__, __FUNCTION__, __LINE__ - 3); \
|
||||
CCMessageBox(content, "Assert error"); \
|
||||
}
|
||||
#define CC_ASSERT(cond) assert(cond)
|
||||
|
||||
|
||||
#define CC_UNUSED_PARAM(unusedparam) (void)unusedparam
|
||||
|
|
|
@ -576,16 +576,16 @@ void CCTexture2D::PVRImagesHavePremultipliedAlpha(bool haveAlphaPremultiplied)
|
|||
|
||||
void CCTexture2D::generateMipmap()
|
||||
{
|
||||
CCAssert( m_uPixelsWide == ccNextPOT(m_uPixelsWide) && m_uPixelsHigh == ccNextPOT(m_uPixelsHigh), "Mimpap texture only works in POT textures");
|
||||
//CCAssert( m_uPixelsWide == ccNextPOT(m_uPixelsWide) && m_uPixelsHigh == ccNextPOT(m_uPixelsHigh), "Mimpap texture only works in POT textures");
|
||||
ccGLBindTexture2D( m_uName );
|
||||
glGenerateMipmap(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
void CCTexture2D::setTexParameters(ccTexParams *texParams)
|
||||
{
|
||||
CCAssert( (m_uPixelsWide == ccNextPOT(m_uPixelsWide) && m_uPixelsHigh == ccNextPOT(m_uPixelsHigh)) ||
|
||||
(texParams->wrapS == GL_CLAMP_TO_EDGE && texParams->wrapT == GL_CLAMP_TO_EDGE),
|
||||
"GL_CLAMP_TO_EDGE should be used in NPOT textures");
|
||||
//CCAssert( (m_uPixelsWide == ccNextPOT(m_uPixelsWide) && m_uPixelsHigh == ccNextPOT(m_uPixelsHigh)) ||
|
||||
//(texParams->wrapS == GL_CLAMP_TO_EDGE && texParams->wrapT == GL_CLAMP_TO_EDGE),
|
||||
//"GL_CLAMP_TO_EDGE should be used in NPOT textures");
|
||||
ccGLBindTexture2D( m_uName );
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, texParams->minFilter );
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, texParams->magFilter );
|
||||
|
|
|
@ -95,7 +95,7 @@ void ParticleMainScene::initWithSubTest(int asubtest, int particles)
|
|||
addChild(infoLabel, 1, kTagInfoLayer);
|
||||
|
||||
// particles on stage
|
||||
CCLabelAtlas *labelAtlas = CCLabelAtlas::labelWithString("0000", "Images/fps_images.png", 16, 24, '.');
|
||||
CCLabelAtlas *labelAtlas = CCLabelAtlas::labelWithString("0000", "fonts/fps_images.png", 16, 24, '.');
|
||||
addChild(labelAtlas, 0, kTagLabelAtlas);
|
||||
labelAtlas->setPosition(ccp(s.width-66,50));
|
||||
|
||||
|
|
Loading…
Reference in New Issue