VirtualBox

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

最後變更 在這個檔案從53090是 15532,由 vboxsync 提交於 16 年 前

crOpenGL: export to OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.3 KB
 
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
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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