Managed DirectX: load large Bitmap
-
ANYONE GOOD IDEAS? I want to display Bitmaps with DirectX. I need a good performance, for that reason I'm not using GDI+. I load the Bitmaps into a Texture and draw them on Screen using the DrawPrimitives()-Method. It works fine for small Bitmaps. But I need to display large Bitmaps (e.g. 5000x4000 Pixels), which cannot be directy loaded in ONE Texture. My graphics card supports textures up to 4096X4096 Pixels, which is even not enough :sigh: And most of the common graphics cards don't support textures this size, right? How can I split one Bitmap in different Textures so that I can display these Bitmaps? That was my idea, but I don't know how to do it. :(( Or does anyone have another idea of displaying Bitmaps this size? :confused: I would be very greatful if anyone can help me! :) Silka
-
ANYONE GOOD IDEAS? I want to display Bitmaps with DirectX. I need a good performance, for that reason I'm not using GDI+. I load the Bitmaps into a Texture and draw them on Screen using the DrawPrimitives()-Method. It works fine for small Bitmaps. But I need to display large Bitmaps (e.g. 5000x4000 Pixels), which cannot be directy loaded in ONE Texture. My graphics card supports textures up to 4096X4096 Pixels, which is even not enough :sigh: And most of the common graphics cards don't support textures this size, right? How can I split one Bitmap in different Textures so that I can display these Bitmaps? That was my idea, but I don't know how to do it. :(( Or does anyone have another idea of displaying Bitmaps this size? :confused: I would be very greatful if anyone can help me! :) Silka
silka_c# wrote: I want to display Bitmaps with DirectX. I need a good performance, for that reason I'm not using GDI+. I load the Bitmaps into a Texture and draw them on Screen using the DrawPrimitives()-Method. It works fine for small Bitmaps. Why don't you use something like BitBlt? GDI (not GDI+) is hardware accelerated and highly portable between cards. Not to mention easier to use for the kind of thing you're tring to do. It's often used on simpler, 2D games and it's fast enough for most uses... I see dead pixels Yes, even I am blogging now!
-
silka_c# wrote: I want to display Bitmaps with DirectX. I need a good performance, for that reason I'm not using GDI+. I load the Bitmaps into a Texture and draw them on Screen using the DrawPrimitives()-Method. It works fine for small Bitmaps. Why don't you use something like BitBlt? GDI (not GDI+) is hardware accelerated and highly portable between cards. Not to mention easier to use for the kind of thing you're tring to do. It's often used on simpler, 2D games and it's fast enough for most uses... I see dead pixels Yes, even I am blogging now!
-
The Idea sounds good. I would give it a try. I searched a little bit in the web and the MSDN. How do I use BitBlt in C#. Did you use it in a c#-application and could you give me some code snippets? Thanks a lot for your help.:) Silka
Maybe this article[^] can be of some help. I see dead pixels Yes, even I am blogging now!
-
silka_c# wrote: I want to display Bitmaps with DirectX. I need a good performance, for that reason I'm not using GDI+. I load the Bitmaps into a Texture and draw them on Screen using the DrawPrimitives()-Method. It works fine for small Bitmaps. Why don't you use something like BitBlt? GDI (not GDI+) is hardware accelerated and highly portable between cards. Not to mention easier to use for the kind of thing you're tring to do. It's often used on simpler, 2D games and it's fast enough for most uses... I see dead pixels Yes, even I am blogging now!
-
Thanks again, Daniel. I made BitBlt work but it is not much faster than the old version with DrawImage(). Are there any other ideas? Thanks for your help. SILKA
silka_c# wrote: Are there any other ideas? How fast do you need to go? 5000x4000 pixels == 5000x4000x4 bytes ~~ 76MB This should take a while to transfer over any bus... Besides that, do you really have a card/monitor that is able to display such a beast? I see dead pixels Yes, even I am blogging now!
-
silka_c# wrote: Are there any other ideas? How fast do you need to go? 5000x4000 pixels == 5000x4000x4 bytes ~~ 76MB This should take a while to transfer over any bus... Besides that, do you really have a card/monitor that is able to display such a beast? I see dead pixels Yes, even I am blogging now!
Hi Daniel, sorry, I've been on vacation for a while. No, my monitor/ graphics card won't display the whole Image, that's why i started to think about resizing it to a moderate size. Do you know, how I can do it in Direct Draw? I'm right now trying to figure out how fast it would be with Direct Draw (Managed DirectX 9.0).