On 29/01/2013 at 06:05, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform: Windows ;
Language(s) : C++ ;
---------
Hi, anyone knows to use this function?
I want to shown my shader as texture on objects. But gives black textures
my test code:
Bool Material::InitGLImage(BaseMaterial\* mat, BaseDocument\* doc, BaseThread\* th, BaseBitmap\* bmp, LONG doccolorspace, Bool linearworkflow)
{
LONG w = bmp->GetBw();
LONG h = bmp->GetBh();
unsigned long \*tmp = new unsigned long[w];
for (int x=0; x<w; x++) tmp[x]=0xffffffff;
for (int y=0; y<h; y++)
{
Bool ok = bmp->SetPixelCnt(0, y, 4\*w, (UCHAR \* )( tmp ),COLORBYTES_ARGB, COLORMODE_ARGB,PIXELCNT_0);
}
delete [] tmp;
return true;
}