zoukankan      html  css  js  c++  java
  • vertex buffer 数据结构 如何读vb的memory pool

    vertex attribute (declaration)    vertex stream (memory pool)

    这两部分 通过attribute

    里面对memory的描述把两部分 vbo 和attribute bind together

    slot    attribute                  offset                                streamIndex          stride    stream

      0       RGBA32F  pos          0                   0                      16          0          memoryaddress

     1        RGBA32F  normal     16(slot0 RGBA32F 4X4)           0

    2         RG32F      uv            32                                         0

    example2:

    slot    attribute                  offset                                streamIndex          stride                      divisor(??not quite sure)          stream  

      0       RGBA32F  pos          0                    0                        16(slot0)                                                            0          memoryaddress0

     1        RGBA32F  normal     16( slot0 RGBA32F 4X4)           1                       24(slot1+slot2)                                                   1            memoryaddress1

    2         RG32F      uv            32                                         1

    16F是2个字节 X4(RGBA四个通道)

    stride offset单位都是byte

     SetVertexDeclaration()设置的offset

  • 相关阅读:
    SQL随机生成6位数字
    安装时提示 INSTALL_PARSE_FAILED_MANIFEST_MALFORMED 解决办法
    Windows 7 完美安装 Visual C++ 6.0
    解决js中window.location.href不工作的问题
    DataList中动态显示DIV
    Gridview、DataList、Repeater获取行索引号
    Java多jdk安装
    【CentOS】samba服务器安装与配置
    【CentOS】IBM X3650M4 IMM远程管理【转载】
    【Java】Eclipse导出jar包与javadoc
  • 原文地址:https://www.cnblogs.com/minggoddess/p/6543091.html
Copyright © 2011-2022 走看看