On Tuesday, 7 January 2014 at 06:18:23 UTC, Adam Wilson wrote:

1. Fonts and monochrome icons based on distance-fields.

Typically it's easier to use TrueType/OpenType fonts. Although Pathing support for icons is a must.

That is slow or space consumingif you want mipmapping.

2. All fills based on shaders, with the ability to convert D into GLSL etc.

If possible I want to hand this off to a system library like OpenGL or DirectX.

You need a common syntax.

3. Render to texture, with caching mechanism.

My understanding is that it is best to let the GPU drivers handle caching, but somebody with Game Dev experience might be able to shed some light.

GPU drivers don't. How could they? You mean to pregenerate everything?

While I can't speak for the OpenGL library, from a performance standpoint using 3D drawing for 2D surfaces is actually not an efficient method for anything other than perfect square, as soon as you want curves performance tanks. Microsoft actually built an entire 2D/3D rendering engine using DirectX9 called

DX9 targets slow fragmentshaders. You should target fast fragmentshaders. And you should choose the common subset of GL/DX.

You create perfect solid circles by using 2 fragmentshaders and z-buffering. First you draw all the inner triangles, for all objects in the scene, then you draw all the border triangles, back to front.

you do this a few dozen times you tank GPU performance on anything less than a discrete GPU of some expense.

Next batch of Intel CPUs will provide solid shader performance, according to Intel IIRC. You should design for what is available in your average CPU in 3 years.

On Windows, we have access to Direct2D, which does not have those limitations. And Direct2D will inter-operate with Direct3D seamlessly.

And double implement everything? It would be a solid mistake to make the engine Microsoft centric. You should target OpenGL 2/3 ES / WebGL. That is the common denominator.

Reply via email to