mirror of https://github.com/axmolengine/axmol.git
Deprecate DrawPrimitives and enhance DrawNode --little modify
This commit is contained in:
parent
6182a872c6
commit
11d8829b3a
|
@ -536,7 +536,7 @@ void DrawNode::drawCircle(const Vec2 ¢er, 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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue