Deprecate DrawPrimitives and enhance DrawNode --little modify

This commit is contained in:
huangshiwu 2014-09-12 14:50:41 +08:00
parent 6182a872c6
commit 11d8829b3a
2 changed files with 5 additions and 5 deletions

View File

@ -536,7 +536,7 @@ void DrawNode::drawCircle(const Vec2 &center, float radius, float angle, unsigne
void DrawNode::drawQuadBezier(const Vec2 &origin, const Vec2 &control, const Vec2 &destination, unsigned int segments, const Color4F &color)
{
Vec2* vertices = new Vec2[segments + 1];
Vec2* vertices = new (std::nothrow) Vec2[segments + 1];
if( ! vertices )
return;

View File

@ -924,10 +924,10 @@ void RawStencilBufferTest6::setupStencilForClippingOnPlane(GLint plane)
Vec2 pt = Director::getInstance()->getWinSize();
Vec2 vertices[] = {
Vec2::ZERO,
Vec2(pt.x, 0),
pt,
Vec2(0, pt.y)
Vec2::ZERO,
Vec2(pt.x, 0),
pt,
Vec2(0, pt.y)
};
auto glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_U_COLOR);