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

  • 相关阅读:
    CUDA从入门到精通
    [Network] 计算机网络基础知识总结
    第三章 需求工程概论
    jsp学习
    算法——递推算法
    大话设计模式读书笔记--文章汇总
    轻松学SQL Server数据库
    Oracle数据库建表+添加数据练习
    《C#图解教程》 总览
    php发送get、post请求的6种方法简明总结
  • 原文地址:https://www.cnblogs.com/minggoddess/p/6543091.html
Copyright © 2011-2022 走看看