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 00045 enum csRenderBufferType 00046 { 00047 CS_BUF_DYNAMIC, 00048 CS_BUF_STATIC 00049 // @@@ what about CS_BUF_STREAM ? ... 00050 }; 00051 00053 enum csRenderBufferComponentType 00054 { 00055 CS_BUFCOMP_BYTE = 0, 00056 CS_BUFCOMP_UNSIGNED_BYTE, 00057 CS_BUFCOMP_SHORT, 00058 CS_BUFCOMP_UNSIGNED_SHORT, 00059 CS_BUFCOMP_INT, 00060 CS_BUFCOMP_UNSIGNED_INT, 00061 CS_BUFCOMP_FLOAT, 00062 CS_BUFCOMP_DOUBLE 00063 }; 00064 00070 enum csRenderBufferLockType 00071 { 00072 CS_BUF_LOCK_NOLOCK, 00073 CS_BUF_LOCK_NORMAL, 00074 //CS_BUF_LOCK_RENDER 00075 }; 00076 00077 SCF_VERSION (iRenderBuffer, 0, 0, 2); 00078 00083 struct iRenderBuffer : public iBase 00084 { 00089 virtual void* Lock(csRenderBufferLockType lockType) = 0; 00090 00092 virtual void Release() = 0; 00093 00094 virtual void CopyToBuffer(void *data, int length) = 0; 00095 00097 virtual void SetComponentCount (int count) = 0; 00098 00100 virtual int GetComponentCount () const = 0; 00101 00103 virtual void SetComponentType (csRenderBufferComponentType type) = 0; 00104 00106 virtual csRenderBufferComponentType GetComponentType () const = 0; 00107 00109 virtual csRenderBufferType GetBufferType() const = 0; 00110 00112 virtual int GetSize() const = 0; 00113 00114 virtual void SetStride(int stride) = 0; 00115 00116 virtual int GetStride() const = 0; 00117 00118 virtual void SetOffset(int offset) = 0; 00119 }; 00120 00123 #endif // __CS_IVIDEO_RNDBUF_H__
Generated for Crystal Space by doxygen 1.2.18