test version of startmenu root with big icons
[reactos.git] / reactos / lib / mesa32 / src / main / buffers.c
1 /**
2 * \file buffers.c
3 * Frame buffer management.
4 */
5
6 /*
7 * Mesa 3-D graphics library
8 * Version: 6.1
9 *
10 * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
11 *
12 * Permission is hereby granted, free of charge, to any person obtaining a
13 * copy of this software and associated documentation files (the "Software"),
14 * to deal in the Software without restriction, including without limitation
15 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16 * and/or sell copies of the Software, and to permit persons to whom the
17 * Software is furnished to do so, subject to the following conditions:
18 *
19 * The above copyright notice and this permission notice shall be included
20 * in all copies or substantial portions of the Software.
21 *
22 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
26 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 */
29
30
31 #include "glheader.h"
32 #include "imports.h"
33 #include "buffers.h"
34 #include "colormac.h"
35 #include "context.h"
36 #include "depth.h"
37 #include "enums.h"
38 #include "stencil.h"
39 #include "state.h"
40 #include "mtypes.h"
41
42
43 #if _HAVE_FULL_GL
44 void GLAPIENTRY
45 _mesa_ClearIndex( GLfloat c )
46 {
47 GET_CURRENT_CONTEXT(ctx);
48 ASSERT_OUTSIDE_BEGIN_END(ctx);
49
50 if (ctx->Color.ClearIndex == (GLuint) c)
51 return;
52
53 FLUSH_VERTICES(ctx, _NEW_COLOR);
54 ctx->Color.ClearIndex = (GLuint) c;
55
56 if (!ctx->Visual.rgbMode && ctx->Driver.ClearIndex) {
57 /* it's OK to call glClearIndex in RGBA mode but it should be a NOP */
58 (*ctx->Driver.ClearIndex)( ctx, ctx->Color.ClearIndex );
59 }
60 }
61 #endif
62
63
64 /**
65 * Specify the clear values for the color buffers.
66 *
67 * \param red red color component.
68 * \param green green color component.
69 * \param blue blue color component.
70 * \param alpha alpha component.
71 *
72 * \sa glClearColor().
73 *
74 * Clamps the parameters and updates gl_colorbuffer_attrib::ClearColor. On a
75 * change, flushes the vertices and notifies the driver via the
76 * dd_function_table::ClearColor callback.
77 */
78 void GLAPIENTRY
79 _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
80 {
81 GLfloat tmp[4];
82 GET_CURRENT_CONTEXT(ctx);
83 ASSERT_OUTSIDE_BEGIN_END(ctx);
84
85 tmp[0] = CLAMP(red, 0.0F, 1.0F);
86 tmp[1] = CLAMP(green, 0.0F, 1.0F);
87 tmp[2] = CLAMP(blue, 0.0F, 1.0F);
88 tmp[3] = CLAMP(alpha, 0.0F, 1.0F);
89
90 if (TEST_EQ_4V(tmp, ctx->Color.ClearColor))
91 return; /* no change */
92
93 FLUSH_VERTICES(ctx, _NEW_COLOR);
94 COPY_4V(ctx->Color.ClearColor, tmp);
95
96 if (ctx->Visual.rgbMode && ctx->Driver.ClearColor) {
97 /* it's OK to call glClearColor in CI mode but it should be a NOP */
98 (*ctx->Driver.ClearColor)(ctx, ctx->Color.ClearColor);
99 }
100 }
101
102
103 /**
104 * Clear buffers.
105 *
106 * \param mask bit-mask indicating the buffers to be cleared.
107 *
108 * Flushes the vertices and verifies the parameter. If __GLcontextRec::NewState
109 * is set then calls _mesa_update_state() to update gl_frame_buffer::_Xmin,
110 * etc. If the rasterization mode is set to GL_RENDER then requests the driver
111 * to clear the buffers, via the dd_function_table::Clear callback.
112 */
113 void GLAPIENTRY
114 _mesa_Clear( GLbitfield mask )
115 {
116 GET_CURRENT_CONTEXT(ctx);
117 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
118
119 if (MESA_VERBOSE & VERBOSE_API)
120 _mesa_debug(ctx, "glClear 0x%x\n", mask);
121
122 if (mask & ~(GL_COLOR_BUFFER_BIT |
123 GL_DEPTH_BUFFER_BIT |
124 GL_STENCIL_BUFFER_BIT |
125 GL_ACCUM_BUFFER_BIT)) {
126 /* invalid bit set */
127 _mesa_error( ctx, GL_INVALID_VALUE, "glClear(0x%x)", mask);
128 return;
129 }
130
131 if (ctx->NewState) {
132 _mesa_update_state( ctx ); /* update _Xmin, etc */
133 }
134
135 if (ctx->RenderMode==GL_RENDER) {
136 const GLint x = ctx->DrawBuffer->_Xmin;
137 const GLint y = ctx->DrawBuffer->_Ymin;
138 const GLint height = ctx->DrawBuffer->_Ymax - ctx->DrawBuffer->_Ymin;
139 const GLint width = ctx->DrawBuffer->_Xmax - ctx->DrawBuffer->_Xmin;
140 GLbitfield ddMask;
141
142 /* don't clear depth buffer if depth writing disabled */
143 if (!ctx->Depth.Mask)
144 mask &= ~GL_DEPTH_BUFFER_BIT;
145
146 /* Build the bitmask to send to device driver's Clear function.
147 * Note that the GL_COLOR_BUFFER_BIT flag will expand to 0, 1, 2 or 4
148 * of the FRONT/BACK_LEFT/RIGHT_BIT flags.
149 */
150 ddMask = 0;
151 if (mask & GL_COLOR_BUFFER_BIT)
152 ddMask |= ctx->Color._DrawDestMask;
153 if ((mask & GL_DEPTH_BUFFER_BIT) && ctx->Visual.depthBits > 0)
154 ddMask |= GL_DEPTH_BUFFER_BIT;
155 if ((mask & GL_STENCIL_BUFFER_BIT) && ctx->Visual.stencilBits > 0)
156 ddMask |= GL_STENCIL_BUFFER_BIT;
157 if ((mask & GL_ACCUM_BUFFER_BIT) && ctx->Visual.accumRedBits > 0)
158 ddMask |= GL_ACCUM_BUFFER_BIT;
159
160 ASSERT(ctx->Driver.Clear);
161 ctx->Driver.Clear( ctx, ddMask, (GLboolean) !ctx->Scissor.Enabled,
162 x, y, width, height );
163 }
164 }
165
166
167 /**
168 * Specify which color buffers to draw into.
169 *
170 * \param mode color buffer combination.
171 *
172 * \sa glDrawBuffer().
173 *
174 * Flushes the vertices and verifies the parameter and updates the
175 * gl_colorbuffer_attrib::_DrawDestMask bitfield. Marks new color state in
176 * __GLcontextRec::NewState and notifies the driver via the
177 * dd_function_table::DrawBuffer callback.
178 */
179 void GLAPIENTRY
180 _mesa_DrawBuffer( GLenum mode )
181 {
182 GET_CURRENT_CONTEXT(ctx);
183 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex... */
184
185 if (MESA_VERBOSE & VERBOSE_API)
186 _mesa_debug(ctx, "glDrawBuffer %s\n", _mesa_lookup_enum_by_nr(mode));
187
188 /*
189 * Do error checking and compute the _DrawDestMask bitfield.
190 */
191 switch (mode) {
192 case GL_FRONT:
193 /* never an error */
194 if (ctx->Visual.stereoMode)
195 ctx->Color._DrawDestMask = DD_FRONT_LEFT_BIT | DD_FRONT_RIGHT_BIT;
196 else
197 ctx->Color._DrawDestMask = DD_FRONT_LEFT_BIT;
198 break;
199 case GL_BACK:
200 if (!ctx->Visual.doubleBufferMode) {
201 _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_BACK)");
202 return;
203 }
204 if (ctx->Visual.stereoMode)
205 ctx->Color._DrawDestMask = DD_BACK_LEFT_BIT | DD_BACK_RIGHT_BIT;
206 else
207 ctx->Color._DrawDestMask = DD_BACK_LEFT_BIT;
208 break;
209 case GL_NONE:
210 /* never an error */
211 ctx->Color._DrawDestMask = 0;
212 break;
213 #if _HAVE_FULL_GL
214 case GL_RIGHT:
215 if (!ctx->Visual.stereoMode) {
216 _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_RIGHT)");
217 return;}
218 if (ctx->Visual.doubleBufferMode)
219 ctx->Color._DrawDestMask = DD_FRONT_RIGHT_BIT | DD_BACK_RIGHT_BIT;
220 else
221 ctx->Color._DrawDestMask = DD_FRONT_RIGHT_BIT;
222 break;
223 case GL_FRONT_RIGHT:
224 if (!ctx->Visual.stereoMode) {
225 _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_FRONT_RIGHT)");
226 return;
227 }
228 ctx->Color._DrawDestMask = DD_FRONT_RIGHT_BIT;
229 break;
230 case GL_BACK_RIGHT:
231 if (!ctx->Visual.stereoMode || !ctx->Visual.doubleBufferMode) {
232 _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_BACK_RIGHT)");
233 return;
234 }
235 ctx->Color._DrawDestMask = DD_BACK_RIGHT_BIT;
236 break;
237 case GL_BACK_LEFT:
238 if (!ctx->Visual.doubleBufferMode) {
239 _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_BACK_LEFT)");
240 return;
241 }
242 ctx->Color._DrawDestMask = DD_BACK_LEFT_BIT;
243 break;
244 case GL_FRONT_AND_BACK:
245 if (!ctx->Visual.doubleBufferMode) {
246 _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_FRONT_AND_BACK)");
247 return;
248 }
249 if (ctx->Visual.stereoMode)
250 ctx->Color._DrawDestMask = DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT
251 | DD_FRONT_RIGHT_BIT | DD_BACK_RIGHT_BIT;
252 else
253 ctx->Color._DrawDestMask = DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT;
254 break;
255 case GL_LEFT:
256 /* never an error */
257 if (ctx->Visual.doubleBufferMode)
258 ctx->Color._DrawDestMask = DD_FRONT_LEFT_BIT | DD_BACK_LEFT_BIT;
259 else
260 ctx->Color._DrawDestMask = DD_FRONT_LEFT_BIT;
261 break;
262 case GL_FRONT_LEFT:
263 /* never an error */
264 ctx->Color._DrawDestMask = DD_FRONT_LEFT_BIT;
265 break;
266 case GL_AUX0:
267 if (ctx->Visual.numAuxBuffers >= 1) {
268 ctx->Color._DrawDestMask = DD_AUX0_BIT;
269 }
270 else {
271 _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_AUX0)" );
272 return;
273 }
274 break;
275 case GL_AUX1:
276 if (ctx->Visual.numAuxBuffers >= 2) {
277 ctx->Color._DrawDestMask = DD_AUX1_BIT;
278 }
279 else {
280 _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_AUX1)" );
281 return;
282 }
283 break;
284 case GL_AUX2:
285 if (ctx->Visual.numAuxBuffers >= 3) {
286 ctx->Color._DrawDestMask = DD_AUX2_BIT;
287 }
288 else {
289 _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_AUX2)" );
290 return;
291 }
292 break;
293 case GL_AUX3:
294 if (ctx->Visual.numAuxBuffers >= 4) {
295 ctx->Color._DrawDestMask = DD_AUX3_BIT;
296 }
297 else {
298 _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawBuffer(GL_AUX3)" );
299 return;
300 }
301 break;
302 #endif
303 default:
304 _mesa_error( ctx, GL_INVALID_ENUM, "glDrawBuffer" );
305 return;
306 }
307
308 ctx->Color.DrawBuffer = mode;
309 ctx->NewState |= _NEW_COLOR;
310
311 /*
312 * Call device driver function.
313 */
314 if (ctx->Driver.DrawBuffer)
315 (*ctx->Driver.DrawBuffer)(ctx, mode);
316 }
317
318
319 /**
320 * Set the color buffer source for reading pixels.
321 *
322 * \param mode color buffer.
323 *
324 * \sa glReadBuffer().
325 *
326 * Verifies the parameter and updates gl_pixel_attrib::_ReadSrcMask. Marks
327 * new pixel state in __GLcontextRec::NewState and notifies the driver via
328 * dd_function_table::ReadBuffer.
329 */
330 void GLAPIENTRY
331 _mesa_ReadBuffer( GLenum mode )
332 {
333 GET_CURRENT_CONTEXT(ctx);
334 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
335
336 if (MESA_VERBOSE & VERBOSE_API)
337 _mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(mode));
338
339 /*
340 * Do error checking and compute ctx->Pixel._ReadSrcMask.
341 */
342 switch (mode) {
343 case GL_LEFT:
344 case GL_FRONT:
345 case GL_FRONT_LEFT:
346 /* Front-Left buffer, always exists */
347 ctx->Pixel._ReadSrcMask = DD_FRONT_LEFT_BIT;
348 break;
349 case GL_BACK:
350 case GL_BACK_LEFT:
351 /* Back-Left buffer, requires double buffering */
352 if (!ctx->Visual.doubleBufferMode) {
353 _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" );
354 return;
355 }
356 ctx->Pixel._ReadSrcMask = DD_BACK_LEFT_BIT;
357 break;
358 #if _HAVE_FULL_GL
359 case GL_FRONT_RIGHT:
360 case GL_RIGHT:
361 if (!ctx->Visual.stereoMode) {
362 _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" );
363 return;
364 }
365 ctx->Pixel._ReadSrcMask = DD_FRONT_RIGHT_BIT;
366 break;
367 case GL_BACK_RIGHT:
368 if (!ctx->Visual.stereoMode || !ctx->Visual.doubleBufferMode) {
369 _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer" );
370 return;
371 }
372 ctx->Pixel._ReadSrcMask = DD_BACK_RIGHT_BIT;
373 break;
374 case GL_AUX0:
375 if (ctx->Visual.numAuxBuffers >= 1) {
376 ctx->Pixel._ReadSrcMask = DD_AUX0_BIT;
377 }
378 else {
379 _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer(GL_AUX0)" );
380 return;
381 }
382 break;
383 case GL_AUX1:
384 if (ctx->Visual.numAuxBuffers >= 2) {
385 ctx->Pixel._ReadSrcMask = DD_AUX1_BIT;
386 }
387 else {
388 _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer(GL_AUX1)" );
389 return;
390 }
391 break;
392 case GL_AUX2:
393 if (ctx->Visual.numAuxBuffers >= 3) {
394 ctx->Pixel._ReadSrcMask = DD_AUX2_BIT;
395 }
396 else {
397 _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer(GL_AUX2)" );
398 return;
399 }
400 break;
401 case GL_AUX3:
402 if (ctx->Visual.numAuxBuffers >= 4) {
403 ctx->Pixel._ReadSrcMask = DD_AUX3_BIT;
404 }
405 else {
406 _mesa_error( ctx, GL_INVALID_OPERATION, "glReadBuffer(GL_AUX3)" );
407 return;
408 }
409 break;
410 #endif
411 default:
412 _mesa_error( ctx, GL_INVALID_ENUM, "glReadBuffer" );
413 return;
414 }
415
416 ctx->Pixel.ReadBuffer = mode;
417 ctx->NewState |= _NEW_PIXEL;
418
419 /*
420 * Call device driver function.
421 */
422 if (ctx->Driver.ReadBuffer)
423 (*ctx->Driver.ReadBuffer)(ctx, mode);
424 }
425
426 #if _HAVE_FULL_GL
427
428 /**
429 * GL_MESA_resize_buffers extension.
430 *
431 * When this function is called, we'll ask the window system how large
432 * the current window is. If it's a new size, we'll call the driver's
433 * ResizeBuffers function. The driver will then resize its color buffers
434 * as needed, and maybe call the swrast's routine for reallocating
435 * swrast-managed depth/stencil/accum/etc buffers.
436 * \note This function may be called from within Mesa or called by the
437 * user directly (see the GL_MESA_resize_buffers extension).
438 */
439 void GLAPIENTRY
440 _mesa_ResizeBuffersMESA( void )
441 {
442 GET_CURRENT_CONTEXT(ctx);
443
444 if (MESA_VERBOSE & VERBOSE_API)
445 _mesa_debug(ctx, "glResizeBuffersMESA\n");
446
447 if (ctx) {
448 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx );
449
450 if (ctx->DrawBuffer) {
451 GLuint buf_width, buf_height;
452 GLframebuffer *buffer = ctx->DrawBuffer;
453
454 /* ask device driver for size of output buffer */
455 (*ctx->Driver.GetBufferSize)( buffer, &buf_width, &buf_height );
456
457 /* see if size of device driver's color buffer (window) has changed */
458 if (buffer->Width == buf_width && buffer->Height == buf_height)
459 return; /* size is as expected */
460
461 buffer->Width = buf_width;
462 buffer->Height = buf_height;
463
464 ctx->Driver.ResizeBuffers( buffer );
465 }
466
467 if (ctx->ReadBuffer && ctx->ReadBuffer != ctx->DrawBuffer) {
468 GLuint buf_width, buf_height;
469 GLframebuffer *buffer = ctx->ReadBuffer;
470
471 /* ask device driver for size of read buffer */
472 (*ctx->Driver.GetBufferSize)( buffer, &buf_width, &buf_height );
473
474 /* see if size of device driver's color buffer (window) has changed */
475 if (buffer->Width == buf_width && buffer->Height == buf_height)
476 return; /* size is as expected */
477
478 buffer->Width = buf_width;
479 buffer->Height = buf_height;
480
481 ctx->Driver.ResizeBuffers( buffer );
482 }
483
484 ctx->NewState |= _NEW_BUFFERS; /* to update scissor / window bounds */
485 }
486 }
487
488 /*
489 * XXX move somewhere else someday?
490 */
491 void GLAPIENTRY
492 _mesa_SampleCoverageARB(GLclampf value, GLboolean invert)
493 {
494 GET_CURRENT_CONTEXT(ctx);
495
496 if (!ctx->Extensions.ARB_multisample) {
497 _mesa_error(ctx, GL_INVALID_OPERATION, "glSampleCoverageARB");
498 return;
499 }
500
501 ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx );
502 ctx->Multisample.SampleCoverageValue = (GLfloat) CLAMP(value, 0.0, 1.0);
503 ctx->Multisample.SampleCoverageInvert = invert;
504 ctx->NewState |= _NEW_MULTISAMPLE;
505 }
506
507 #endif
508
509
510 /**
511 * Define the scissor box.
512 *
513 * \param x, y coordinates of the scissor box lower-left corner.
514 * \param width width of the scissor box.
515 * \param height height of the scissor box.
516 *
517 * \sa glScissor().
518 *
519 * Verifies the parameters and updates __GLcontextRec::Scissor. On a
520 * change flushes the vertices and notifies the driver via
521 * the dd_function_table::Scissor callback.
522 */
523 void GLAPIENTRY
524 _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height )
525 {
526 GET_CURRENT_CONTEXT(ctx);
527 ASSERT_OUTSIDE_BEGIN_END(ctx);
528
529 if (width < 0 || height < 0) {
530 _mesa_error( ctx, GL_INVALID_VALUE, "glScissor" );
531 return;
532 }
533
534 if (MESA_VERBOSE & VERBOSE_API)
535 _mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height);
536
537 if (x == ctx->Scissor.X &&
538 y == ctx->Scissor.Y &&
539 width == ctx->Scissor.Width &&
540 height == ctx->Scissor.Height)
541 return;
542
543 FLUSH_VERTICES(ctx, _NEW_SCISSOR);
544 ctx->Scissor.X = x;
545 ctx->Scissor.Y = y;
546 ctx->Scissor.Width = width;
547 ctx->Scissor.Height = height;
548
549 if (ctx->Driver.Scissor)
550 ctx->Driver.Scissor( ctx, x, y, width, height );
551 }
552
553 /**********************************************************************/
554 /** \name State management */
555 /*@{*/
556
557 /**
558 * Update screen bounds.
559 *
560 * \param ctx GL context.
561 *
562 * Update gl_frame_buffer::_Xmin, and etc.
563 */
564 void _mesa_update_buffers( GLcontext *ctx )
565 {
566 ctx->DrawBuffer->_Xmin = 0;
567 ctx->DrawBuffer->_Ymin = 0;
568 ctx->DrawBuffer->_Xmax = ctx->DrawBuffer->Width;
569 ctx->DrawBuffer->_Ymax = ctx->DrawBuffer->Height;
570 if (ctx->Scissor.Enabled) {
571 if (ctx->Scissor.X > ctx->DrawBuffer->_Xmin) {
572 ctx->DrawBuffer->_Xmin = ctx->Scissor.X;
573 }
574 if (ctx->Scissor.Y > ctx->DrawBuffer->_Ymin) {
575 ctx->DrawBuffer->_Ymin = ctx->Scissor.Y;
576 }
577 if (ctx->Scissor.X + ctx->Scissor.Width < ctx->DrawBuffer->_Xmax) {
578 ctx->DrawBuffer->_Xmax = ctx->Scissor.X + ctx->Scissor.Width;
579 }
580 if (ctx->Scissor.Y + ctx->Scissor.Height < ctx->DrawBuffer->_Ymax) {
581 ctx->DrawBuffer->_Ymax = ctx->Scissor.Y + ctx->Scissor.Height;
582 }
583 }
584 }
585
586 /*@}*/
587
588
589 /**********************************************************************/
590 /** \name Initialization */
591 /*@{*/
592
593 /**
594 * Initialize the context scissor data.
595 *
596 * \param ctx GL context.
597 *
598 * Initializes the __GLcontextRec::Scissor and __GLcontextRec::Multisample
599 * attribute groups, and related constants in __GLcontextRec::Const.
600 */
601 void _mesa_init_buffers( GLcontext * ctx )
602 {
603 /* Scissor group */
604 ctx->Scissor.Enabled = GL_FALSE;
605 ctx->Scissor.X = 0;
606 ctx->Scissor.Y = 0;
607 ctx->Scissor.Width = 0;
608 ctx->Scissor.Height = 0;
609
610 /* Multisample */
611 ctx->Multisample.Enabled = GL_FALSE;
612 ctx->Multisample.SampleAlphaToCoverage = GL_FALSE;
613 ctx->Multisample.SampleAlphaToOne = GL_FALSE;
614 ctx->Multisample.SampleCoverage = GL_FALSE;
615 ctx->Multisample.SampleCoverageValue = 1.0;
616 ctx->Multisample.SampleCoverageInvert = GL_FALSE;
617
618 }
619
620 /*@}*/