Esempio n. 1
0
bool TizenGraphicsManager::loadGFXMode() {
	logEntered();

	if (!loadEgl()) {
		unloadGFXMode();
		return false;
	}

	int x, y, width, height;
	_appForm->GetBounds(x, y, width, height);
	_videoMode.overlayWidth = _videoMode.hardwareWidth = width;
	_videoMode.overlayHeight = _videoMode.hardwareHeight = height;
	_videoMode.scaleFactor = 4; // for proportional sized cursor in the launcher

	AppLog("screen size: %dx%d", _videoMode.hardwareWidth, _videoMode.hardwareHeight);
	return OpenGLGraphicsManager::loadGFXMode();
}
Esempio n. 2
0
result TizenGraphicsManager::Construct() {
	// Initialize our OpenGL ES context.
	loadEgl();

	// Notify the OpenGL code about our context.

	// We default to RGB565 and RGBA5551 which is closest to the actual output
	// mode we setup.
	notifyContextCreate(Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0), Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0));

	// Tell our size.
	int x, y, width, height;
	_appForm->GetBounds(x, y, width, height);
	AppLog("screen size: %dx%d", width, height);
	setActualScreenSize(width, height);
	return E_SUCCESS;
}