Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 3
Registered: ‎01-04-2013
My Device: PlayBook
My Carrier: 1&1

Changing screen orientation with OpenGl

[ Edited ]

Hi I have problems finding any information about switching the orientation in an OpenGL native PlayBook OS application, based on the native GL application template from the IDE (with bbutil).

I already did the following:

bool GLScreen::handleNavigatorEvent(bps_event_t* event) {
	unsigned int eventCode = bps_event_get_code(event);
	switch (eventCode) {
	case NAVIGATOR_ORIENTATION_CHECK:
		navigator_orientation_check_response(event, !rotationLock);
		return false;
	case NAVIGATOR_ORIENTATION:
		orientationEventId = navigator_event_get_id(event);
		changeOrientation();
		return false;
	...
	...
	}
}



int GLScreen::changeOrientation() {
	clog << "rotating screen" << endl;

	/* WHAT THE HELL DO I HAVE TO DO HERE ???????? */

	clog << "finished rotating screen" << endl;
	invalidate();
	navigator_done_orientation_id(orientationEventId);
	return EXIT_SUCCESS;
}

 When I execute this application, the screen rotates (when I leave the application after rotating it, the system menu is rotated, too) but the application content AND CONTROL (touch-events x and y) stay the same in their orientation like the rendered output (as to say: when I rotate the screen the x axis becomes the y axis in the eyes of the user)

 

Can anyone help me with that problem or provide an example?

 

Regards

Björn Zeutzeim

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Changing screen orientation with OpenGl