duanping1632 2015-08-07 10:44
浏览 31
已采纳

opengl3 20k精灵速度慢吗?

I have successfully made an opengl 3.x animation in golang. However; the frame by frame update is noticeably slow only after 20k textures rendered. All the sprites do is simply move from the left side of the screen to the right. Keep in mind they are all on top of each other because i was too lazy to randomize location.

I have an updated PC that can run GTA5 on high settings but cannot display 20k sprites (quads with textures) in opengl3 environment??

I must be doing something wrong here. Maybe I need to pack all vertices in one VBO instead of a new vbo for each object? I bindbuffers every object as well. I'm not really sure what is causing this bottleneck. Can someone help as i'm not sure where to go from here?

I have attached my code as reference for anyone that can give some tips on speeding up rendering of 20k sprites in opengl3: http://pastebin.com/SHQtRPn7

  • 写回答

3条回答 默认 最新

  • douxing8323 2015-08-07 10:48
    关注

    Without looking at source code, you should use one VBO and combine geometry for all sprites that share a texture and draw them using one draw call.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿