找回密码
 立即注册
mVertexBuffervertices字节the | android开发 2022-11-07 45 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
android中虚拟键盘的实现示例,VirtualKeyboard源码下载,创建极点坐标数据缓冲,vertices.length
4是因为一个整数四个字节:ByteBuffervbb=ByteBuffer.allocateDirect(vertices.length
4);vbb.order(ByteOrder.nativeOrder());//设置字节次序。mVertexBuffer=vbb.asFloatBuffer();//转换为int型缓冲mVertexBuffer.put(vertices);//向缓冲区中放入极点坐标数据mVertexBuffer.position(0);//设置缓冲区开始位置//特别提示:因为不同平台字节次序不同数据单元不是字节的一定要通过ByteBuffer//转换,关键是要通过ByteOrder设置nativeOrder(),不然有可能会出问题//极点坐标数据的初始化,更多代码注解请参考代码文件。本资料共包括以下附件:

(Implementation example of virtual keyboard in Android, source code download of VirtualKeyboard, creation of pole coordinate data buffer, vertices.length
4 is because an integer has four bytes: ByteBuffervbb=ByteBuffer. allocateDirect (vertices. length
4); vbb.order(ByteOrder.nativeOrder());// Set byte order. mVertexBuffer=vbb.asFloatBuffer();// Convert to int buffer mVertexBuffer. put (vertices)// Put pole coordinate data mVertexBuffer into the buffer position(0);// Set the starting position of the buffer.//Special tips: because the byte order of different platforms and the data units that are not bytes must be converted through ByteBuffer//, the key is to set nativeOrder() through ByteOrder, otherwise there may be problems.//The initialization of pole coordinate data. For more code comments, refer to the code file. This document includes the following annexes:)

[下载]11520396394.rar




上一篇:Android 兔子塔防,兔子快跑Crackedcarrot源码
下一篇:Android牛逼小子Awesomeguy横屏Java源码