VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_multisample.c@ 20961

Last change on this file since 20961 was 15532, checked in by vboxsync, 16 years ago

crOpenGL: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7#include <stdio.h>
8#include "state.h"
9#include "state/cr_statetypes.h"
10#include "state_internals.h"
11
12void crStateMultisampleInit (CRContext *ctx)
13{
14 CRMultisampleState *m = &ctx->multisample;
15 CRStateBits *sb = GetCurrentBits();
16 CRMultisampleBits *mb = &(sb->multisample);
17
18 m->enabled = GL_FALSE; /* TRUE if the visual supports it */
19 m->sampleAlphaToCoverage = GL_FALSE;
20 m->sampleAlphaToOne = GL_FALSE;
21 m->sampleCoverage = GL_FALSE;
22 RESET(mb->enable, ctx->bitid);
23
24 m->sampleCoverageValue = 1.0F;
25 m->sampleCoverageInvert = GL_FALSE;
26 RESET(mb->sampleCoverageValue, ctx->bitid);
27
28 RESET(mb->dirty, ctx->bitid);
29}
30
31void STATE_APIENTRY crStateSampleCoverageARB(GLclampf value, GLboolean invert)
32{
33 CRContext *g = GetCurrentContext();
34 CRMultisampleState *m = &(g->multisample);
35 CRStateBits *sb = GetCurrentBits();
36 CRMultisampleBits *mb = &(sb->multisample);
37
38 if (g->current.inBeginEnd)
39 {
40 crStateError(__LINE__, __FILE__, GL_INVALID_OPERATION, "glStateSampleCoverageARB called in begin/end");
41 return;
42 }
43
44 FLUSH();
45
46 m->sampleCoverageValue = value;
47 m->sampleCoverageInvert = invert;
48 DIRTY(mb->dirty, g->neg_bitid);
49 DIRTY(mb->sampleCoverageValue, g->neg_bitid);
50}
51
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette