by "Ron AF Greve" <ron@[EMAIL PROTECTED]
>
May 26, 2007 at 06:15 PM
Hi,
You might consider reading up on:
http://www.gamedev.net/reference/articles/article1434.asp
In addition to that I myself use the following code to write to a texture
the Area is a pointer to the Rgb values for every next line you need to
add
pitch bytes.
I don't know it this is actually sup****ted on every video card or what the
performance is but it works on three different nvidia cards.
bool CD3DDisplay::LockView****t( char **Area, long& Pitch )
{
if( !PanelTexture ) return false;
D3DLOCKED_RECT LockedRect = { 0 };
RECT ClientRect = { 0 };
ClientRect.bottom = GetView****tHeight();
ClientRect.right = GetView****tWidth();
if( FAILED( PanelTexture->LockRect( 0, &LockedRect, &ClientRect, 0 ) ) )
{
Channel << Level1 << "Could not LockRect textture" << End;
return false;
}
*Area = reinterpret_cast<char*>( LockedRect.pBits );
Pitch = LockedRect.Pitch;
}
void CD3DDisplay::UnlockView****t()
{
if( !PanelTexture ) return;
if( FAILED( PanelTexture->UnlockRect( 0 ) ) )
{
Channel << Level1 << "Could not unlock view****t" << End;
}
}
Regards, Ron AF Greve
http://www.InformationSuperHighway.eu
"SL" <ser@[EMAIL PROTECTED]
> wrote in message
news:f2hmu9$i6s$1@[EMAIL PROTECTED]
> Im looking for a 2D programming API with which you can get a pointer to
> screen and start drawing on it using that pointer like in the old
> directdraw.
> Are there any?
>