|
From: James W. W. <os...@jw...> - 2007-09-13 16:34:13
|
On Sep 13, 2007, at 3:42 AM, Daniele Cavallini wrote: > I try so: > drawContextDisplay is a TQ3DrawContextObject global variable > > TQ3AcceleratedOffscreenPropertyData propData; > myStatus = Q3View_GetDrawContext > (gDocumento3D.fView,&drawContextDisplay); // I get the drawcontext > display > myDrawContext = MyNewDrawContext(lar,alt);// I create the > Pixmap > drawcontext (TQ3PixmapDrawContextData) > propData.masterDrawContext=drawContextDisplay; > propData.copyFromPixmapAtFrameStart=kQ3False; > propData.copyToPixmapAtFrameEnd=kQ3False; > > myStatus = Q3Object_SetProperty(myDrawContext, > kQ3DrawContextPropertyAcceleratedOffscreen,sizeof(propData), > &propData ); > myStatus=Q3View_SetDrawContext > (gDocumento3D.fView,myDrawContext); > > > Do you think it is a correct operation? > The variable myStatus is always True but when I call > Q3View_StartRendering program crash. I think you probably want to set propData.copyToPixmapAtFrameEnd to kQ3True, if you want to see a rendered image in the Pixmap. You would only set propData.copyToPixmapAtFrameEnd to kQ3False if you want to get the image in some other way such as using glReadPixels. When you replace drawContextDisplay with myDrawContext as the draw context associated with the view gDocumento3D.fView, it probably means that drawContextDisplay is no longer a valid draw context, so it is not a good value for propData.masterDrawContext. When I have used kQ3DrawContextPropertyAcceleratedOffscreen, I used different view objects for the PixMap draw context and the on-screen master draw context. > > James W. Walker ha scritto: >> On Sep 11, 2007, at 2:35 AM, Daniele Cavallini wrote: >> >> >>> You are right in Mac there is not problem. >>> I work with a imac intel core due with video card ATI Radeon x1600 >>> I can well compare mac os x and windows xp. >>> >>> I tried to use kQ3DrawContextPropertyAcceleratedOffscreen: >>> >>> TQ3Boolean theFlag = kQ3True; >>> Q3Object_SetProperty( fRenderer, kQ3RendererPropertyShadows,sizeof >>> (theFlag), &theFlag ); >>> Q3Object_SetProperty( fRenderer, >>> kQ3DrawContextPropertyAcceleratedOffscreen,sizeof(theFlag), >>> &theFlag ); >>> >>> >>> but without success. >>> >> >> kQ3DrawContextPropertyAcceleratedOffscreen is a property that must be >> set on the draw context, not the renderer. That's why it's called a >> draw context property. Also, the value is not a TQ3Boolean. See the >> documentation in QuesaDrawContext.h. >> >> --------------------------------------------------------------------- >> ---- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Quesa-develop mailing list >> Que...@li... >> https://lists.sourceforge.net/lists/listinfo/quesa-develop >> >> > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Quesa-develop mailing list > Que...@li... > https://lists.sourceforge.net/lists/listinfo/quesa-develop |