Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Gaming > Development Programming Misc > Re: 2D API
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 907 of 1002
Post > Topic >>

Re: 2D API

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?
>
 




 3 Posts in Topic:
2D API
"SL" <ser@[E  2007-05-17 14:31:22 
Re: 2D API
Tom Plunket <gamedev@[  2007-05-24 16:22:01 
Re: 2D API
"Ron AF Greve"   2007-05-26 18:15:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 4:46:28 CDT 2008.