Class DummyGraphicEngine
- java.lang.Object
-
- be.yildizgames.module.graphic.BaseGraphicEngine
-
- be.yildizgames.module.graphic.dummy.DummyGraphicEngine
-
- All Implemented Interfaces:
FpsProvider,GraphicEngine
public final class DummyGraphicEngine extends BaseGraphicEngine
dummy implementation for graphic engine.- Author:
- Grégory Van den Borre
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResourcePath(be.yildizgames.common.file.ResourcePath resourcePath)Add a folder to use to load resources.voidclose()Free resources used by the engine.FontcreateFont(String name, String path, int size, be.yildizgames.module.color.Color color)Create a new font to use to print text.SceneManagercreateGraphicWorld(String worldName, ShadowType shadowType)Create a new graphic world.SelectionRectanglecreateSelectionRectangle(Material texture, Material texture2)Create a new Selection Rectangle, only one can be used at a time, if more than one is created, an exception is thrown.SkyboxcreateSkybox(String name, String path)Create a sky box.GraphicWorldcreateWorld()floatgetFPS()Provide the frame per seconds.GuiFactorygetGuiFactory()Provide the module responsible to build GUI elements.MaterialManagergetMaterialManager()be.yildizgames.module.window.ScreenSizegetScreenSize()be.yildizgames.module.window.BaseWindowEnginegetWindowEngine()voidprintScreen()Print the current rendering frame and save it in a file.voidupdate()Render one frame.-
Methods inherited from class be.yildizgames.module.graphic.BaseGraphicEngine
createFont, createFont, createFont, createFont, createFont, getEngine, getEngine, getEventManager
-
-
-
-
Method Detail
-
close
public void close()
Description copied from class:BaseGraphicEngineFree resources used by the engine.- Specified by:
closein classBaseGraphicEngine
-
update
public void update()
Description copied from class:BaseGraphicEngineRender one frame.- Specified by:
updatein classBaseGraphicEngine
-
printScreen
public void printScreen()
Description copied from interface:GraphicEnginePrint the current rendering frame and save it in a file.
-
addResourcePath
public void addResourcePath(be.yildizgames.common.file.ResourcePath resourcePath)
Description copied from class:BaseGraphicEngineAdd a folder to use to load resources.- Specified by:
addResourcePathin classBaseGraphicEngine- Parameters:
resourcePath- Data for the resources.
-
getGuiFactory
public GuiFactory getGuiFactory()
Description copied from interface:GraphicEngineProvide the module responsible to build GUI elements.- Returns:
- The GuiBuilder.
-
getMaterialManager
public MaterialManager getMaterialManager()
-
createSkybox
public Skybox createSkybox(String name, String path)
Description copied from interface:GraphicEngineCreate a sky box.- Parameters:
name- Sky box unique name.path- Path to images to use.- Returns:
- The created object.
-
createSelectionRectangle
public SelectionRectangle createSelectionRectangle(Material texture, Material texture2)
Description copied from interface:GraphicEngineCreate a new Selection Rectangle, only one can be used at a time, if more than one is created, an exception is thrown.- Parameters:
texture- Material to set.texture2- Inner material.- Returns:
- The created object.
-
getFPS
public float getFPS()
Description copied from interface:FpsProviderProvide the frame per seconds.- Returns:
- The rendered frames per seconds.
-
createGraphicWorld
public SceneManager createGraphicWorld(String worldName, ShadowType shadowType)
Description copied from class:BaseGraphicEngineCreate a new graphic world.- Specified by:
createGraphicWorldin classBaseGraphicEngine- Parameters:
worldName- Unique name to give to the world.shadowType- Type of the shadow to use.- Returns:
- The created GraphicWorld.
-
createFont
public Font createFont(String name, String path, int size, be.yildizgames.module.color.Color color)
Description copied from interface:GraphicEngineCreate a new font to use to print text.- Parameters:
name- Name of the font, must be unique, used to retrieve it from the registerer.path- Path to the font file to load.size- Size of the font.color- Font color.- Returns:
- The newly built font.
-
createWorld
public GraphicWorld createWorld()
- Specified by:
createWorldin classBaseGraphicEngine
-
getScreenSize
public be.yildizgames.module.window.ScreenSize getScreenSize()
-
getWindowEngine
public be.yildizgames.module.window.BaseWindowEngine getWindowEngine()
- Specified by:
getWindowEnginein classBaseGraphicEngine
-
-