@araker Thank you! It works now!
Smooth anti-alias lines
(37 posts) (10 voices)-
Posted 1 year ago #
-
Recently I have updated to cocos2d 2.0.0 and the OpenGL line drawing doesn't work anymore. I guess it is because the OpenGL ES 1.1 is not compatible with the 2.0 API.
Could somebody help me or point me how to draw a line using OpenGL with OpenGL ES 2.0 ?Posted 8 months ago # -
I cannot get the posted "drawSmoothLine" function to work with Cocos2D 1.0.1
I just see a blank, black screen when I call the method, no lines are drawn.
Posted 6 months ago # -
I cannot get any OPENGL primitive draw commands to work unless they are within a
-(void) draw {
}
method within an Objective-C class that I have created. Where is the "drawSmoothLine" function suppose to be placed, in what class and where, so that it may be used? Is Cocos2D constantly scanning all classes looking for a "draw" method to execute in them?
Posted 6 months ago # -
Either put the code from
drawSmoothLineinto the draw-method, or call said method from thedrawmethod.Posted 6 months ago # -
Look at the drawPrimitivesTest.m in the cocos source for an example of using primitive draw functions.
Posted 6 months ago #
Reply
You must log in to post.