projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixing multitouch for Windows per e-mail from Florian Echtler dated 5/3/11 10:33 AM
[freeglut]
/
src
/
freeglut_font.c
diff --git
a/src/freeglut_font.c
b/src/freeglut_font.c
index
2c6ed5e
..
e956d5b
100644
(file)
--- a/
src/freeglut_font.c
+++ b/
src/freeglut_font.c
@@
-25,10
+25,6
@@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include <GL/freeglut.h>
#include "freeglut_internal.h"
#include <GL/freeglut.h>
#include "freeglut_internal.h"
@@
-156,8
+152,8
@@
void FGAPIENTRY glutBitmapString( void* fontID, const unsigned char *string )
* A newline will simply translate the next character's insertion
* point back to the start of the line and down one line.
*/
* A newline will simply translate the next character's insertion
* point back to the start of the line and down one line.
*/
- while( c = *string++ )
- if( string[c] == '\n' )
+ while( ( c = *string++) )
+ if( c == '\n' )
{
glBitmap ( 0, 0, 0, 0, -x, (float) -font->Height, NULL );
x = 0.0f;
{
glBitmap ( 0, 0, 0, 0, -x, (float) -font->Height, NULL );
x = 0.0f;
@@
-206,7
+202,7
@@
int FGAPIENTRY glutBitmapLength( void* fontID, const unsigned char* string )
if ( !string || ! *string )
return 0;
if ( !string || ! *string )
return 0;
- while( c = *string++ )
+ while( ( c = *string++) )
{
if( c != '\n' )/* Not an EOL, increment length of line */
this_line_length += *( font->Characters[ c ]);
{
if( c != '\n' )/* Not an EOL, increment length of line */
this_line_length += *( font->Characters[ c ]);
@@
-260,6
+256,10
@@
void FGAPIENTRY glutStrokeCharacter( void* fontID, int character )
for( j = 0; j < strip->Number; j++ )
glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
glEnd( );
for( j = 0; j < strip->Number; j++ )
glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
glEnd( );
+ glBegin( GL_POINTS );
+ for( j = 0; j < strip->Number; j++ )
+ glVertex2f( strip->Vertices[ j ].X, strip->Vertices[ j ].Y );
+ glEnd( );
}
glTranslatef( schar->Right, 0.0, 0.0 );
}
}
glTranslatef( schar->Right, 0.0, 0.0 );
}
@@
-281,7
+281,7
@@
void FGAPIENTRY glutStrokeString( void* fontID, const unsigned char *string )
* A newline will simply translate the next character's insertion
* point back to the start of the line and down one line.
*/
* A newline will simply translate the next character's insertion
* point back to the start of the line and down one line.
*/
- while( c = *string++ )
+ while( ( c = *string++) )
if( c < font->Quantity )
{
if( c == '\n' )
if( c < font->Quantity )
{
if( c == '\n' )
@@
-348,7
+348,7
@@
int FGAPIENTRY glutStrokeLength( void* fontID, const unsigned char* string )
if ( !string || ! *string )
return 0;
if ( !string || ! *string )
return 0;
- while( c = *string++ )
+ while( ( c = *string++) )
if( c < font->Quantity )
{
if( c == '\n' ) /* EOL; reset the length of this line */
if( c < font->Quantity )
{
if( c == '\n' ) /* EOL; reset the length of this line */