当前位置: 首页>>代码示例>>Java>>正文


Java Matrix.setIdentityM方法代码示例

本文整理汇总了Java中android.opengl.Matrix.setIdentityM方法的典型用法代码示例。如果您正苦于以下问题:Java Matrix.setIdentityM方法的具体用法?Java Matrix.setIdentityM怎么用?Java Matrix.setIdentityM使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.opengl.Matrix的用法示例。


在下文中一共展示了Matrix.setIdentityM方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onSurfaceCreated

import android.opengl.Matrix; //导入方法依赖的package包/类
@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
    Log.d(TAG, "onSurfaceCreated");

    final CameraView cameraView = mCameraViewRef.get();
    if (cameraView != null) {
        cameraView.mGLSurfaceFilter = new GLSurfaceFilter();

        Matrix.setIdentityM(mMvpMatrix, 0);
        mTextureId = cameraView.mGLSurfaceFilter.createTexture();
        cameraView.mSurfaceTexture = new SurfaceTexture(mTextureId);
        cameraView.mSurfaceTexture.setOnFrameAvailableListener(cameraView);
        if (cameraView.mCameraSurfaceListener != null) {
            cameraView.mCameraSurfaceListener.onCameraSurfaceCreate(cameraView.mSurfaceTexture);
        }
    }
}
 
开发者ID:LeonHover,项目名称:MediaCodecRecorder,代码行数:18,代码来源:CameraView.java

示例2: getLayoutMatrix

import android.opengl.Matrix; //导入方法依赖的package包/类
/**
 * Returns layout transformation matrix that applies an optional mirror effect and compensates
 * for video vs display aspect ratio.
 */
public static void getLayoutMatrix(
        final float matrix[], boolean mirror, float videoAspectRatio, float displayAspectRatio) {
  float scaleX = 1;
  float scaleY = 1;
  // Scale X or Y dimension so that video and display size have same aspect ratio.
  if (displayAspectRatio > videoAspectRatio) {
    scaleY = videoAspectRatio / displayAspectRatio;
  } else {
    scaleX = displayAspectRatio / videoAspectRatio;
  }
  // Apply optional horizontal flip.
  if (mirror) {
    scaleX *= -1;
  }
  Matrix.setIdentityM(matrix, 0);
  Matrix.scaleM(matrix, 0, scaleX, scaleY, 1);
  adjustOrigin(matrix);
}
 
开发者ID:Piasy,项目名称:VideoCRE,代码行数:23,代码来源:RendererCommon.java

示例3: StereoDiveEffect

import android.opengl.Matrix; //导入方法依赖的package包/类
public StereoDiveEffect(Context context) {
    mDpm = new DisplayMetrics();
    mActivity = context;
    getWindowManager(context).getDefaultDisplay().getMetrics(mDpm);
    generateVideoVertices();
    generateVideoTextures();
    generateUITextures();
    
    mCamera = new float[16];
    mPersp = new float[16];
    mMVP = new float[16];
    mHeadTransform = new float[16];
    mAngleOrigin = new float[3];
    
    Matrix.setIdentityM(mHeadTransform, 0);
    Matrix.perspectiveM(mPersp, 0, EYE_FOV, 1.0f, 0.0f, -(1.5f*SCREEN_FAR));
    mRightEyePos = new float[] { 0.0f, -IPD/2.0f, 0.0f };
    mLeftEyePos = new float[] { 0.0f, IPD/2.0f, 0.0f };
}
 
开发者ID:archos-sa,项目名称:aos-Video,代码行数:20,代码来源:StereoDiveEffect.java

示例4: onDrawFrame

import android.opengl.Matrix; //导入方法依赖的package包/类
@Override
public void onDrawFrame(GL10 glUnused) {
    GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);

    // Do a complete rotation every 10 seconds.
    long time = SystemClock.uptimeMillis() % 10000L;
    float angleInDegrees = (360.0f / 10000.0f) * ((int) time);

    // Draw the triangle facing straight on.
    Matrix.setIdentityM(mModelMatrix, 0);
    Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 0.0f, 0.0f, 1.0f);
    drawTriangle(mTriangle1Vertices);

    // Draw one translated a bit down and rotated to be flat on the ground.
    Matrix.setIdentityM(mModelMatrix, 0);
    Matrix.translateM(mModelMatrix, 0, 0.0f, -1.0f, 0.0f);
    Matrix.rotateM(mModelMatrix, 0, 90.0f, 1.0f, 0.0f, 0.0f);
    Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 0.0f, 0.0f, 1.0f);
    drawTriangle(mTriangle2Vertices);

    // Draw one translated a bit to the right and rotated to be facing to the left.
    Matrix.setIdentityM(mModelMatrix, 0);
    Matrix.translateM(mModelMatrix, 0, 1.0f, 0.0f, 0.0f);
    Matrix.rotateM(mModelMatrix, 0, 90.0f, 0.0f, 1.0f, 0.0f);
    Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 0.0f, 0.0f, 1.0f);
    drawTriangle(mTriangle3Vertices);
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:28,代码来源:LessonOneRenderer.java

示例5: getLayoutMatrix

import android.opengl.Matrix; //导入方法依赖的package包/类
/**
 * Returns layout transformation matrix that applies an optional mirror effect and compensates
 * for video vs display aspect ratio.
 */
public static float[] getLayoutMatrix(
    boolean mirror, float videoAspectRatio, float displayAspectRatio) {
  float scaleX = 1;
  float scaleY = 1;
  // Scale X or Y dimension so that video and display size have same aspect ratio.
  if (displayAspectRatio > videoAspectRatio) {
    scaleY = videoAspectRatio / displayAspectRatio;
  } else {
    scaleX = displayAspectRatio / videoAspectRatio;
  }
  // Apply optional horizontal flip.
  if (mirror) {
    scaleX *= -1;
  }
  final float matrix[] = new float[16];
  Matrix.setIdentityM(matrix, 0);
  Matrix.scaleM(matrix, 0, scaleX, scaleY, 1);
  adjustOrigin(matrix);
  return matrix;
}
 
开发者ID:Piasy,项目名称:AppRTC-Android,代码行数:25,代码来源:RendererCommon.java

示例6: Bitmap3DObject

import android.opengl.Matrix; //导入方法依赖的package包/类
/**
 * Returns a new 3D object with custom position, rotation and scale
 * @param xPosition X position in space
 * @param yPosition Y position in space
 * @param zPosition Z position in space
 * @param xRotation Rotation on X axis
 * @param yRotation Rotation on Y axis
 * @param zRotation Rotation on Z axis
 * @param xScale X axis scale
 * @param yScale Y axis scale
 * @param zScale Z axis scale
 */
public Bitmap3DObject(float xPosition, float yPosition, float zPosition, float xRotation, float yRotation, float zRotation, float xScale, float yScale, float zScale) {
    this.position = new float[3];
    this.position[0] = xPosition;
    this.position[1] = yPosition;
    this.position[2] = zPosition;

    this.rotation = new float[3];
    this.rotation[0] = xRotation;
    this.rotation[1] = yRotation;
    this.rotation[2] = zRotation;

    this.scale = new float[3];
    this.scale[0] = xScale;
    this.scale[1] = yScale;
    this.scale[2] = zScale;

    this.translationMatrix = new float[16];
    this.rotationMatrix = new float[16];
    this.scaleMatrix = new float[16];

    Matrix.setIdentityM(translationMatrix, 0);
    Matrix.setIdentityM(rotationMatrix, 0);
    Matrix.setIdentityM(scaleMatrix, 0);
}
 
开发者ID:snada,项目名称:BitmapFontLoader,代码行数:37,代码来源:Bitmap3DObject.java

示例7: onSurfaceCreated

import android.opengl.Matrix; //导入方法依赖的package包/类
@Override public void onSurfaceCreated(GL10 gl, EGLConfig config) {
    Matrix.setIdentityM(mSTMatrix, 0);
    mRecordingEnabled = mVideoEncoder.isRecording();
    if (mRecordingEnabled) {
        mRecordingStatus = RECORDING_RESUMED;
    } else {
        mRecordingStatus = RECORDING_OFF;
        mVideoEncoder.initFilter(mCurrentFilterType);
    }
    mFullScreen = new FullFrameRect(
            FilterManager.getCameraFilter(mCurrentFilterType, mApplicationContext));
    mTextureId = mFullScreen.createTexture();
    mSurfaceTexture = new SurfaceTexture(mTextureId);
}
 
开发者ID:hoanganhtuan95ptit,项目名称:EditPhoto,代码行数:15,代码来源:CameraRecordRenderer.java

示例8: MediaHelper

import android.opengl.Matrix; //导入方法依赖的package包/类
/**
 *
 * @param cameraWidth
 * @param cameraHeight
 * @param isLand  横屏
 */
public MediaHelper(int cameraWidth, int cameraHeight, boolean isLand, GLSurfaceView surfaceView){
    if (!isLand) {
        mCameraWidth = cameraWidth;
        mCameraHeight = cameraHeight;
    } else {
        mCameraWidth = cameraHeight;
        mCameraHeight = cameraWidth;
    }
    mSurfaceView=surfaceView;
    Matrix.setIdentityM(mMvpMatrix,0);
    Matrix.rotateM(mMvpMatrix,0,270,0,0,1);
    // TODO: 2017/10/27
}
 
开发者ID:FacePlusPlus,项目名称:MegviiFacepp-Android-SDK,代码行数:20,代码来源:MediaHelper.java

示例9: GLOESImageView

import android.opengl.Matrix; //导入方法依赖的package包/类
public GLOESImageView() {
        mCubeBuffer = ByteBuffer.allocateDirect(CUBE.length * 4).order(ByteOrder.nativeOrder()).asFloatBuffer();
//        mCubeBuffer.put(CUBE);

        mTextureBuffer = ByteBuffer.allocateDirect(TEXTURE.length * 4).order(ByteOrder.nativeOrder()).asFloatBuffer();
        mTextureBuffer.put(TEXTURE);

        float[] mvp = new float[16];
        Matrix.setIdentityM(mvp, 0);
        mMVPBuffer = ByteBuffer.allocateDirect(mvp.length * 4).order(ByteOrder.nativeOrder()).asFloatBuffer();
        mMVPBuffer.put(mvp);
    }
 
开发者ID:vipycm,项目名称:mao-android,代码行数:13,代码来源:GLOESImageView.java

示例10: TextureRender

import android.opengl.Matrix; //导入方法依赖的package包/类
public TextureRender() {
    mTriangleVertices = ByteBuffer.allocateDirect(
            mTriangleVerticesData.length * FLOAT_SIZE_BYTES)
            .order(ByteOrder.nativeOrder()).asFloatBuffer();
    mTriangleVertices.put(mTriangleVerticesData).position(0);
    Matrix.setIdentityM(mSTMatrix, 0);
}
 
开发者ID:SavorGit,项目名称:Hotspot-master-devp,代码行数:8,代码来源:TextureRender.java

示例11: OESFilter

import android.opengl.Matrix; //导入方法依赖的package包/类
public OESFilter(Context context) {
    super();
    plane.setVerticesBuffer(BufferUtils.getFloatBuffer(TRIANGLES_DATA_CAMERA,0));
    glOESProgram=new GLOESProgram(context);
    glOESTexture=new GLOESTexture();
    Matrix.setIdentityM(mSTMatrix, 0);
}
 
开发者ID:zhangyaqiang,项目名称:Fatigue-Detection,代码行数:8,代码来源:OESFilter.java

示例12: initMatrix

import android.opengl.Matrix; //导入方法依赖的package包/类
private void initMatrix() {
    Matrix.setIdentityM(modelMatrix,0);
    Matrix.rotateM(modelMatrix,0,90.0f,0f,1f,0f);
    Matrix.setIdentityM(projectionMatrix,0);
    Matrix.setIdentityM(viewMatrix, 0);
    Matrix.setLookAtM(viewMatrix, 0,
            0f,10f,10f,
            0.0f, 0.0f,-1.0f,
            0.0f, 1.0f, 0.0f);
}
 
开发者ID:zhangyaqiang,项目名称:Fatigue-Detection,代码行数:11,代码来源:SphereReflector.java

示例13: onDrawFrame

import android.opengl.Matrix; //导入方法依赖的package包/类
@Override
public void onDrawFrame(GL10 glUnused)
{
	GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);

       // Do a complete rotation every 10 seconds.
       long time = SystemClock.uptimeMillis() % 10000L;
       float angleInDegrees = (360.0f / 10000.0f) * ((int) time);

       // Set our per-vertex lighting program.
       GLES20.glUseProgram(mPerVertexProgramHandle);

       // Set program handles for cube drawing.
       mMVPMatrixHandle = GLES20.glGetUniformLocation(mPerVertexProgramHandle, "u_MVPMatrix");
       mMVMatrixHandle = GLES20.glGetUniformLocation(mPerVertexProgramHandle, "u_MVMatrix");
       mLightPosHandle = GLES20.glGetUniformLocation(mPerVertexProgramHandle, "u_LightPos");
       mPositionHandle = GLES20.glGetAttribLocation(mPerVertexProgramHandle, "a_Position");
       mColorHandle = GLES20.glGetAttribLocation(mPerVertexProgramHandle, "a_Color");
       mNormalHandle = GLES20.glGetAttribLocation(mPerVertexProgramHandle, "a_Normal");

       // Calculate position of the light. Rotate and then push into the distance.
       Matrix.setIdentityM(mLightModelMatrix, 0);
       Matrix.translateM(mLightModelMatrix, 0, 0.0f, 0.0f, -5.0f);
       Matrix.rotateM(mLightModelMatrix, 0, angleInDegrees, 0.0f, 1.0f, 0.0f);
       Matrix.translateM(mLightModelMatrix, 0, 0.0f, 0.0f, 2.0f);

       Matrix.multiplyMV(mLightPosInWorldSpace, 0, mLightModelMatrix, 0, mLightPosInModelSpace, 0);
       Matrix.multiplyMV(mLightPosInEyeSpace, 0, mViewMatrix, 0, mLightPosInWorldSpace, 0);

       // Draw some cubes.        
       Matrix.setIdentityM(mModelMatrix, 0);
       Matrix.translateM(mModelMatrix, 0, 4.0f, 0.0f, -7.0f);
       Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 1.0f, 0.0f, 0.0f);
       drawCube();

       Matrix.setIdentityM(mModelMatrix, 0);
       Matrix.translateM(mModelMatrix, 0, -4.0f, 0.0f, -7.0f);
       Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 0.0f, 1.0f, 0.0f);
       drawCube();

       Matrix.setIdentityM(mModelMatrix, 0);
       Matrix.translateM(mModelMatrix, 0, 0.0f, 4.0f, -7.0f);
       Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 0.0f, 0.0f, 1.0f);
       drawCube();

       Matrix.setIdentityM(mModelMatrix, 0);
       Matrix.translateM(mModelMatrix, 0, 0.0f, -4.0f, -7.0f);
       drawCube();

       Matrix.setIdentityM(mModelMatrix, 0);
       Matrix.translateM(mModelMatrix, 0, 0.0f, 0.0f, -5.0f);
       Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 1.0f, 1.0f, 0.0f);
       drawCube();

       // Draw a point to indicate the light.
       GLES20.glUseProgram(mPointProgramHandle);
       drawLight();
}
 
开发者ID:biezhihua,项目名称:Android_OpenGL_Demo,代码行数:59,代码来源:LessonTwoRenderer.java

示例14: onDrawFrame

import android.opengl.Matrix; //导入方法依赖的package包/类
@Override
public void onDrawFrame(GL10 glUnused) {
    GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);

    // Set our per-vertex lighting program.
    GLES20.glUseProgram(mProgramHandle);

    // Set program handles for cube drawing.
    mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgramHandle, "u_MVPMatrix");
    mMVMatrixHandle = GLES20.glGetUniformLocation(mProgramHandle, "u_MVMatrix");
    mLightPosHandle = GLES20.glGetUniformLocation(mProgramHandle, "u_LightPos");
    mTextureUniformHandle = GLES20.glGetUniformLocation(mProgramHandle, "u_Texture");
    mPositionHandle = GLES20.glGetAttribLocation(mProgramHandle, "a_Position");
    mNormalHandle = GLES20.glGetAttribLocation(mProgramHandle, "a_Normal");
    mTextureCoordinateHandle = GLES20.glGetAttribLocation(mProgramHandle, "a_TexCoordinate");

    // Calculate position of the light. Push into the distance.
    Matrix.setIdentityM(mLightModelMatrix, 0);
    Matrix.translateM(mLightModelMatrix, 0, 0.0f, 0.0f, -1.0f);

    Matrix.multiplyMV(mLightPosInWorldSpace, 0, mLightModelMatrix, 0, mLightPosInModelSpace, 0);
    Matrix.multiplyMV(mLightPosInEyeSpace, 0, mViewMatrix, 0, mLightPosInWorldSpace, 0);

    // Draw a cube.
    // Translate the cube into the screen.
    Matrix.setIdentityM(mModelMatrix, 0);
    Matrix.translateM(mModelMatrix, 0, 0.0f, 0.0f, -3.5f);

    // Set a matrix that contains the current rotation.
    Matrix.setIdentityM(mCurrentRotation, 0);
    Matrix.rotateM(mCurrentRotation, 0, mDeltaX, 0.0f, 1.0f, 0.0f);
    Matrix.rotateM(mCurrentRotation, 0, mDeltaY, 1.0f, 0.0f, 0.0f);
    mDeltaX = 0.0f;
    mDeltaY = 0.0f;

    // Multiply the current rotation by the accumulated rotation, and then set the accumulated rotation to the result.
    Matrix.multiplyMM(mTemporaryMatrix, 0, mCurrentRotation, 0, mAccumulatedRotation, 0);
    System.arraycopy(mTemporaryMatrix, 0, mAccumulatedRotation, 0, 16);

    // Rotate the cube taking the overall rotation into account.
    Matrix.multiplyMM(mTemporaryMatrix, 0, mModelMatrix, 0, mAccumulatedRotation, 0);
    System.arraycopy(mTemporaryMatrix, 0, mModelMatrix, 0, 16);

    // This multiplies the view matrix by the model matrix, and stores
    // the result in the MVP matrix
    // (which currently contains model * view).
    Matrix.multiplyMM(mMVPMatrix, 0, mViewMatrix, 0, mModelMatrix, 0);

    // Pass in the modelview matrix.
    GLES20.glUniformMatrix4fv(mMVMatrixHandle, 1, false, mMVPMatrix, 0);

    // This multiplies the modelview matrix by the projection matrix,
    // and stores the result in the MVP matrix
    // (which now contains model * view * projection).
    Matrix.multiplyMM(mTemporaryMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);
    System.arraycopy(mTemporaryMatrix, 0, mMVPMatrix, 0, 16);

    // Pass in the combined matrix.
    GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mMVPMatrix, 0);

    // Pass in the light position in eye space.
    GLES20.glUniform3f(mLightPosHandle, mLightPosInEyeSpace[0], mLightPosInEyeSpace[1], mLightPosInEyeSpace[2]);

    // Pass in the texture information
    // Set the active texture unit to texture unit 0.
    GLES20.glActiveTexture(GLES20.GL_TEXTURE0);

    // Bind the texture to this unit.
    GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mAndroidDataHandle);

    // Tell the texture uniform sampler to use this texture in the
    // shader by binding to texture unit 0.
    GLES20.glUniform1i(mTextureUniformHandle, 0);

    if (mCubes != null) {
        mCubes.render();
    }
}
 
开发者ID:biezhihua,项目名称:Android_OpenGL_Demo,代码行数:79,代码来源:LessonSevenRenderer.java

示例15: onDrawFrame

import android.opengl.Matrix; //导入方法依赖的package包/类
@Override
public void onDrawFrame(GL10 glUnused) 
{
	GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);			        
               
       // Do a complete rotation every 10 seconds.
       long time = SystemClock.uptimeMillis() % 10000L;        
       float angleInDegrees = (360.0f / 10000.0f) * ((int) time);                
       
       // Set our per-vertex lighting program.
       GLES20.glUseProgram(mProgramHandle);
       
       // Set program handles for cube drawing.
       mMVPMatrixHandle = GLES20.glGetUniformLocation(mProgramHandle, "u_MVPMatrix");
       mMVMatrixHandle = GLES20.glGetUniformLocation(mProgramHandle, "u_MVMatrix"); 
       mLightPosHandle = GLES20.glGetUniformLocation(mProgramHandle, "u_LightPos");
       mTextureUniformHandle = GLES20.glGetUniformLocation(mProgramHandle, "u_Texture");
       mPositionHandle = GLES20.glGetAttribLocation(mProgramHandle, "a_Position");
       mColorHandle = GLES20.glGetAttribLocation(mProgramHandle, "a_Color");
       mNormalHandle = GLES20.glGetAttribLocation(mProgramHandle, "a_Normal"); 
       mTextureCoordinateHandle = GLES20.glGetAttribLocation(mProgramHandle, "a_TexCoordinate");
       
       // Set the active texture unit to texture unit 0.
       GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
       
       // Bind the texture to this unit.
       GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTextureDataHandle);
       
       // Tell the texture uniform sampler to use this texture in the shader by binding to texture unit 0.
       GLES20.glUniform1i(mTextureUniformHandle, 0);        
       
       // Calculate position of the light. Rotate and then push into the distance.
       Matrix.setIdentityM(mLightModelMatrix, 0);
       Matrix.translateM(mLightModelMatrix, 0, 0.0f, 0.0f, -5.0f);      
       Matrix.rotateM(mLightModelMatrix, 0, angleInDegrees, 0.0f, 1.0f, 0.0f);
       Matrix.translateM(mLightModelMatrix, 0, 0.0f, 0.0f, 2.0f);
              
       Matrix.multiplyMV(mLightPosInWorldSpace, 0, mLightModelMatrix, 0, mLightPosInModelSpace, 0);
       Matrix.multiplyMV(mLightPosInEyeSpace, 0, mViewMatrix, 0, mLightPosInWorldSpace, 0);                        
       
       // Draw some cubes.        
       Matrix.setIdentityM(mModelMatrix, 0);
       Matrix.translateM(mModelMatrix, 0, 4.0f, 0.0f, -7.0f);
       Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 1.0f, 0.0f, 0.0f);        
       drawCube();
                       
       Matrix.setIdentityM(mModelMatrix, 0);
       Matrix.translateM(mModelMatrix, 0, -4.0f, 0.0f, -7.0f);
       Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 0.0f, 1.0f, 0.0f);        
       drawCube();
       
       Matrix.setIdentityM(mModelMatrix, 0);
       Matrix.translateM(mModelMatrix, 0, 0.0f, 4.0f, -7.0f);
       Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 0.0f, 0.0f, 1.0f);        
       drawCube();
       
       Matrix.setIdentityM(mModelMatrix, 0);
       Matrix.translateM(mModelMatrix, 0, 0.0f, -4.0f, -7.0f);
       drawCube();
       
       Matrix.setIdentityM(mModelMatrix, 0);
       Matrix.translateM(mModelMatrix, 0, 0.0f, 0.0f, -5.0f);
       Matrix.rotateM(mModelMatrix, 0, angleInDegrees, 1.0f, 1.0f, 0.0f);        
       drawCube();      
       
       // Draw a point to indicate the light.
       GLES20.glUseProgram(mPointProgramHandle);        
       drawLight();
}
 
开发者ID:biezhihua,项目名称:Android_OpenGL_Demo,代码行数:70,代码来源:LessonFourRenderer.java


注:本文中的android.opengl.Matrix.setIdentityM方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。