Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Displaying Raw RGB Data In Windoze!

SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
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.

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

Comments

  • adrianxwadrianxw Posts: 127Member
    [b][red]This message was edited by adrianxw at 2003-5-22 1:33:6[/red][/b][hr]
    [b][red]This message was edited by adrianxw at 2003-5-22 1:32:49[/red][/b][hr]
    : 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.
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
    :

    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...





  • PAGPAG Posts: 168Member
    : 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.
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]
    :

    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...
  • SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
    Exactly what I was looking to do. Thank ya'.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

Sign In or Register to comment.