Graphical rendering must be fast enough so as to avoid hindering the user perception/action loop. Traditionally, programmers interleave descriptions and optimizations to achieve such performances, thus compromising modularity. In this paper, we consider graphic rendering as a compilation chain: we designed a static and dynamic graphical compiler that enables a designer to clearly separate the description of an interactive scene from its implementation and optimization. In order to express dependencies during run-time, the compiler builds a dataflow that can handle user input and data. We successfully used this approach on both a WIMP application and on a demanding one in terms of computing power: description is completely separated from implementation and optimizations while performances are comparable to manually optimized applications.