00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef CYBPIXELTEXTUREC_H
00027 #define CYBPIXELTEXTUREC_H
00028
00029
00030 #include "oaw/ctk/cybtexturec.h"
00031 #include "oaw/misc/stringc.h"
00032 #include "oaw/ctk/cybwrlfields.h"
00033 #include "oaw/misc/urlc.h"
00034 #include "../oawconfig.h"
00035
00036 OAW_BEGIN_NAMESPACE
00037
00038
00039 class OAW_DLLMAPPING CybPixelTextureC : public CybTextureC
00040 {
00041
00042 public:
00043 CybPixelTextureC(CybWorldC*);
00044 virtual ~CybPixelTextureC();
00045 CybPixelTextureC(const CybPixelTextureC&);
00046 CybPixelTextureC& operator = (const CybPixelTextureC&);
00047 virtual void Load_image(char*&, const char*,long&);
00048
00049 virtual void FinishInit();
00050 virtual int AddSrc ( CybNodeC* pN,const StringC &a1,const StringC &a2 );
00051
00052 virtual void SetEvent(long,const void*, BaseI*);
00053 virtual long BufEvent(long,const void*, BaseI*);
00054 virtual long GetEventBufMaxDataSize();
00055 virtual long GetEventBufMinDataSize();
00056 virtual short CopyEventBuf(AnyC&,long);
00057 virtual short SetEventBuf(AnyC&,BaseI*);
00058
00059 protected:
00060 virtual void PrepareImage();
00061 void CreateNewCopy(CybNodeC* pN);
00062
00063 protected:
00064 SFImage* m_pImage;
00065
00066 long m_imageGLWidthBuf;
00067 long m_imageGLHeightBuf;
00068
00069 short m_channelsBuf;
00070 unsigned char* m_glPixelBuf;
00071
00072 long m_imageGLWidth;
00073 long m_imageGLHeight;
00074 short m_channels;
00075 unsigned char* m_glPixel;
00076
00077 long m_copyEventBufState;
00078
00079 long m_subTexChanged;
00080 long m_subTexOffSetX;
00081 long m_subTexOffSetY;
00082 long m_subTexWidth;
00083 long m_subTexHeight;
00084
00085 long m_maxTexDim;
00086
00087 };
00088
00089 OAW_END_NAMESPACE
00090
00091
00092 #endif
00093
00094
00095
00096
00097