From: Pepijn V. E. <pep...@lu...> - 2002-04-02 12:06:16
|
If I'm not mistaken, you need a heavy weight component as top level component to draw in. What swing does is manage how stuff is drawn in that one big component. What kenneth suggested is making a lightweight component that draws on the top level heavyweight component directly, but takes the clipping bounds that swing has given it into account. Pepijn Van Eeckhoudt Kevin Nardi wrote: > Wouldn't hardware accelerated offscreen rendering allow the component to be > lightweight (hardware render to an offscreen surface, and then copy to a > component using nio, or even create a special component that uses surface > flipping)? It seems that merely clipping to the bounds of the component and > then drawing to screen would create a heavyweight component. At least it > would be hardware accelerated I guess. > > Wouldn't a lightweight component be preferable though, if possible? > > At the very least, you could query to see if the extension is available, and > if so, create a lightweight component. > > -Kevin > > >>>Has anyone tried using the WGL_ARB_pbuffer extension to do hw >>>accelerated offscreen rendering? Maybe this could be used to get make >>>the swing component hw accelerated on win32. If nobody has tried this >>>before I'll probably put some time into this... >> >>Personally haven't tried it, though I think a more portable >>approach is to walk up the component hierarchy to determine the >>bounds of the Swing widget within its parent container and to >>clip the hardware rendering to that region. This is what the >>Magician OpenGL binding used to do, to the best of my knowledge. > > > > > > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup > |