Hi all,
I am new to Cinder after using Processing for several projects, but am evaluating Cinder to see if it might be a better choice for some new projects. One of the frustrations is that, although there are a few books and online tutorials available, they all seem to be somewhat outdated and so far I have not found a good source that explains how to do simple things in the current version of Cinder and why/how they are different from the techniques shown in the books/tutorials.
For example, in Giovanni Dicanio’s tutorial on Pluralsight, he shows how to draw a simple diagonal line and change the color and linewidth. The draw loop looks something like:
void LinesApp:draw()
{
gl::clear( Color( 0, 0, 0) );
const int w = getWindowWidth();
const in h = getWindowHeight();
gl::color ( Color (1, 1, 0) );
gl::lineWidth(5);
gl::drawLine(vec2(0, 0), vec2(w, h) );
}
(He uses Vec2f, which I figured out now has to be vec2).
When I run this, I do get a yellow line from upper left to lower right, but the width is unaffected by the lineWidth command. I’ve seen on the forum that gl::lineWidth is now deprecated, but I have not been able to find a simple replacement.
Can someone explain why gl::lineWidth was deprecated and what the way to do it now is?
Many thanks,
Bill