[AE Engine logo] Public API Reference
Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

renderer.h

00001 /*
00002  *  AE Engine
00003  *
00004  *  Copyright (C) 2003 Riku "Rakkis" Nurminen
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef __AEPLUGIN_AERENDERER_RENDERER_H__
00023 #define __AEPLUGIN_AERENDERER_RENDERER_H__
00024 
00025 #include <aedefs.h>
00026 #include <aegeom/matrix4.h>
00027 #include <aegeom/vector3.h>
00028 #include <aegfx/color4.h>
00029 #include <aeplugin/plugin.h>
00030 #include <aereg/base.h>
00031 #include <aereg/registry.h>
00032 #include <aerenderer/renderop.h>
00033 #include <aerenderer/rendereroptions.h>
00034 #include <aesys/system.h>
00035 
00049 class aeRenderer: public aePlugin {
00050         AECF_CNDEF
00051 
00052  private:
00054         aeRegistry *aeReg;
00056         aeRendererName rendererName;
00058 
00064         aeRendererOptions rendererOpts;
00066         int texUnitCount;
00067 
00068  public:
00078         aeRenderer(aeRegistry *reg, bool fullscreen, int winWidth, int winHeight, int winBpp);
00079         virtual ~aeRenderer();
00080 
00087         virtual void initialize() = 0;
00088 
00095         virtual void reinitialize() = 0;
00096 
00100         virtual void shutdown() = 0;
00101 
00107         virtual bool createWindow() = 0;
00108 
00112         virtual void closeWindow() = 0;
00113 
00124         virtual void setOptions(aeRendererOptions &ropts, bool reinitialize = false) = 0;
00125 
00134         virtual aeRendererOptions getOptions() const { return rendererOpts; }
00135 
00141         virtual int getTexUnitCount() const { return texUnitCount; }
00142 
00149         virtual void setShadeMode(aeShadeMode sm) = 0;
00150 
00158         virtual aeShadeMode getShadeMode() const = 0;
00159 
00167         virtual void addViewport(aeViewport *vp, bool becomesActive = false) = 0;
00168 
00174         virtual void removeViewport(const char *vpName) = 0;
00175 
00179         virtual void removeAllViewports() = 0;
00180 
00188         virtual aeViewport findViewportByName(const char *vpName) const = 0;
00189 
00196         virtual aeViewport getActiveViewport() const = 0;
00197 
00203         virtual void _flushPipeline() = 0;
00204 
00210         virtual void _setActiveTextureUnit(int texUnit) = 0;
00211 
00217         virtual int _getActiveTextureUnit() const = 0;
00218 
00230         virtual void _setTextureParams(aeTextureTarget targetTex, aeTextureFilterMode tfMode,
00231                                                                    aeTextureEnvironment texEnv) = 0;
00232 
00241         virtual void _setTextureFilter(aeTextureTarget targetTex, aeTextureFilterMode tfMode) = 0;
00242 
00252         virtual aeTextureFilterMode _getTextureFilter(aeTextureTarget targetTex) const = 0;
00253 
00261         virtual void _setTextureEnvironment(aeTextureEnvironment texEnv) = 0;
00262 
00270         virtual aeTextureEnvironment _getTextureEnvironment() const = 0;
00271 
00280         virtual void _setDepthBufferParams(bool depthTest, bool depthWrite,
00281                                                                            aeDepthBufferFunc depthFunc) = 0;
00282 
00288         virtual void _setDepthBufferTest(bool depthTest) = 0;
00289 
00295         virtual bool _getDepthBufferTest() const = 0;
00296 
00302         virtual void _setDepthBufferWrite(bool depthWrite) = 0;
00303 
00309         virtual bool _getDepthBufferWrite() const = 0;
00310 
00316         virtual void _setDepthBufferFunction(aeDepthBufferFunc depthFunc) = 0;
00317 
00323         virtual aeDepthBufferFunc _getDepthBufferFunction() const = 0;
00324 
00333         virtual void _setBlendFunction(aeBlendFunc src, aeBlendFunc dest) = 0;
00334 
00340         virtual void _setWorldMatrix(const aeMatrix4 &worldMat) = 0;
00341 
00347         virtual void _setViewMatrix(const aeMatrix4 &viewMat) = 0;
00348 
00354         virtual void _setProjectionMatrix(const aeMatrix4 &projMat) = 0;
00355 
00361         virtual void _pushWorldMatrix() = 0;
00362 
00368         virtual void _pushViewMatrix() = 0;
00369 
00375         virtual void _pushProjectionMatrix() = 0;
00376 
00381         virtual void _popWorldMatrix() = 0;
00382 
00387         virtual void _popViewMatrix() = 0;
00388 
00393         virtual void _popProjectionMatrix() = 0;
00394 
00399         virtual void _prepareFrame() = 0;
00400 
00412         virtual void _render(aeRenderOperation &renderOp) = 0;
00413 
00418         virtual void _finishFrame() = 0;
00419 };
00420 
00421 #endif // __AEPLUGIN_AERENDERER_RENDERER_H__

AE Engine Public API Reference
Generated on Wed Apr 9 09:43:40 2003 by Doxygen.