|
-
Oct 7th, 2001, 09:32 PM
#1
Thread Starter
Lively Member
Deleteing Memory DC's
Can someone tell me if it is possible to create a memory DC set it to a Global type long variable, and then later delete it and reinstate a new memory DC in its place to that same variable.
So far trying to to this has produced extreamly strange results with sprites displaying sparatically and what not.
I'm am trying to do this to save memory when I don't need certain sprites.
So any other idea's on how I might accomplish that are welcome.
Currently I can create 311 memory DC's before I run out of memory on a 128meg machine with the type of sprites I am using. Ideally I'd like to be able to create 500. I've found that the file type as in monochrome bitmaps don't seem to take up much less space then 24 bit color bitmaps do although decreaseing the size of the bitmaps helps.
any ideas please?
All will fall before the might of the Black Sashi...
-
Oct 8th, 2001, 12:05 AM
#2
PowerPoster
Take a look here (2nd post)
-
Oct 8th, 2001, 12:30 AM
#3
Thread Starter
Lively Member
I did
Sorry but that doesn't work. I have to be able to hold the DC's in memory for an extended period of time I can't create them blit them then delete them because performance would go down the tubes. They have to be held in memory for awhile and then deleted later on. I am deleteing everything but the type long variable to free resources but as for swapping that variable with another generated DC I've had no luck.
I did find I could run the game in 16 bit color rather then 32 bit color and double the amount of DC's I could generate even though they are all 24 bit color bitmaps. I was very surprised, but if anyone knows a better way to
conserve memory please post.
All will fall before the might of the Black Sashi...
-
Oct 8th, 2001, 02:22 AM
#4
PowerPoster
I think if you need such a big amount of memory at the same time you did something wrong...
Anyways, tries DDraw yet? Well it differs video/system memory while your problems system/HD memory but its the best tip i can give you..
-
Oct 8th, 2001, 02:40 AM
#5
Thread Starter
Lively Member
memory
Well I don't think I did anything wrong, I can hold 300 large 24 bit color sprites in memory at once thats quite a lot. I can hold over 600 if the color is 16 bit. All the excess stuff required in createing a memory DC is deleted just fine.
I'm begining to think its not possible to swap DC's around, although I can delete the DC's, if I reassign them I get very sparatic and weird performance that I can't explain.
I'm sure direct x would be for efficiate but it poses some rather annoying development problems, such as the inablity to access a resource file until compiled compleatly. Since the concepts used in Direct draw are similar to my system I may transfer to that in the end but not yet. Unfortunately it seems few people have much experiance with really high level bit blit applications so I can't find a lot of documentation or help of any kind on this subject.
All will fall before the might of the Black Sashi...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|