CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ivideo/rndbuf.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2002 by Marten Svanfeldt
00003                           Anders Stenberg
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 */
00019 
00020 #ifndef __CS_IVIDEO_RNDBUF_H__
00021 #define __CS_IVIDEO_RNDBUF_H__
00022 
00031 #include "csutil/strset.h"
00032 
00033 class csVector3;
00034 class csVector2;
00035 class csColor;
00036 class csReversibleTransform;
00037 struct iTextureHandle;
00038 struct iMaterialWrapper;
00039 
00040 
00046 enum csRenderBufferType
00047 {
00049   CS_BUF_DYNAMIC,
00051   CS_BUF_STATIC,
00053   CS_BUF_STREAM
00054 };
00055 
00057 enum csRenderBufferComponentType
00058 {
00059   CS_BUFCOMP_BYTE = 0,
00060   CS_BUFCOMP_UNSIGNED_BYTE,
00061   CS_BUFCOMP_SHORT,
00062   CS_BUFCOMP_UNSIGNED_SHORT,
00063   CS_BUFCOMP_INT,
00064   CS_BUFCOMP_UNSIGNED_INT,
00065   CS_BUFCOMP_FLOAT,
00066   CS_BUFCOMP_DOUBLE
00067 };
00068 
00074 enum csRenderBufferLockType
00075 {
00076   CS_BUF_LOCK_NOLOCK,
00077   CS_BUF_LOCK_NORMAL,
00078   //CS_BUF_LOCK_RENDER
00079 };
00080 
00081 SCF_VERSION (iRenderBuffer, 0, 0, 3);
00082 
00087 struct iRenderBuffer : public iBase
00088 {
00098   virtual void* Lock(csRenderBufferLockType lockType, 
00099     bool samePointer = false) = 0;
00100 
00102   virtual void Release() = 0;
00103 
00104   virtual void CopyToBuffer(const void *data, int length) = 0;
00105 
00107   virtual void SetComponentCount (int count) = 0;
00108 
00110   virtual int GetComponentCount () const = 0;
00111 
00113   virtual void SetComponentType (csRenderBufferComponentType type) = 0;
00114 
00116   virtual csRenderBufferComponentType GetComponentType () const = 0;
00117 
00119   virtual csRenderBufferType GetBufferType() const = 0;
00120 
00122   virtual int GetSize() const = 0;
00123 
00124   virtual void SetStride(int stride) = 0;
00125 
00126   virtual int GetStride() const = 0;
00127 
00128   virtual void SetOffset(int offset) = 0;
00129 };
00130 
00133 #endif // __CS_IVIDEO_RNDBUF_H__

Generated for Crystal Space by doxygen 1.2.18