Home | History | Annotate | Download | only in cts
      1 /*
      2  * Copyright (C) 2012 The Android Open Source Project
      3  *
      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
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     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.
     15  */
     16 package android.opengl.cts;
     17 
     18 import javax.microedition.khronos.egl.EGLConfig;
     19 import javax.microedition.khronos.opengles.GL10;
     20 import java.util.concurrent.CountDownLatch;
     21 import android.opengl.GLES20;
     22 import android.util.Log;
     23 
     24 
     25 public class RendererFourShaderTest extends RendererBase {
     26 
     27     public RendererFourShaderTest(CountDownLatch latch) {
     28         super(latch);
     29     }
     30 
     31     @Override
     32     public void onSurfaceCreated(GL10 gl, EGLConfig config) {
     33         GLES20.glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
     34 
     35         mProgram =  GLES20.glCreateProgram();
     36         mShaderCount = new int[1];
     37         int[] shaders = new int[10];
     38         try {
     39             GLES20.glGetAttachedShaders(mProgram, 10, mShaderCount, 0, shaders, 0);
     40         }catch(Exception e) {
     41             Log.d("",e.toString());
     42         }
     43         mError = GLES20.glGetError();
     44         GLES20.glLinkProgram(mProgram);
     45         mLatch.countDown();
     46     }
     47 }
     48