Merge branch 'yangws-430'

This commit is contained in:
walzer 2011-03-25 14:25:52 +08:00
commit e4ae24a20c
4 changed files with 12 additions and 5 deletions

View File

@ -110,8 +110,9 @@ void CCAtlasNode::draw()
// Unneeded states: GL_COLOR_ARRAY // Unneeded states: GL_COLOR_ARRAY
glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_COLOR_ARRAY);
glColor4ub( m_tColor.r, m_tColor.g, m_tColor.b, m_cOpacity); // glColor4ub isn't implement on some android devices
// glColor4ub( m_tColor.r, m_tColor.g, m_tColor.b, m_cOpacity);
glColor4f(((GLfloat)m_tColor.r) / 255, ((GLfloat)m_tColor.g) / 255, ((GLfloat)m_tColor.b) / 255, ((GLfloat)m_cOpacity) / 255);
bool newBlend = m_tBlendFunc.src != CC_BLEND_SRC || m_tBlendFunc.dst != CC_BLEND_DST; bool newBlend = m_tBlendFunc.src != CC_BLEND_SRC || m_tBlendFunc.dst != CC_BLEND_DST;
if(newBlend) if(newBlend)
{ {

View File

@ -149,7 +149,9 @@ namespace cocos2d{
// Unneeded states: GL_COLOR_ARRAY // Unneeded states: GL_COLOR_ARRAY
glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_COLOR_ARRAY);
glColor4ub( m_tColor.r, m_tColor.g, m_tColor.b, m_cOpacity); // glColor4ub isn't implement on some android devices
// glColor4ub( m_tColor.r, m_tColor.g, m_tColor.b, m_cOpacity);
glColor4f(((GLfloat)m_tColor.r) / 255, ((GLfloat)m_tColor.g) / 255, ((GLfloat)m_tColor.b) / 255, ((GLfloat)m_cOpacity) / 255);
bool newBlend = (m_tBlendFunc.src != CC_BLEND_SRC || m_tBlendFunc.dst != CC_BLEND_DST); bool newBlend = (m_tBlendFunc.src != CC_BLEND_SRC || m_tBlendFunc.dst != CC_BLEND_DST);
if(newBlend) if(newBlend)

View File

@ -376,7 +376,9 @@ void CCRibbonSegment::draw(float curTime, float fadeTime, ccColor4B color)
if (curTime == 0) if (curTime == 0)
{ {
// no alpha over time, so just set the color // no alpha over time, so just set the color
glColor4ub(r,g,b,a); // glColor4ub isn't implement on some android devices
// glColor4ub(r,g,b,a);
glColor4f(((GLfloat)r) / 255, ((GLfloat)g) / 255, ((GLfloat)b) / 255, ((GLfloat)a) / 255);
} }
else else
{ {

View File

@ -77,7 +77,9 @@ glColor_from_pointer(void *ptr)
g = (g*mult)/max + add; g = (g*mult)/max + add;
b = (b*mult)/max + add; b = (b*mult)/max + add;
glColor4ub(r, g, b, 255); // glColor4ub isn't implement on some android devices
// glColor4ub(r, g, b, 255);
glColor4f(((GLfloat)r) / 255, ((GLfloat)g) / 255, ((GLfloat)b) / 255, 1.0f);
} }
static const GLfloat circleVAR[] = { static const GLfloat circleVAR[] = {