Example #1
0
void reshape(int w, int h) {
  glViewport(0,0, w,h);

  matrixIdentity(Projection);
  if (w > h)
    matrixOrtho(Projection, -20.0, 20.0, -20.0*h/w, 20.0*w/h, -1, +1);
  else
    matrixOrtho(Projection, -20.0*w/h, 20.0*w/h, -20.0, 20.0, -1, +1);

  matrixIdentity(ModelView);
}
Example #2
0
bool CEngine::initialize(int width, int height){

	LOGW("CEngine", "Initializing.");

	// Setup the projection matrix
	matrixOrtho(projectionMatrix, 0, width, height, 0, -1.0f, 1.0f);

	CPageElement element;
	element.load("assets/twokinds_1_1_1.png");

	//elements.push_back(element);

	return true;
}