Re: DirectX and ScreenSaverProc

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hmm, Funny how I happened to read of your issue just after reading about
threads.

I don't know if you are using C#, but the book Professional C# Edition 3
from Wrox press is a great book, except they kind of drop the ball on
explaining messaging. They lost me, when the text started referring to things
in the code examples that didn't exist, but overall, a great book.

I was reading the part on threads. It spoke of starting a thread to do
background stuff that would ordinarily hang your application. What I suggest,
is to load the first picture, and move your file loading routine to a worker
thread you create and have the background thread load your picture, and then
perhaps send a message or set a flag using syncronization, to inform you that
it's done, and then you tell the thread to start loading the next file.

Multi-Threading, delegates and messaging, I think the solution lies in there.

"Wessam Bahnassi" wrote:

> Load the textures before playing anything. Loading such big resources amidst
> app main loop is a big no-no for performance...
>
> Wessam Bahnassi
> Microsoft DirectX MVP,
> Lead Programmer
> In|Framez
>
> "Bryan" <kashmir76@xxxxxxxxxx> wrote in message
> news:VKidnbuJZp9LRR3fRVn-pg@xxxxxxxxxxxxx
> > Hi all,
> >
> > I hope that someone will be able to help me. I created a screensaver of
> > a cube that I can map my pictures to all 6 surfaces. I call the render
> > function each time a WM_TIMER messageis recieved and then after every 10
> > (or
> > 20 ect ) WM_TIMER calles I also call D3DXCreateTextureFromFile to load
> > another file on to the cube. The problems is that while the file is
> > loading
> > the cube stops spinning. Does anyone have an idea how I can avoid this and
> > keep the cube from stopping while mesh changes?
> > Thanks in advance.
> >
> > Bryan
> >
> >
>
>
>
.



Relevant Pages

  • Re: DirectX and ScreenSaverProc
    ... Loading such big resources amidst ... Microsoft DirectX MVP, ... Lead Programmer ... > a cube that I can map my pictures to all 6 surfaces. ...
    (microsoft.public.win32.programmer.directx.graphics)
  • format string for measures in AS 2005
    ... In my cube, I had to add the following line in the calculations to allow ... loading of data on non leaf levels: ...
    (microsoft.public.sqlserver.olap)
  • Re: Cyclists
    ... |> There is a cube law applies here. ... |> Wear varies as the *cube* of loading. ...
    (uk.rec.walking)
  • Re: Cyclists
    ... Wear varies as the *cube* of loading. ... does the number of walkers I come across exceed the cube of the number of MTBers? ...
    (uk.rec.walking)