mirror of https://github.com/axmolengine/axmol.git
Fix compile failed on mobile platform
This commit is contained in:
parent
ec1d76b15e
commit
8b631f5c9f
|
@ -399,11 +399,14 @@ void DrawNode::onDrawGLLine(const Mat4 &transform, uint32_t flags)
|
|||
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V2F_C4B_T2F), (GLvoid *)offsetof(V2F_C4B_T2F, texCoords));
|
||||
}
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
// GL_MULTISAMPLE & GL_LINE_SMOOTH only work on PC platform
|
||||
if (this->_lineSmoothEnable == false)
|
||||
{
|
||||
glDisable(GL_MULTISAMPLE);
|
||||
glDisable(GL_LINE_SMOOTH);
|
||||
}
|
||||
#endif
|
||||
|
||||
glLineWidth(_lineWidth);
|
||||
glDrawArrays(GL_LINES, 0, _bufferCountGLLine);
|
||||
|
@ -416,8 +419,10 @@ void DrawNode::onDrawGLLine(const Mat4 &transform, uint32_t flags)
|
|||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_bufferCountGLLine);
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
if (this->_lineSmoothEnable == true)
|
||||
glEnable(GL_MULTISAMPLE);
|
||||
#endif
|
||||
|
||||
CHECK_GL_ERROR_DEBUG();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue