opengl超级宝典第五版第12章变换反馈集群例子的问题?

CyberLogix 2023-06-11 00:16:33

 

opengl超级宝典第五版第12章变换反馈集群例子运行起来黑屏幕, 在网上查了发现时代码有BUG,The chapter 12 flocking example does not work · Issue #19 · flaccidware/oglsuperbible5 · GitHub

这个帖子说是解决了,但是后面附的文件

  • FlockingDemo.zip无法现在,通过下面的注释在代码中添加了
  •     glBindAttribLocation(flockingUpdateProgram, 0, "flock_position");
        glBindAttribLocation(flockingUpdateProgram, 1, "flock_velocity");
  • 但是还是运行起来黑屏,不知谁有运行成功过这个例子,问题出在啥地方?
  • Ok I figured out why the demo is not running, the flock_position and 
    flock_velocity attribute locations are not bound to the flock_update_program. I 
    managed to fix this and it works fine check the attached file. 
...全文
196 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
CyberLogix 2023-06-11
  • 打赏
  • 举报
回复 1

https://github.com/flaccidware/oglsuperbible5/issues/19 这个是老外解决问题的地址链接

19,470

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧