Game Development Reference
In-Depth Information
3.15C INDER
Cinder is a free, open source, multi-platform, C++ library for programming graphics, audio,
networking and more. It's very easy to learn and very quick to begin developing on.
It is well designed and allows us to get up and running quickly by automating the project
creation process.
The project code generated by Cinder shares many similarities with the way different ex-
amples in this topic are presented. This makes it possible to use Cinder as a way to quickly
work on user interface concepts without the steep learning curve and setup process required
by other toolkits.
The generated project will use the OpenGLĀ® API, this means some of the syntax or the
process to prepare the geometry will be slightly different from the example code, however,
Cinder provides a very rich library that already gives us many of the functions we have dis-
cussed. Armed with the knowledge of what these functions do and how they do it, we can
focus on the implementation of user interface concepts.
#include "cinder/app/AppNative.h"
#include "cinder/gl/gl.h"
using namespace ci;
using namespace ci::app;
using namespace std;
class UIPGApp : public AppNative {
public:
void setup();
void update();
void draw();
private:
CameraPersp m_camera;
};
void UIPGApp::setup()
{
m_camera.setPerspective(60.0f, getWindowAspectRatio(), 5.0f, 3000.0f );
m_camera.lookAt(Vec3f(0.f, 0.f, 10.f), Vec3f(0.f, 0.f, 0.f));
}
void UIPGApp::update() { }
Search WWH ::




Custom Search