Drawing custom 3d shapes

95 views Asked by At

I am attempting to create a custom object using Cinder C++ on windows with Visual Studio. I am hoping to find a solution that allows you to point to a object with BatchRef object, and which can be used in the same way as any other BatchRef.

I have already tried searching through the official websites tutorials and documentation, and while it does an excellent job of listing all the classes, functions, etc, it does a exceedingly slim job of covering the usage of most of those, with only the return type and arguments listed.

Ideally, we could call the custom shape something like myShape and it could be used in the following manner in my App::draw() override: (with mShader already defined someplace else)

gl::BatchRef bRef;
gl::pushModelMatrix();
bRef = gl::Batch::create( myShape() , mShader );
bRef -> draw();
gl::popModelMatrix();

If the documentation has instructions for this, feel free to point me that way. I was unable to find it, but that does not mean that it does not exist.

0

There are 0 answers