/* * Moonlight|3D Copyright (C) 2005 The Moonlight|3D team * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Created on Sep 15, 2005 */ package ml.backend.renderer; import ml.core.helper.PropertyContainer; import ml.image.Framebuffer; /** * The common render engine interface for all supported renderers. * * @todo split scene setup and rendering as scene setup should happen * before the renderer is moved into a background task. * * @see Framebuffer, PropertyContainer, Property * * @author gregor */ public interface RenderEngine { /** * Return a human-readable string identifying the rendering engine. * This is also used as an identifier for this rendering engine * * @return human-readable name of this rendering engine */ public String getName(); /** * Return a new PropertyContainer with a set of properties that * this renderer knows. The properties must be initialised to * default values. * * @return a property container with renderer options */ public PropertyContainer getProperties(); /** * Initialise the rendering engine. This is called before a new * thread is spawned to execute a rendering task. The rendering * engine should be prepared to render an image here. * */ public void initialise(); /** * Make the rendering engine render the scene in the current operator * graph and return a framebuffer with the resulting image after the * renderer has completed. * * @param rendererProperties the rendering options to use * @return the final image */ public Framebuffer renderCurrentOG(PropertyContainer rendererProperties); }