Hello,
I have a small graphics program the allows the user to label their measured geometry with Glut based labels, everything work great until I render to bitmap them the text only gets " reversed"
Code the generates the label:
[SIZE=2]// draw the callout text
[/SIZE]glColor3ub(0, 0, 0);
[SIZE=2]unsigned[/SIZE] [SIZE=2]int[/SIZE] i;
[SIZE=2]// the name
[/SIZE][SIZE=2]if/SIZE {
glRasterPos2d(x_callout_location + (char_offset * 0.5), y_callout_location - (line_offset * max_lines));
[SIZE=2]for[/SIZE]( i = 0; i < strlen(feature->name); i++ )
{
glutBitmapCharacter(GLUT_BITMAP_9_BY_15, feature->name[i]);
[SIZE=2]if[/SIZE]( i > max_x ) {
max_x = i;
}
}
max_lines++;
}
code that generates the bitmap:
[SIZE=2][SIZE=2]
// render to the backbuffer and copy the backbuffer to a bitmap
[/SIZE][SIZE=2]// clear buffer
[/SIZE]glClearColor(1, 1, 1, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
[SIZE=2]//glPushAttrib(GL_COLOR_BUFFER_BIT | GL_PIXEL_MODE_BIT); // for GL_DRAW_BUFFER and GL_READ_BUFFER
[/SIZE][SIZE=2]//glDrawBuffer(GL_BACK);
[/SIZE]glPushMatrix();
SetSize(width, height, [SIZE=2]true[/SIZE]);
glLoadIdentity();
[SIZE=2]// Draw here
[/SIZE][SIZE=2]if/SIZE {
oglDrawVideo();
} [SIZE=2]else[/SIZE] {
oglDrawScene(thumbnail, background, orient, zero, window);
}
[SIZE=2]// copy the frame buffer pixels to our bitmap
[/SIZE]glReadPixels(0, 0, width, -height, GL_BGRA_EXT, GL_UNSIGNED_BYTE, bits);
SetSize(m_cx, m_cy, [SIZE=2]false[/SIZE]);
glPopMatrix();
I have attached pics of the resulting screens
Any suggestions?
Thanks
-Derrek
[SIZE=2]
[/SIZE][/SIZE]