To this point I’ve been relying heavily on TextureRenderer to display my textures within my application. However, I was talking to someone recently that said that using quads to draw a texture is much slower than drawing with arrays…is this true? Is there a specific reason that TextureRenderer does it with quads instead of arrays?
there is no such thing as ‘quads vs arrays’.
it’s either ‘quads vs triangles’ or ‘immediate mode vs vertex arrays vs vertex buffer objects’
Well, it would seem I have no clue what it is I’m talking about. :persecutioncomplex:
Would you say that drawing a texture to the screen via quads is the fastest and best way to draw textures to the screen? I’m taking BufferedImages and drawing to textures, so I’m trying to determine the best way to support this.
You either need quads or triangles, but that’s not the point. In the end you simply need some geometry that defines an area. Now when you want performance, it’s all about how to define your geometry. All methods have different overhead, and different throughput. So if you want to draw 1 quad, you’d be best off with immediate mode. If you’d need to render zillions, pick vertex buffer objects, and use index buffers and apply a few more neat tricks.
So. It’s not like Java2D at all. You might want to read more about this topic.
Look at glTexSubImage2D
Will do, thanks