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

OpenGLBufferC.h

00001 //-------------------------------------------------------------------------
00002 //
00003 // File:        OpenGLBufferI.h
00004 // Desc:        OpenGL off-screen graphics rendering interface.
00005 // Author:      memon <memon@inside.org>
00006 //
00007 //-------------------------------------------------------------------------
00008 //  Copyright (c) 2000 Moppi Productions. All Rights Reserved.
00009 //  This file is part of Moppi Demopaja SDK. For conditions of 
00010 //  distribution and use, see the accompanying license.txt file.
00011 //  http://moppi.inside.org/demopaja/
00012 //-------------------------------------------------------------------------
00013 
00014 #ifndef __DEMOPAJA_OPENGLBUFFERC_H__
00015 #define __DEMOPAJA_OPENGLBUFFERC_H__
00016 
00017 // Forward declaration
00018 namespace PajaSystem {
00019     class OpenGLBufferC;
00020 };
00021 
00022 #include <gl\gl.h>
00023 #include "wglext.h"
00024 #include "PajaTypes.h"
00025 #include "DeviceInterfaceI.h"
00026 #include "DataBlockI.h"
00027 #include "ClassIdC.h"
00028 #include "GraphicsDeviceI.h"
00029 #include "OpenGLViewportC.h"
00030 #include "OpenGLDeviceC.h"
00031 
00032 namespace PajaSystem {
00033 
00034 
00036     const PluginClass::ClassIdC CLASS_OPENGL_BUFFER = PluginClass::ClassIdC( 0, 10003 );
00037 
00038 
00040 
00042     class OpenGLBufferC : public GraphicsBufferI
00043     {
00044     public:
00046         virtual Edit::DataBlockI*               create();
00047         static OpenGLBufferC*                   create_new( GraphicsDeviceI* pDevice );
00048         virtual PluginClass::ClassIdC           get_class_id() const;
00049         virtual const char*                     get_class_name();
00050         virtual DeviceInterfaceI*               query_interface( const PluginClass::SuperClassIdC& rSuperClassId );
00051 
00053         virtual void                            set_graphicsdevice( GraphicsDeviceI* pDevice );
00054 
00056 
00059         virtual bool                            init( PajaTypes::uint32 ui32Flags,
00060                                                       PajaTypes::uint32 ui32Width = 0,
00061                                                       PajaTypes::uint32 ui32Height = 0 );
00063         virtual void                            flush();
00064 
00066         virtual void                            bind_texture( PajaSystem::DeviceInterfaceI* pInterface, PajaTypes::uint32 ui32Properties );
00067 
00069         virtual void                            read_pixels( PajaTypes::uint32 ui32Flags, void* pData );
00070 
00071         virtual void                            activate();
00072 
00073     protected:
00074         OpenGLBufferC();
00075         OpenGLBufferC( GraphicsDeviceI* pDevice );
00076         virtual ~OpenGLBufferC();
00077 
00078         void        destroy();
00079 
00080         OpenGLDeviceC*      m_pParentDev;
00081         OpenGLViewportC*    m_pViewport;
00082 
00083         HPBUFFERARB         m_hPBuffer;
00084         HDC                 m_hPBufferDC;
00085         HGLRC               m_hPBufferRC;
00086         PajaTypes::uint32   m_ui32InitFlags;
00087 
00088         PajaTypes::uint32   m_ui32PBufferTexID;
00089     };
00090 
00091 };  // namespace
00092 
00093 #endif // __DEMOPAJA_GRAPHICSBUFFERI_H__

Moppi Demopaja SDK Documentation -- Copyright © 2000-2002 Moppi Productions