public OpenGL20Demo() {
// Check whether OpenGL 2.0 is supported on the current BlackBerry
// Smartphone
if (GLUtils.isSupported(GLUtils.VERSION_2_0)) {
final Screen screen =
new FullScreen(Screen.DEFAULT_MENU | Screen.DEFAULT_CLOSE);
screen.add(new OpenGLDemoField());
pushScreen(screen);
} else {
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
Dialog.alert("This device does not support OpenGL ES 2.0, exiting application...");