00001 #ifndef __OPENGLGUIDRAWINTERFACEC_H__
00002 #define __OPENGLGUIDRAWINTERFACEC_H__
00003
00004 #define WIN32_LEAN_AND_MEAN
00005 #include <windows.h>
00006 #include <gl\gl.h>
00007
00008
00009 namespace PajaSystem {
00010 class OpenGLGUIDrawInterfaceC;
00011 };
00012
00013 #include "PajaTypes.h"
00014 #include "BBox2C.h"
00015 #include "ColorC.h"
00016 #include "Vector2C.h"
00017 #include "DeviceInterfaceI.h"
00018 #include "GUIDrawInterfaceI.h"
00019 #include "OpenGLViewportC.h"
00020 #include "OpenGLDeviceC.h"
00021
00022
00023 namespace PajaSystem {
00024
00026 const PluginClass::ClassIdC CLASS_OPENGL_GUIINTERFACE = PluginClass::ClassIdC( 0, 10002 );
00027
00028
00029 class OpenGLGUIDrawInterfaceC : public GUIDrawInterfaceI
00030 {
00031 public:
00032
00033 virtual Edit::DataBlockI* create();
00034 static OpenGLGUIDrawInterfaceC* create_new( OpenGLDeviceC* pDevice );
00035 virtual PluginClass::ClassIdC get_class_id() const;
00036 virtual const char* get_class_name();
00037
00038
00039 virtual void draw_layout( const PajaTypes::ColorC& rLayout );
00040
00041 virtual void begin_layout();
00042 virtual void end_layout();
00043
00044
00045 virtual void use_font( HFONT hFont );
00046
00047 virtual void draw_text( const PajaTypes::Vector2C& rPos, const char* szText );
00048
00049
00050 virtual void set_color( const PajaTypes::ColorC& rColor );
00051
00052 virtual void set_point_size( PajaTypes::float32 f32Size );
00053
00054 virtual void draw_line( const PajaTypes::Vector2C& rFrom, const PajaTypes::Vector2C& rTo );
00055
00056 virtual void draw_point( const PajaTypes::Vector2C& rPos );
00057
00058 virtual void draw_grid( PajaTypes::float32 f32Width, PajaTypes::float32 f32Height, PajaTypes::float32 f32GridSize );
00059
00060 virtual void draw_selection_box( const PajaTypes::Vector2C& rMin, const PajaTypes::Vector2C& rMax );
00061
00062 virtual void draw_box( const PajaTypes::Vector2C& rMin, const PajaTypes::Vector2C& rMax );
00063
00064 virtual void draw_marker( const PajaTypes::Vector2C& rPos, PajaTypes::float32 f32Size );
00065
00066 protected:
00067 OpenGLGUIDrawInterfaceC();
00068 OpenGLGUIDrawInterfaceC( OpenGLDeviceC* pDevice );
00069 virtual ~OpenGLGUIDrawInterfaceC();
00070
00071 private:
00072 OpenGLDeviceC* m_pDevice;
00073 DWORD m_dwFontListStart;
00074
00075 };
00076
00077 };
00078
00079 #endif