简体   繁体   English

OpenGL ES 2D绘图性能估计

[英]OpenGL ES 2D Drawing Performance Estimation

I've been confronted with the extremely bad drawing Performance of Quartz/Core Graphics. 我一直面临着极差的Quartz / Core Graphics绘图性能。

I don't believe its bad in every scenario, but in my occasion, where i need to redraw something like 3000 short lines frequently, it performs super bad. 我不相信它在所有情况下都不好,但是在我需要频繁重绘3000条短线的情况下,它的表现非常糟糕。

Since the Modal (of MVC) is fixed I can not change how it spits out the data (if I could, i would have followed the advice, to only draw the changes, so the lines dont have to be redrawn every frame). 由于(MVC的)模态是固定的,因此我无法更改其吐出数据的方式(如果可以的话,我会按照建议进行操作,只绘制更改,因此不必在每一帧都重新绘制线条)。

So as a conclusion I am considering using opengl for that purpose and I would like to ask u (experienced) guys for an estimation of how well it could work using opengl, before starting to work into that topic, as it seems by far more difficult than Quartz. 因此,作为一个结论,我正在考虑为此目的使用opengl,并且在开始研究该主题之前,我想请你们(经验丰富的人)估算使用opengl可以达到的效果,因为这似乎要困难得多。比石英。

You almost certainly see a speed performance lift from OpenGL over Quartz, however remember that whereas Quartz uses point to point drawing, OpenGL is based on the use of vertices and vertices points (essentially co-ordinates). 几乎可以肯定,从OpenGL到Quartz可以看到OpenGL的速度性能提升,但是请记住,虽然Quartz使用点对点绘图,但是OpenGL是基于顶点和顶点的使用(基本上是坐标)。 You may find you need to do some mid-weight parsing work on your existing data source to re-work it into this vertices point system. 您可能会发现需要对现有数据源进行一些中等重量的解析工作,才能将其重新加工到此顶点系统中。

Also keep in mind that drawing text on top of an OpenGL ES object is a tricky task - it can be done (ironically) by using Quartz to generate an image, and then using this image as a texture. 还请记住,在OpenGL ES对象顶部绘制文本是一项棘手的任务-可以(讽刺地)通过使用Quartz生成图像,然后将该图像用作纹理来完成。

I'd definitely recommend using OpenGL Kit as it will make life a bit easier for you as a beginner to OpenGL. 我绝对建议您使用OpenGL工具包,因为它可以使您作为OpenGL的初学者更加轻松。 Ray Wenderlich has an excellent starting point tutorial here : Ray Wenderlich在这里有一个很好的起点教程:

http://www.raywenderlich.com/5223/beginning-opengl-es-2-0-with-glkit-part-1 http://www.raywenderlich.com/5223/beginning-opengl-es-2-0-with-glkit-part-1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM