Windows programming

Moderators: None (Apply to moderate this forum)
Number of threads: 3711
Number of posts: 9173

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Displaying Raw RGB Data In Windoze! Posted by Sephiroth on 21 May 2003 at 12:43 PM
OK, I have written a custom format for my textures that I use in-game. It decreases CPU usage, memory usage, and it speeds up loading times. However, since it is not a bitmap, how would I display the texture in Windoze? I can easily read in the RGB array, but then what? How can I display the RGB array in a window? If you're wondering, the editor uses a STATIC class window for displaying the images.

-Sephiroth
Report
Re: Displaying Raw RGB Data In Windoze! Posted by adrianxw on 22 May 2003 at 1:32 AM
This message was edited by adrianxw at 2003-5-22 1:33:6

This message was edited by adrianxw at 2003-5-22 1:32:49

: OK, I have written a custom format for my textures that I use in-game. It decreases CPU usage, memory usage, and it speeds up loading times. However, since it is not a bitmap, how would I display the texture in Windoze? I can easily read in the RGB array, but then what? How can I display the RGB array in a window? If you're wondering, the editor uses a STATIC class window for displaying the images.
:
: -Sephiroth
:

Load the respective red, green and blue components into a COLOREF structure and use SetPixel(). Slow though.

That what you mean?

Med venlig hilsen,

Adrian...





Report
Re: Displaying Raw RGB Data In Windoze! Posted by PAG on 22 May 2003 at 3:23 AM
: OK, I have written a custom format for my textures that I use in-game. It decreases CPU usage, memory usage, and it speeds up loading times. However, since it is not a bitmap, how would I display the texture in Windoze? I can easily read in the RGB array, but then what? How can I display the RGB array in a window? If you're wondering, the editor uses a STATIC class window for displaying the images.
:
: -Sephiroth
:

why not use CreateBitmap? all you have to do is load your rgb data into an array and send it to the CreateBitmap function including the width, height and stuff... And the just blit it onto the window/screen...
Report
Re: Displaying Raw RGB Data In Windoze! Posted by Sephiroth on 22 May 2003 at 10:35 AM
Exactly what I was looking to do. Thank ya'.

-Sephiroth




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.