KGLLib
core/kgllib/renderer.h
00001 /*
00002  * Copyright (C) 2008 Rivo Laks <rivolaks@hot.ee>
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either 
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public 
00015  * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #ifndef KGLLIB_RENDERER_H
00019 #define KGLLIB_RENDERER_H
00020 
00021 #include "kgllib.h"
00022 
00023 namespace KGLLib
00024 {
00025 class TextureBase;
00026 class Program;
00027 
00028 class KGLLIB_EXPORT Renderer
00029 {
00030 public:
00031     Renderer();
00032     virtual ~Renderer();
00033 
00034     virtual bool init();
00035 
00036     virtual bool bindTexture(const TextureBase* tex);
00037     virtual bool unbindTexture(const TextureBase* tex);
00038     virtual bool enableTexture(const TextureBase* tex);
00039     virtual bool disableTexture(const TextureBase* tex);
00040 
00041     virtual bool bindProgram(const Program* prog);
00042 
00043     // The highly experimental API follows:
00044     void setDefaultTextureFilter(GLenum filter);
00045     void setDefaultTextureWrapMode(GLenum mode);
00046     void setAutoDebugOutput(bool output);
00047 
00048     GLenum defaultTextureFilter() const  { return mDefaultTextureFilter; }
00049     GLenum defaultTextureWrapMode() const  { return mDefaultTextureWrapMode; }
00050     bool autoDebugOutput() const  { return mAutoDebugOutput; }
00051 
00052 private:
00053     GLenum mDefaultTextureFilter;
00054     GLenum mDefaultTextureWrapMode;
00055     bool mAutoDebugOutput;
00056 };
00057 
00058 }
00059 
00060 #endif