SceneRenderer_Main中的方法
2015-06-12 03:08
330 查看
@Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); MatrixState.setInitStack(); MatrixState.rotate(180,1, 0, 0);//180 initShader(); initPitctures(); initObject(); initParticle(); initWorld(); initThread(); } @Override public void onSurfaceChanged(GL10 gl, int width, int height) { // TODO Auto-generated method stub GLES20.glViewport(0, 0, width, height); ratio = (float) width / height; RATIO = ratio; initRect(); ConfigButtonArea(); } @Override public void onDrawFrame(GL10 gl) { // TODO Auto-generated method stub GLES20.glClear(GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT); if (isScreenSaver) { drawScreenSaver(); } else { if (SPIRIT_OFFSET > 2 * ratio) { SPIRIT_OFFSET = 0; spirtMoveFlag = true; moveFlag = false; } if ((saveIndex[0] == 0 && saveIndex[1] == 1) || (saveIndex[0] == 1 && saveIndex[1] == 0)) { compoundIndex = 2; } if ((saveIndex[0] == 2 && saveIndex[1] == 3) || (saveIndex[0] == 3 && saveIndex[1] == 2)) { compoundIndex = 3; } if (!spirtMoveFlag) { drawSpirit(); drawColorEdge(); } else { drawSpiritBlank1(); } drawRightBackground(); } }
相关文章推荐
- 记使用WaitGroup时的一个错误
- Training:组合博弈入门
- MediaStore.Images.Thumbnails
- AI 笔记(一)
- hdu 1848 Fibonacci again and again
- [case分享]Exchange 2010 登陆OWA查看邮件出现Rights managem operation failed
- [分享]Exchange企业邮箱被hotmail加入黑名单如何申诉
- main函数的参数
- Training:搜索入门
- Climbing Stairs
- 简述raid的种类和各种级别的特性
- Contrail中包的类型
- Training:并查集(最小生成树)
- KVM 介绍(6):Nova 通过 libvirt 管理 QEMU/KVM 虚机 [Nova Libvirt QEMU/KVM Domain]
- Leetcode_219 Contains Duplicate II
- rails的respond to format
- Contains Duplicate II
- How to fix no public key available for the following key IDs in debian
- ADB not responding. You can wait more,or kill"abd.exe" process manually and click 'Restar
- 关于Communications link failure Last packet sent to the server was 0 ms ago.的解决办法