Re: Texturing fails silently, objects are all white

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Jack Hoxley (Jack.Hoxley_at_ntlworld.com)
Date: 08/17/04


Date: Tue, 17 Aug 2004 17:23:16 +0100

As a thought... even with the managed pool where it pages it in/out of VRAM
as/when needed, surely it still must be in VRAM when the Draw*( ) call is
made? With 4mb of RAM you'd struggle to fit a 24bit 1024x1024 texture in
(3mb exactly iirc). The front/back buffers will probably knock the usable
space down to ~2mb at a guesstimate.

Thus if the image simply cannot fit in at all, then there isn't anything
that can be done about it... Maybe the only solution then would be to
downsample the image until it fits? or tile-it so that only a small %age of
it needs to be in memory at each Draw*( ) call?

hth
Jack

"Clafou" <Clafou@discussions.microsoft.com> wrote in message
news:88358A09-840D-470B-B6BA-F964E8B4731C@microsoft.com...
> Hi
>
> I am using D3DXCreateTextureFromFileEx to load textures into the managed
> pool. These textures are big photos, and on old graphics cards with low
> memory (4Mb of VRAM), the textures are not displayed at all and my objects
> are all white. I imagine this is because the video memory is too low? Is
> there a workaround?
>
> I would need to at least detect that texturing fails (currently, rendering
> executes without returning any error code), so that I can try to reduce
the
> size of the texture or output a meaningful error message. But so far I
> couldn't find any way to detect failure. Should I used the default pool
> instead of the managed pool, would that help me detect a failure?
>
> Many thanks in advance!
> Clafou



Relevant Pages

  • Re: Some experimentation results (was: Re: Newbie memory management question)
    ... The used grahics card is a GeForce 7800 GT with 256MiB of VRAM. ... how much VRAM can be aquired by textures the test ... other resources the system obviously has to claim. ...
    (comp.graphics.api.opengl)
  • Re: measuring video memory
    ... This is a FAQ, look for the detailed awnser there. ... *total* VRAM a graphics card has? ... not used by frame buffers, pbuffers, and textures). ... OpenGL will swap out textures from VRAM to system memory if ...
    (comp.graphics.api.opengl)
  • Re: Managed textures - always a copy in system memory?
    ... I'll only be able to animate 10-11 frames until I run out of VRAM on a 128MB card. ... For example, if the texture was in VRAM and needed to be discarded to make room for another graphics object, the driver could allocate sysmem, copy the texture from VRAM, then free the VRAM. ... I read a paper on Nvidia's website that said a LockRect+UnlockRectis effectively a NOOP on managed textures. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Managed textures - always a copy in system memory?
    ... >> managed textures and do LockRectto access it. ... I need to have the data accessible to my app to give mouse cursor feedback ... textures to the card before implementing this otherwise there will be VRAM ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Repeated texture loading
    ... But don't forget to create your textures in managed pool. ... "Kevin Spencer" wrote: ... > Hi Aaron, ...
    (microsoft.public.win32.programmer.directx.managed)