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

  • 相关阅读:
    C# 一个数组集合,任意组合,不遗漏,不重复
    C# 对象遍历 string类型 null转空字符串和去前后空格
    mysql中varchar可以存多少汉字
    ping ipconfig telnet
    mysql 生成UUID() 即 ORACLE 中的guid()函数
    a标签的href和onclick
    JQuery设置checkbox选中或取消等相关操作
    JS eval()函数
    ztree设置节点checked,选中某节点等相关操作
    Windows数据库定时备份
  • 原文地址:https://www.cnblogs.com/minggoddess/p/6543091.html
Copyright © 2011-2022 走看看