Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17070

drawRect()s are Deprecated

$
0
0

@TomLizard wrote:

Environment: Windows 8, Visual Studio 2015, Cocos2dx 3.9

I am very new to Cocos2dx but not C++ or graphics. I am experimenting with rendering shapes and, at the moment, I am trying to render a rectangle but I am confused because the two ways I have found are both deprecated.

Using CCNodeDraw::drawRect() causes the compiler to issue the following warning:

warning C4996: 'cocos2d::CCDrawNode': was declared deprecated

And DrawPrimitives.drawRect() and many other functions in DrawPrimitives namespace are deprecated:

CC_DEPRECATED_ATTRIBUTE void CC_DLL drawRect(Vec2 origin, Vec2 destination);

Generally speaking, what is the recommended practice for rendering vector graphics such a rectangles, ellipses, etc.

Thanks for helping.

Tom

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 17070