1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
40 #ifndef _OSGEGLWINDOWDATAFIELDS_H_
41 #define _OSGEGLWINDOWDATAFIELDS_H_
47 #include "OSGConfig.h"
49 // Forget everything if we're not doing a windows compile
52 #include "gles/egltypes.h"
54 #include "OSGWindowEGLDef.h"
56 #include "OSGWindowFields.h"
57 #include "OSGSysSFields.h"
59 //#include "windows.h"
61 /*! The field types for the local types needed by the EGLWINdow class */
67 struct FieldTraits<EGLDisplay> :
68 public FieldTraitsPtrToStringTemplateBase<EGLDisplay>
70 typedef FieldTraits<EGLDisplay> Self;
71 static DataType _type;
73 enum { Convertible = (Self::ToStringConvertible |
74 Self::FromStringConvertible)};
76 OSG_WINDOWEGL_DLLMAPPING
77 static DataType &getType (void);
79 static char *getSName(void) { return "SFEGLDisplay"; }
80 static char *getMName(void) { return "MFEGLDisplay"; }
82 static bool getFromCString( EGLDisplay &,
88 static void putToString (const EGLDisplay &,
91 outStr.assign("EGLDisplay");
97 struct FieldTraits
<EGLSurface
> :
98 public FieldTraitsPtrToStringTemplateBase
<EGLSurface
>
100 static DataType _type
;
101 typedef FieldTraits
<EGLSurface
> Self
;
103 enum { Convertible
= (Self::ToStringConvertible
|
104 Self::FromStringConvertible
)};
106 static DataType
&getType (void);
108 static char *getSName(void) { return "SFEGLSurface"; }
109 static char *getMName(void) { return "MFEGLSurface"; }
111 static bool getFromCString( EGLSurface
&,
117 static void putToString (const EGLSurface
&,
120 outStr
.assign("EGLSurface");
125 struct FieldTraits
<EGLContext
> :
126 public FieldTraitsPtrToStringTemplateBase
<EGLContext
>
128 static DataType _type
;
129 typedef FieldTraits
<EGLContext
> Self
;
131 enum { Convertible
= (Self::ToStringConvertible
|
132 Self::FromStringConvertible
)};
134 static DataType
&getType (void);
136 static char *getSName(void) { return "SFEGLContext"; }
137 static char *getMName(void) { return "MFEGLContext"; }
139 static bool getFromCString( EGLContext
&,
145 static void putToString (const EGLContext
&,
148 outStr
.assign("EGLContext");
154 struct FieldTraits
<PAINTSTRUCT
> :
155 public FieldTraitsPtrToStringTemplateBase
<PAINTSTRUCT
>
157 static DataType _type
;
158 typedef FieldTraits
<PAINTSTRUCT
> Self
;
160 enum { Convertible
= (Self::ToStringConvertible
|
161 Self::FromStringConvertible
)};
163 static DataType
&getType (void);
165 static char *getSName(void) { return "SFPAINTSTRUCT"; }
166 static char *getMName(void) { return "MFPAINTSTRUCT"; }
168 static bool getFromCString( PAINTSTRUCT
&,
174 static void putToString (const PAINTSTRUCT
&,
177 outStr
.assign("PAINTSTRUCT");
183 //! \ingroup GrpBaseFieldSingle
185 //typedef SField<HWND> SFHWND;
186 typedef SFInt32 SFEGLDisplay
;
189 //! \ingroup GrpBaseFieldSingle
191 typedef SField
<EGLSurface
> SFEGLSurface
;
194 //! \ingroup GrpBaseFieldSingle
196 typedef SField
<EGLContext
> SFEGLContext
;
202 #endif /* OSG_USE_GLES */
204 #endif /* _OSGEGLWINDOWDATAFIELDS_H_ */