Welcome, Guest.
Please login or register.
Overloading WinX draw functions
Forum Login
Login Name: Create a new account
Password:     Forgot password

XBLite Forum    General Boards    XBLite Programming  ›  Overloading WinX draw functions
Users Browsing Forum
No Members and 1 Guests

Overloading WinX draw functions  This thread currently has 12,426 views. Print Print Thread
2 Pages « 1 2 All Recommend Thread
Guy1954
May 31, 2013, 11:49am Report to Moderator Report to Moderator

Medium Member
Posts: 187
Quoted from Carry
To prove my point I have made a test program. It takes a minute to run before drawing failure (at return id=4194304).

Gary


Hi Gary,

You definitely made your point here: there is no good reason for WinX.dll to set such a limit.
I re-worked assessor.m4 to re-used deleted spots.
Would you believe it? I got it right only after messing Callum's library quite a lot.
(What is wrong with my right brain?)
Good thing that I tested it in real use.

Well, as far as I know, your drawtest2.x does not crash anymore. Maybe can you confirm this yourself?
Anyway, thank you for your bug report.

Bye! Guy

Logged Offline
Site Site Private Message Private message Reply: 15 - 17
Carry
June 4, 2013, 10:29am Report to Moderator Report to Moderator
Baby Member
Posts: 36
Yes, this is very good. It doesn't crash now and that's the main thing.

I just want to mention that I believe it is possible to make the accessors functions even more efficient, but there are pros and cons with every method. It depends on how you manage the usage map as long FOR loop searches for empty slots tends to slow things down.

For example, the accessors.m4 that I posted earlier makes use of a stack to directly keep track of empty slots (no long FOR loop searches). Of course there is the overhead of an extra array.

Another method could be, instead of starting a usage map search from 0, you could keep track of the lowest empty slot and start all searches from this point (keeping track of the lowest empty slot whenever a Delete occurs).

I'm sure there are many methods, but what you have now is straight forward and error free. Usually that's the best approach.

Gary
Logged Offline
Private Message Private message Reply: 16 - 17
Guy1954
June 5, 2013, 1:15pm Report to Moderator Report to Moderator

Medium Member
Posts: 187
Quoted from Carry
(...)

Another method could be, instead of starting a usage map search from 0, you could keep track of the lowest empty slot and start all searches from this point (keeping track of the lowest empty slot whenever a Delete occurs).

I'm sure there are many methods, but what you have now is straight forward and error free. Usually that's the best approach.

Gary

Hi Gary,

Would you believe it? I implemented your last suggestion.
Why?
1. As you mention it, it requires only to start the search loop to index zero,
2. Small change but full payback.

Small change?
I thought of it only after WinX.dll went berserk on me several rounds of unsuccessful attemps.

Morale is: changes are never small when the source is big...

Bye! Guy
Logged Offline
Site Site Private Message Private message Reply: 17 - 17
2 Pages « 1 2 All Recommend Thread
Print Print Thread

XBLite Forum    General Boards    XBLite Programming  ›  Overloading WinX draw functions

Thread Rating
There is currently no rating for this thread