I’m coming to Cinder from several years of openFrameworks experience. I made a few apps with Cinder with 0.8.4 years ago but didn’t keep up with it.
I’m struggling a bit with some of the new 0.9.0/glNext conventions and I’m wondering if there are suggestions for good posts to look at for understanding some of the beginner level GL changes. I’ve found the brief doc on 0.9.0 changes and the OpenGL in Cinder guide ( https://libcinder.org/docs/guides/opengl/index.html ). Most of the old examples and books I’ve found are usually 0.8.6 and earlier so a few things dot transfer. At the moment I’m looking specifically for information on how to work simply with lights (since gl::Light is deprecated apparently) and meshes.
As for meshes:
I translated a simple OF sketch into Cinder, but I’m unsure if this is a good way to go about doing things: https://github.com/laserpilot/Cinder_Simple_Mesh_Ribbon/blob/master/src/Simple_Mesh_RibbonApp.cpp#L112
When I run this same draw method in a loop 100 times (with the gl::Begin and end in the loop…actually a vector of base ribbon objects with this draw method), the performance isn’t great, so I’m obviously doing something not smart.
I’m unclear on a more efficient way to do it, however, and also do things like add normals (something that is done very differently with ofMesh in OF). Is this a case for TriMesh or VboMesh? Is there a good simple example out there for understanding how best to dynamically add vertices (and normals) to a mesh?
As for lights:
Also looking for a fairly simple sample for the new way of working with lights. I understand it’s all to be done within a shader now instead of gl::Light as in old examples? I’ve been looking through the samples but maybe haven’t stumbled upon the one that demonstrates this the most concisely.
Thanks for any help!