printing with MFC/OpenGL
Rhadamés Carmona <[email protected]>
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
Hi Guys
I do not want to print with background color = black. Because of that, I
change background color (to white), in the last rendering for printing.
OnDraw
if (pDC->IsPrinting())
{
glDrawBuffer(GL_BACK);
glClearColor(1,1,1,1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
RenderScene();
glFlush();
glReadBuffer(GL_BACK);
glReadPixels(0,0,vpWidth,vpHeight,GL_RGB, GL_UNSIGNED_BYTE, buffer);
//...
// swapbuffers here
}
else
{
glDrawBuffer(GL_BACK);
glClearColor(1,0,1,1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
//...
}
I do not know, why the print preview has black background... I have not
printed the image yet, but I think if the print preview has black
background, the printed image will.
I am using CG fragment program for rendering.
THX
Rix
-----
FAQ and OpenGL Resources at:
http://www.geocities.com/SiliconValley/Hills/9956/OpenGL
--
Author: =?iso-8859-1?Q?Rhadam=E9s_Carmona?=
INET: [email protected]
Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [email protected] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).