function returns an ImageSourceRef, which
can then be used to create the actual texture. In the current version
of Cinder, you should use a shared pointer to a gl::Texture, which is
called a gl::TextureRef. Better
still, try to specify the type of the texture, e.g. gl::Texture2dRef.
Finally, you may want to load your image from the assets folder, so
use loadAsset to
find it for you.
To summarize: here's how to load the image and create a
texture from it:
Texture classes are defined in
, but you can also include
to get access to all the
OpenGL classes. The loadImage function is part of the
, which is already
included if you include "cinder/gl/Texture.h"
Indeed, Cinder has been updated 5 times since that tutorial was written
and the most recent update
has radically changed core functionality. If you find yourself stuck on
the new syntax, please refer to the samples that come with Cinder. But
feel free to ask around on the forums as well :)
Thanks Paul for the support , I really appreciate !
great , I want to use this wonderful framework , even the Cinder
community is less active than others C++ frameworks . Thanks for your
time , and sorry to asked an obvious question like this.
Leave a comment on sachaamm's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic