Re: DirectX and ScreenSaverProc
- From: "GarryFre" <garryfre@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 16 May 2005 21:52:02 -0700
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
> >
> >
>
>
>
.
- References:
- DirectX and ScreenSaverProc
- From: Bryan
- Re: DirectX and ScreenSaverProc
- From: Wessam Bahnassi
- DirectX and ScreenSaverProc
- Prev by Date: Off screen plain
- Next by Date: Re: IE web browser in d3d screen
- Previous by thread: Re: DirectX and ScreenSaverProc
- Next by thread: Database causing DirectX to puke?
- Index(es):
Relevant Pages
|