精通Micro3D v3基础技术[10]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

// Use this array of commands to show a triangle with texture....
static int[] command = {
 Graphics3D.COMMAND_LIST_VERSION_1_0,
Graphics3D.PRIMITVE_TRIANGLES |
 Graphics3D.PDATA_NORMAL_PER_FACE |
      Graphics3D.PDATA_TEXURE_COORD |
 Graphics3D.PATTR_LIGHTING |
      Graphics3D.PATTR_SPHERE_MAP |
Graphics3D.PATTR_BLEND_HALF |
 (1<<16),   // Nbr of primitives, in this case just one triangle
 0, 0, 0,           // The triangle's ccordinates
 200, 0, 0,
 0, 200, 0,
 0, 0, 4096,            // The Normal
      0,255,255,255, 0, 0,   // The coordinates for the texture
 Graphics3D.COMMAND_END, };
...

protected void paint(Graphics g) {
...
g3.drawCommandList( mainTexture, 0, 0, layout, effect, command);
...
}

本文关键:精通Micro3D v3基础技术
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top