|
-
Feb 17th, 2005, 04:27 PM
#1
Quote/Code
IDirect3DTexture8 *Texture=NULL;
D3DLOCKED_RECT LR;
Graphics.D3DDevice->CreateTexture(128,128,0,D3DUSAGE_RENDERTARGET,D3DFMT_A8R8G8B8,D3DPOOL_MANAGED,&Texture);
Texture->LockRect(0,&LR,NULL,D3DLOCK_NOSYSLOCK );
for (int y=0;y<128;y++) {
for (int x=0;x<128;x++) {
((unsigned long*)LR.pBits)[x + ((y*LR.Pitch)>>2)]=D3DCOLOR_RGBA(255,0,0,255);
}
}
Code:
IDirect3DTexture8 *Texture=NULL;
D3DLOCKED_RECT LR;
Graphics.D3DDevice->CreateTexture(128,128,0,D3DUSAGE_RENDERTARGET,D3DFMT_A8R8G8B8,D3DPOOL_MANAGED,&Texture);
Texture->LockRect(0,&LR,NULL,D3DLOCK_NOSYSLOCK );
for (int y=0;y<128;y++) {
for (int x=0;x<128;x++) {
((unsigned long*)LR.pBits)[x + ((y*LR.Pitch)>>2)]=D3DCOLOR_RGBA(255,0,0,255);
}
}
IDirect3DTexture8 *Texture =NULL ;
D3DLOCKED_RECT LR ;
Graphics .D3DDevice ->CreateTexture (128,128,0,D3DUSAGE_RENDERTARGET ,D3DFMT_A8R8G8B8 ,D3DPOOL_MANAGED ,&Texture );
Texture ->LockRect (0,&LR ,NULL ,D3DLOCK_NOSYSLOCK );
for (int y =0;y <128;y ++) {
for (int x =0;x <128;x ++) {
((unsigned long*)LR .pBits )[x + ((y *LR .Pitch )>>2)]=D3DCOLOR_RGBA (255,0,0,255);
}
}
<div dir="ltr" style="text-align:left;">
IDirect3DTexture8 *Texture =NULL ;
D3DLOCKED_RECT LR ;
Graphics .D3DDevice ->CreateTexture (128,128,0,D3DUSAGE_RENDERTARGET ,D3DFMT_A8R8G8B8 ,D3DPOOL_MANAGED ,&Texture );
Texture ->LockRect (0,&LR ,NULL ,D3DLOCK_NOSYSLOCK );
for (int y =0;y <128;y ++) {
for (int x =0;x <128;x ++) {
((unsigned long*)LR .pBits )[x + ((y *LR .Pitch )>>2)]=D3DCOLOR_RGBA (255,0,0,255);
}
}
</div>
Blaaaaaaaaaaa
Last edited by NoteMe; Feb 17th, 2005 at 05:38 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|