CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Posts
    118

    Direct X 9.0 Color Spectrum?

    I have hooked endscene and I need to draw it here, my end scene is overriding a game call of duty 5 endscene. So I am drawing over it.

    How would I go about creating a nice color spectrum such as



    Code:
    HRESULT APIENTRY my_EndScene( LPDIRECT3DDEVICE9 pDevice )
    {
      //DRAW COLOR SPECTRUM HERE
    }
    I know how to draw it pixel by pixel, but that takes forever and it also slows down your frames per second very very much. So I think there is a built in function to do this for you...

  2. #2
    Join Date
    Nov 2001
    Posts
    251

    Re: Direct X 9.0 Color Spectrum?

    Quote Originally Posted by RogerThat123 View Post
    I have hooked endscene and I need to draw it here, my end scene is overriding a game call of duty 5 endscene. So I am drawing over it.

    How would I go about creating a nice color spectrum such as
    Code:
    HRESULT APIENTRY my_EndScene( LPDIRECT3DDEVICE9 pDevice )
    {
      //DRAW COLOR SPECTRUM HERE
    }
    I know how to draw it pixel by pixel, but that takes forever and it also slows down your frames per second very very much. So I think there is a built in function to do this for you...
    Well, if it takes a long time to do it, just generate it in Photoshop or wherever beforehand and load it as a texture instead.
    And use a compressed format like DDS, or a lossy format like JPG, if the texture is large.
    Last edited by Syslock; July 14th, 2009 at 06:08 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured