Results 1 to 2 of 2

Thread: DirectDraw RGB Color

  1. #1

    Thread Starter
    Member
    Join Date
    May 2001
    Posts
    55

    DirectDraw RGB Color

    I want to fill a directdraw suuface with a specific color so i do:

    Code:
    dim color as long
    dim ddrval as long 
    
    color = DirectXObject.CreateColorRGB(0,150,0)
    ddrval = objDDPrimSurf.BltColorFill(r1, color)   'r1 being the rectangle I want to fill
    I do not specify a color bit rate when I start DirectDraw (it's a windowed direct draw app). When I run this I should get a green surface but I don't!!! what do I do to fix?? (I think the problem is DirectXObject.CreateColorRGB() giving me the wrong color value)

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Usually just RGB(0, 150, 0) will work.
    If you are running under 16 bits you should use the DDColour function created by Jack Hoxley. It's at the DirectX 4 VB site (look around a bit).

    His site is...
    http://www.vbexplorer.com/directx4vb/
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

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