00001
00029 #ifndef INC_MI32_MG2GLX_H
00030 #define INC_MI32_MG2GLX_H
00031
00032 #ifndef INC_MI32_MGD2_H
00033 #include <mi32/mgd2.h>
00034 #endif
00035
00036 #ifndef INC_MI32_MIGLX_H
00037 #include <mi32/miglx.h>
00038 #endif
00039
00040
00041 namespace MGD {
00042
00044 class DEVICE_GLX : public DEVICE {
00045
00046 public:
00047
00049 enum BUFFER {
00050 BUFFER_Front = 1,
00051 BUFFER_Back = 2,
00052 BUFFER_FrontAndBack = 3,
00053 BUFFER_FrontLeftAndRight = 4,
00054 BUFFER_BackLeftAndRight = 5,
00055 BUFFER_All = 6
00056 };
00057
00059 DEVICE_GLX ();
00060
00062 virtual ~DEVICE_GLX ();
00063
00067 ERRVALUE Create (
00068 MIGLX::CONTEXT& GlxContext,
00069 XID xwindow,
00070 BUFFER buffer
00071 );
00072
00074 bool IsStereo () const
00075 { return (m_IsStereo); }
00076
00078 void NotifyChangeWindow ();
00079
00080 private:
00081 #ifndef GENERATING_DOXYGEN_OUTPUT
00082 typedef DEVICE BASECLASS;
00083
00084 class CONTEXT;
00085
00086 MIGLX::CONTEXT *m_pGlxContext;
00087 SIMPLE_ARRAY<UINT8> m_RowBuffer;
00088 XID m_xwindow;
00089 UINT32 m_glBuffer;
00090 UINT32 m_glBufferLeft;
00091 UINT32 m_glBufferRight;
00092 bool m_IsStereo;
00093
00094
00095 DEVICE_GLX (const DEVICE_GLX&);
00096 DEVICE_GLX& operator= (const DEVICE_GLX&);
00097
00098 void SetupGlxContext (UINT16 FrameBuffer);
00099
00100
00101 virtual bool v_AvoidFillSpans () const;
00102 virtual ERRVALUE v_Clear (const COLOR& color);
00103 virtual MGD::CONTEXT* v_CreateContext ();
00104 virtual ERRVALUE v_FillSpan (MGD::CONTEXT *gc, INT32 x1, INT32 x2, INT32 y);
00105 virtual CAPABILITY v_GetCapabilities () const;
00106 virtual UINT8* v_GetImagePointer (INT32 x, INT32 y, INT32 len, UINT16 FrameBuffer);
00107 virtual UINT16 v_GetNumFrameBuffers () const;
00108 #endif // GENERATING_DOXYGEN_OUTPUT
00109
00110 };
00111
00112 }
00113
00114
00115 #endif // INC_MI32_MG2GLX_H
00116