2 * Copyright (C) 2007 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package android.opengl;
19 import javax.microedition.khronos.opengles.GL;
20 import javax.microedition.khronos.opengles.GL10;
21 import javax.microedition.khronos.opengles.GL10Ext;
22 import javax.microedition.khronos.opengles.GL11;
23 import javax.microedition.khronos.opengles.GL11Ext;
24 import javax.microedition.khronos.opengles.GL11ExtensionPack;
27 * The abstract base class for a GL wrapper. Provides
28 * some convenient instance variables and default implementations.
30 abstract class GLWrapperBase
31 implements GL, GL10, GL10Ext, GL11, GL11Ext {
32 public GLWrapperBase(GL gl) {
34 if (gl instanceof GL10Ext) {
35 mgl10Ext = (GL10Ext) gl;
37 if (gl instanceof GL11) {
40 if (gl instanceof GL11Ext) {
41 mgl11Ext = (GL11Ext) gl;
43 if (gl instanceof GL11ExtensionPack) {
44 mgl11ExtensionPack = (GL11ExtensionPack) gl;
49 protected GL10Ext mgl10Ext;
51 protected GL11Ext mgl11Ext;
52 protected GL11ExtensionPack mgl11ExtensionPack;