Saturday, July 5, 2008

Generic Render Sequence (2)

Let's brush up the rendering mechanism of XOOPS Cube. XOOPS Cube has a policy that CMS doesn't force the specific theme format to designers. Programming is necessary to create a new format, but that's much better than not to exchange theme formats.

The XOOPS Cube core abstracts Render-System (drawing mechanism) and Render-Target (output buffer). You can use Render-System and Render-Target without the central control of the main sequence.

Rener-Operation is operation data for the Generic Render-Sequence. It tells the core how to use Render-System and Render-Target. If a BASE module uses the Generic Render-Sequence, each programs don't need to access Render-System and Render-Target directly.

But, the core doesn't put a ban on accessing Render-System and Render-Target. The Generic Render-Sequence is a high-level "sequence". Render-System and Render-Target are a low-level "rendering" mechanism. Both of them are available.

At the XOOPS Cube Developers Group Japan, Onokazu pointed out that Render-Target has similar members of Render-Operation. That's was very very good point.

XOOPS Cube 0.9 that is accepted to Legacy doesn't have a mechanism like Render-Operation. Render-Target has the same role.

When we developed Legacy, I took account of attribute (template variables) cleaning. At XOOPS2, posterior rendering can use template variables registered by anterior rendering. That's one of techniques of XOOPS2. But, Legacy had to accept exchangable Render-System, so Render-System B can not access to template variable registered by Render-System A.

If this is 3D programing, such a use is bug and onus of programers. But, we thought that we had to show that a rendering can not access to template variables of other rendering, to programers who had XOOPS2 experience. So Legacy got the spec that template variables are cleared after rendering.

At this spec implement, it became non-recommendation that programers access to Render-System directly. Normally, programers set requests to Render-Target and send it to Legacy_Controller, instead of direct Render-System access. In most cases, Render-System control is done by Legacy. In other words, "Legacy has Ungeneric Render-Sequence". In this case, Render-Target works a kind of Render-Operation for Legacy Ungeneric Render-Sequence.

XOOPS Cube core 1.0 will take Render-Operation, have to solve confusion of classes and divide those classes correctly. Render-System, Render-Target and Render-Operation are divided correctly.

No comments: