5 @SuppressWarnings public class QSurfaceFormat : QCore{
6 public QSurfaceFormat(){
7 nativehandle = QtXnl.createNObject(QType.qtSurfaceFormat, 0);
14 public enum FormatOption {
15 StereoBuffers = 0x0001,
16 DebugContext = 0x0002,
17 DeprecatedFunctions = 0x0004,
18 ResetNotification = 0x0008
21 public enum SwapBehavior {
28 public enum RenderableType {
29 DefaultRenderableType = 0x0,
35 public enum OpenGLContextProfile {
42 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETDEPTHBUFFERSIZE, size);
46 return QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_DEPTHBUFFERSIZE);
50 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETSTENCILBUFFERSIZE, size);
54 return QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_STENCILBUFFERSIZE);
58 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETREDBUFFERSIZE, size);
62 return QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_REDBUFFERSIZE);
66 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETGREENBUFFERSIZE, size);
70 return QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_GREENBUFFERSIZE);
74 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETBLUEBUFFERSIZE, size);
78 return QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_BLUEBUFFERSIZE);
82 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETALPHABUFFERSIZE, size);
86 return QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_ALPHABUFFERSIZE);
90 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETSAMPLES, numSamples);
94 return QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_SAMPLES);
98 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETSWAPBEHAVIOR, behavior);
102 return (SwapBehavior)QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_SWAPBEHAVIOR);
106 return QtXnl.widget_get_bool_value(nativehandle, Constant.QSURFACEFORMAT_HASALPHA);
118 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETRENDERABLETYPE, type);
122 return (RenderableType)QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_RENDERABLETYPE);
126 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETMAJORVERSION, majorVersion);
130 return QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_MAJORVERSION);
134 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETMINORVERSION, minorVersion);
138 return QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_MINORVERSION);
142 QtXnl.widget_set_v2int_value(nativehandle, Constant.QSURFACEFORMAT_SETVERSION, major, minor);
146 return QtXnl.widget_get_bool_value(nativehandle, Constant.QSURFACEFORMAT_STEREO);
150 QtXnl.widget_set_bool_value(nativehandle, Constant.QSURFACEFORMAT_SETSTEREO, enable);
154 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETOPTIONS, options);
158 QtXnl.widget_set_int_bool_value(nativehandle, Constant.QSURFACEFORMAT_SETOPTION,option, on);
162 return QtXnl.widget_get_int_bool(nativehandle, Constant.QSURFACEFORMAT_TESTOPTION,option);
166 return (FormatOption)QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_OPTIONS);
170 return QtXnl.widget_get_int_value(nativehandle, Constant.QSURFACEFORMAT_SWAPINTERVAL);
174 QtXnl.widget_set_vint_value(nativehandle, Constant.QSURFACEFORMAT_SETSWAPINTERVAL, interval);
178 QtXnl.widget_set_native_value(0, Constant.QSURFACEFORMAT_SETDEFAULTFORMAT, format.nativehandle);
182 return new QSurfaceFormat(QtXnl.long_get(0, Constant.QSURFACEFORMAT_DEFAULTFORMAT));
186 if (nativehandle != 0){
187 QtXnl.widget_slot(nativehandle, Constant.QSURFACEFORMAT);