IwGxDrawRectScreenSpace Color FAIL

Home / Forums / Marmalade Archive / IwGx / IwGxDrawRectScreenSpace Color FAIL
1 reply [Last post]
by: Chicou
Status: Offline
Joined: 2011-02-04
Points: 1830

Hi all,
Im creating a sprite 2DGames and i've got an issue when i want to draw sprite hit.
Drawing sprite batch are well working (using IwGxDrawRectScreenSpace), but when i add color on hit ( to red color flash it when hit) Nothing happend .....
My code look like :

CIwColour* cols = IW_GX_ALLOC(CIwColour, 4);
memset(cols, 0x10, sizeof(CIwColour) * 4);

IwGxLightingOff();
IwGxDrawRectScreenSpace(&screenPos,&m_Size,&srcrectXY,&srcrectWH,cols);

The color look like alwayse set to 0xFF...... dit i miss something??

Regards

Sylvain aka chicou

by: Chicou
Status: Offline
Joined: 2011-02-04
Points: 1830
Hi again, i found myself my

Hi again,

i found myself my mistake....

My material was :
m_Material->SetModulateMode(CIwMaterial::MODULATE_NONE);

i change it to :
m_Material->SetModulateMode(CIwMaterial::MODULATE_RGB);

and all rock'n'roll now..

Latest Posts

Latest Comments

Top Contributors

  • Chris D : 27,010
  • MonRoyals : 26,970
  • Salman : 26,720
  • Jez Hammond : 20,130
  • pjan : 11,150
  • gjw : 10,350
  • Paolo Oliverio : 9,640
  • Beaker_2 : 8,390
  • Kite : 8,210
  • bluescrn : 7,810