Print Page | Close Window

Rendering under DirectX

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1454
Printed Date: 03 Jul 25 at 2:08PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Rendering under DirectX
Posted By: mulfycrowh
Subject: Rendering under DirectX
Date Posted: 24 May 10 at 1:04PM
Hello,
 
I am developping an application under DirectX 9.
To render a page of my PDF file :
 
1/ I create an offscreen surface using CreateOffscreenPlainSurface method
2/ I get the device context of this surface with GetDC method
3/ I render using DARenderPageToDC on the device context
4/ I copy the surface onto the backbuffer
 
DARenderPageToDC tells me everything OK
 
Is this process OK because nothing is rendered on the screen ?
 
Many Thanks !

 

 



Replies:
Posted By: Ingo
Date Posted: 24 May 10 at 6:24PM
Hi!

Did you use non-DA-functions together with DA-functions?
This doesn't work.

Cheers, Ingo


Posted By: mulfycrowh
Date Posted: 24 May 10 at 8:18PM
Hi,
 
What do you mean by using DA and non DA functions ?
I only use DARenderPageToDC.
Do you mean I must not use this function and should use RenderPageToDC instead ?
 
Is there any example in rendering under DirectX ?
 
Many Thanks !
 


Posted By: mulfycrowh
Date Posted: 24 May 10 at 8:43PM
Sorry, I don't use DARenderPageToDC but RenderPagePageToDC.
I only use the DA function : DAFindPage to look for the page reference


Posted By: Ingo
Date Posted: 24 May 10 at 8:46PM
Hi!

There are DA-functions and non-DA-functions.
If you're using both kinds of functions in one instance then the results won't be correct.
So it's not possible to use LoadFromFile... and later in the code DARender...
If you're using DARender... then you have to use DAOpenFile...

Cheers, Ingo



Posted By: mulfycrowh
Date Posted: 24 May 10 at 8:53PM
OK
Many thanks.
Is there any DirctX example ?
If not, am I right with GetDC ?


Posted By: Ingo
Date Posted: 24 May 10 at 9:52PM
Hi Marc!

There's no DirectX-sample but about using RenderPageToDC you'll find a lot with the search-function (the advanced one, above):
http://www.quickpdf.org/forum/quickpdf-render-to-device-context_topic1197_post5551.html?KW=RenderPageToDC#5551
http://www.quickpdf.org/forum/newbe-question_topic1134_post5265.html?KW=RenderPageToDC#5265
http://www.quickpdf.org/forum/pdf-viewer-in-vb6_topic1114_post5180.html?KW=RenderPageToDC#5180
http://www.quickpdf.org/forum/renderpagetodc-example-needed_topic1036_post4882.html?KW=RenderPageToDC#4882

Cheers, Ingo
 


Posted By: mulfycrowh
Date Posted: 25 May 10 at 8:56AM
Thank you so much



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk