Merge branch 'trunk' into git_master

This commit is contained in:
Diederick Niehorster 2014-09-28 12:04:21 +08:00
commit eaab7fa509
6 changed files with 22 additions and 4 deletions

View File

@ -88,6 +88,8 @@
#define GLUT_GEOMETRY_VISUALIZE_NORMALS 0x0205 #define GLUT_GEOMETRY_VISUALIZE_NORMALS 0x0205
#define GLUT_STROKE_FONT_DRAW_JOIN_DOTS 0x0206 /* Draw dots between line segments of stroke fonts? */
/* /*
* New tokens for glutInitDisplayMode. * New tokens for glutInitDisplayMode.
* Only one GLUT_AUXn bit may be used at a time. * Only one GLUT_AUXn bit may be used at a time.

View File

@ -278,11 +278,15 @@ void FGAPIENTRY glutStrokeCharacter( void* fontID, int character )
for( j = 0; j < strip->Number; j++ ) for( j = 0; j < strip->Number; j++ )
glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y ); glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
glEnd( ); glEnd( );
if (fgState.StrokeFontDrawJoinDots)
{
glBegin( GL_POINTS ); glBegin( GL_POINTS );
for( j = 0; j < strip->Number; j++ ) for( j = 0; j < strip->Number; j++ )
glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y ); glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
glEnd( ); glEnd( );
} }
}
glTranslatef( schar->Right, 0.0, 0.0 ); glTranslatef( schar->Right, 0.0, 0.0 );
} }

View File

@ -87,6 +87,7 @@ SFG_State fgState = { { -1, -1, GL_FALSE }, /* Position */
1, /* AuxiliaryBufferNumber */ 1, /* AuxiliaryBufferNumber */
4, /* SampleNumber */ 4, /* SampleNumber */
GL_FALSE, /* SkipStaleMotion */ GL_FALSE, /* SkipStaleMotion */
GL_FALSE, /* StrokeFontDrawJoinDots */
1, /* OpenGL context MajorVersion */ 1, /* OpenGL context MajorVersion */
0, /* OpenGL context MinorVersion */ 0, /* OpenGL context MinorVersion */
0, /* OpenGL ContextFlags */ 0, /* OpenGL ContextFlags */

View File

@ -342,6 +342,8 @@ struct tagSFG_State
GLboolean SkipStaleMotion; /* skip stale motion events */ GLboolean SkipStaleMotion; /* skip stale motion events */
GLboolean StrokeFontDrawJoinDots;/* Draw dots between line segments of stroke fonts? */
int MajorVersion; /* Major OpenGL context version */ int MajorVersion; /* Major OpenGL context version */
int MinorVersion; /* Minor OpenGL context version */ int MinorVersion; /* Minor OpenGL context version */
int ContextFlags; /* OpenGL context flags */ int ContextFlags; /* OpenGL context flags */

View File

@ -118,6 +118,10 @@ void FGAPIENTRY glutSetOption( GLenum eWhat, int value )
fgStructure.CurrentWindow->State.VisualizeNormals = value; fgStructure.CurrentWindow->State.VisualizeNormals = value;
break; break;
case GLUT_STROKE_FONT_DRAW_JOIN_DOTS:
fgState.StrokeFontDrawJoinDots = value;
break;
default: default:
fgWarning( "glutSetOption(): missing enum handle %d", eWhat ); fgWarning( "glutSetOption(): missing enum handle %d", eWhat );
break; break;
@ -218,6 +222,9 @@ int FGAPIENTRY glutGet( GLenum eWhat )
return GL_FALSE; return GL_FALSE;
return fgStructure.CurrentWindow->State.VisualizeNormals; return fgStructure.CurrentWindow->State.VisualizeNormals;
case GLUT_STROKE_FONT_DRAW_JOIN_DOTS:
return fgState.StrokeFontDrawJoinDots;
default: default:
return fgPlatformGlutGet ( eWhat ); return fgPlatformGlutGet ( eWhat );
break; break;

View File

@ -1527,6 +1527,8 @@ windows if GLUT_MULTISAMPLE was set in the displayMode.</li>
<li>GLUT_GEOMETRY_VISUALIZE_NORMALS - Set whether <a <li>GLUT_GEOMETRY_VISUALIZE_NORMALS - Set whether <a
href="#GeometricObject"><i>FreeGLUT</i>'s geometric object rendering href="#GeometricObject"><i>FreeGLUT</i>'s geometric object rendering
functions</a> also visualize the object's normals or not.</li> functions</a> also visualize the object's normals or not.</li>
<li>GLUT_STROKE_FONT_DRAW_JOIN_DOTS - Set whether join dots are drawn
between line segments when drawing letters of stroke fonts or not.</li>
</ul> </ul>
</p> </p>