#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) if (true) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); // 为了使线看的更明显 , 设置当前线的宽度 5 像素 glLineWidth(5.0f); } #endif // .... #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) // 记得还原 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); #endif 复制代码