|
From: James W. W. <os...@jw...> - 2007-09-14 16:20:51
|
On Sep 14, 2007, at 2:08 AM, Daniele Cavallini wrote: > Thank's a lot. I used your precious hints and now my app don't crash. > I created drawContextDisplay from window device context and I used it > like masterDrawContext. > Unluckily the shadows is not still visibles. > Also I tried to require explicity the stencil buffer using > kQ3DrawContextPropertyGLStencilBufferDepth > TQ3Uns32 preferredStencilBits = 0; Why 0? You need stencil bits. The usual value is 8. > Q3Object_SetProperty(drawContextDisplay, > kQ3DrawContextPropertyGLStencilBufferDepth,sizeof > (preferredStencilBits), > &preferredStencilBits ); > Q3Object_SetProperty(myDrawContext, > kQ3DrawContextPropertyGLStencilBufferDepth,sizeof > (preferredStencilBits), > &preferredStencilBits ); > But nothing. > Do you think I must give up to have images with high resolution with > shadows using Perspective and axonometric in windows? No. I certainly expect to make offscreen images with shadows in a future Windows version of my product, though I think it has not been tested yet. Have you tried more than one Windows machine? Have you checked the capabilities of the video card with GLView? <http://www.realtech-vr.com/glview/> For instance check for GL_EXT_framebuffer_object. Have you tried walking through gldrawcontext_fbo_new in a debugger? > With Rayshade I obtain good images but only in Perspective view. > > James W. Walker ha scritto: >> 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 >>> >> >> >> --------------------------------------------------------------------- >> ---- >> 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 |