Ajuda Code D3D

Posts 1–15 of 18 · Page 1 of 2
Ajuda Code D3D
queria que alguem me arrumasse o code do FillRGB na cor gradiente (Degradê) por favor.
não consigo achar.

valew grato desde já.
Olhe o que eu achei no google relacionado a FillRGB

Code:
unsigned char buffer[] = {1, 2, 3, ..., 18}; // RGBRGB... 
cv::Mat image(2, 3); 
for (int i = 0; i < 18; ++i) {  
 int row = i/9;   int col = (i/3)%3;  
 int rgb = i%3; // An index  
  image.at<unsigned char>(row,col+rgb) = buffer[i]; 
}
Voce pode me explicar esse codigo ai? n entendi onde agente coloca as 2 cores para ficar dgrade?

e como eu coloca na minha function?

VOID FillRGB(INT x, INT y, INT w, INT h, DWORD Color, LPDIRECT3DDEVICE9 pDevice)
{
CONST DWORD D3D_FVF = D3DFVF_XYZRHW | D3DFVF_DIFFUSE;

struct Vertice {
FLOAT x, y, z, ht;
DWORD color;
} V[4] = {
{(FLOAT)x, (FLOAT)y + h, 0.0f, 0.0f, Color},
{(FLOAT)x, (FLOAT)y, 0.0f, 0.0f, Color},
{(FLOAT)x + w, (FLOAT)y + h, 0.0f, 0.0f, Color},
{(FLOAT)x + w, (FLOAT)y, 0.0f, 0.0f, Color}
};

pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, D3DZB_TRUE);
pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
pDevice->SetRenderState(D3DRS_FOGENABLE, D3DZB_FALSE);

pDevice->SetTexture(0, NULL);
pDevice->SetFVF(D3D_FVF);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, V, sizeof(Vertice));
}
ta tudo errado tu ta querendo tirar o FOG ? isso é somente feiro pelo DrawIndexedPrimitive que esta atualmente muito dificil de ser indetectavel
entao sua Tese esta errada pq eu to com a base funcional aqui sem DC whint v4
serve isso ai

po assim que eu quero fazer arruma ai o code do Fill
Esse luccss ta fumando lol
vlw, vou ver aqui

---------- Post added at 06:08 PM ---------- Previous post was at 05:30 PM ----------

eu coloquei na minha base mais n aparece

Gradient(menuX-10, menuY-35, 140, 20, TGrey, TBlack, gr_orientation::horizontal, pDevice );
Quote Originally Posted by luccss View Post
@ParkII
Fumo não so bebo hehehehe
me da uma ajuda add ai brendo.vale01@.hotmail.com
essa detours ta velha em luccss
Quote Originally Posted by luccss View Post
retirei algumas coisas
Get 2 virusscans .
Quote Originally Posted by Drake View Post


Get 2 virusscans .
who approved?
Posts 1–15 of 18 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?