1 | # Copyright (c) 2001, Stanford University
|
---|
2 | # All rights reserved.
|
---|
3 | #
|
---|
4 | # See the file LICENSE.txt for information on redistributing this software.
|
---|
5 | :enableSmooth:pointSmooth:GL_POINT_SMOOTH
|
---|
6 | :size:pointSize:PointSize
|
---|
7 | :minSize:minSize:PointParameterfARB,GL_POINT_SIZE_MIN_ARB
|
---|
8 | :maxSize:maxSize:PointParameterfARB,GL_POINT_SIZE_MAX_ARB
|
---|
9 | :fadeThresholdSize:fadeThresholdSize:PointParameterfARB,GL_POINT_FADE_THRESHOLD_SIZE_ARB
|
---|
10 | :spriteCoordOrigin:spriteCoordOrigin:PointParameterfARB,GL_POINT_SPRITE_COORD_ORIGIN
|
---|
11 | #:distanceAttenuation:distanceAttenuation:PointParameterfvARB,GL_POINT_DISTANCE_ATTENUATION_ARB
|
---|
12 | -:distanceAttenuation:*if (from->distanceAttenuation[0] != to->distanceAttenuation[0] || from->distanceAttenuation[1] != to->distanceAttenuation[1] || from->distanceAttenuation[2] != to->distanceAttenuation[2]) {
|
---|
13 | -:distanceAttenuation:* diff_api.PointParameterfvARB (GL_POINT_DISTANCE_ATTENUATION_ARB, to->distanceAttenuation);
|
---|
14 | -:distanceAttenuation:* FILLDIRTY(b->distanceAttenuation);
|
---|
15 | -:distanceAttenuation:* FILLDIRTY(b->dirty);
|
---|
16 | -:distanceAttenuation:*}
|
---|
17 | +:distanceAttenuation:*if (from->distanceAttenuation[0] != to->distanceAttenuation[0] || from->distanceAttenuation[1] != to->distanceAttenuation[1] || from->distanceAttenuation[2] != to->distanceAttenuation[2]) {
|
---|
18 | +:distanceAttenuation:* diff_api.PointParameterfvARB (GL_POINT_DISTANCE_ATTENUATION_ARB, to->distanceAttenuation);
|
---|
19 | +:distanceAttenuation:* from->distanceAttenuation[0] = to->distanceAttenuation[0];
|
---|
20 | +:distanceAttenuation:* from->distanceAttenuation[1] = to->distanceAttenuation[1];
|
---|
21 | +:distanceAttenuation:* from->distanceAttenuation[2] = to->distanceAttenuation[2];
|
---|
22 | +:distanceAttenuation:*}
|
---|
23 | :enableSprite:pointSprite:GL_POINT_SPRITE_ARB
|
---|
24 | %flush
|
---|
25 | >{
|
---|
26 | >unsigned int activeUnit = (unsigned int) -1;
|
---|
27 | >for (i = 0; i < CR_MAX_TEXTURE_UNITS; i++) {
|
---|
28 | :coordReplacement[i]:*GLint replacement = to->coordReplacement[i];
|
---|
29 | :coordReplacement[i]:*if (activeUnit != i) {
|
---|
30 | :coordReplacement[i]:* diff_api.ActiveTextureARB(i + GL_TEXTURE0_ARB );
|
---|
31 | :coordReplacement[i]:* activeUnit = i;
|
---|
32 | :coordReplacement[i]:*}
|
---|
33 | :coordReplacement[i]:*diff_api.TexEnviv(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, &replacement);
|
---|
34 | +:coordReplacement[i]:*from->coordReplacement[i] = to->coordReplacement[i];
|
---|
35 | %flush
|
---|
36 | >}
|
---|
37 | >if (activeUnit != toCtx->texture.curTextureUnit)
|
---|
38 | > diff_api.ActiveTextureARB(GL_TEXTURE0 + toCtx->texture.curTextureUnit);
|
---|
39 | >}
|
---|