WEB开发网
开发学院手机开发Android 开发 Android OpenGL实战 开发框架搭建、三角形和四边形... 阅读

Android OpenGL实战 开发框架搭建、三角形和四边形的绘制

 2010-05-14 16:51:00 来源:WEB开发网   
核心提示:package com.zjc.test;import android.app.Activity;import android.opengl.GLSurfaceView;import android.os.Bundle;public class MainActivity extends Activity {/** Ca

package com.zjc.test;

import android.app.Activity;

import android.opengl.GLSurfaceView;

import android.os.Bundle;

public class MainActivity extends Activity {

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

// setContentView(R.layout.main);

GLReader reader=new GLReader();

GLSurfaceView glview=new GLSurfaceView(this);

glview.setRenderer(reader);

setContentView(glview);

}

}

package

com.zjc.test;

import android.app.Activity;

import android.opengl.GLSurfaceView;

import android.os.Bundle;

public class MainActivity extends Activity {

/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

// setContentView(R.layout.main);

GLReader reader=new GLReader();

GLSurfaceView glview=new GLSurfaceView(this);

glview.setRenderer(reader);

setContentView(glview);

}

}

没什么好说的,基本上都是固定的,要记得 setContentView(R.layout.main)是无效的!

<>

上一页  1 2 3 4 5 

Tags:Android OpenGL 实战

编辑录入:coldstar [复制链接] [打 印]
赞助商链接