Skip to main content
gamedev.net
🔒 Locked

Pointer to video buffer

Started by Tueur 4 replies 550+ views
Original Post
Tueur
Tueur
How can i get a pointer to gain acces to the video buffer directly?
Jacob Roman
Jacob Roman
I do know how to get the pointer to the backbuffer surface, which might help you in getting a pointer to the video buffer. In DirectX7 within DDSURFACEDESC2, there is something called lpSurface, which returns a pointer to a surface. Unfortunately in DirectX8, they took out Directdraw, so lpSurface didn't exist in there, yet I bet there was a way to get the pointer to any surface in there. Now in DirectX9, which I never used yet, they brought back DirectDraw. So lpSurface or maybe another variable name for it might be in there.
darookie
darookie
Quote:
Original post by Jacob Roman
I do know how to get the pointer to the backbuffer surface, which might help you in getting a pointer to the video buffer. In DirectX7 within DDSURFACEDESC2, there is something called lpSurface, which returns a pointer to a surface. Unfortunately in DirectX8, they took out Directdraw, so lpSurface didn't exist in there, yet I bet there was a way to get the pointer to any surface in there. Now in DirectX9, which I never used yet, they brought back DirectDraw. So lpSurface or maybe another variable name for it might be in there.

Seems you mixed something up. DirectDraw is and will be available from DirectX 8, 9 and following versions. It's just not part of the SDK anymore.

Tueur: You cannot access the hardware video buffer directly. That's what drivers are for. Using D3D you can, however, gain access to the front- and backbuffer surfaces. Don't expect this to be a good method, though as this kind of 'direct access' will actually degrade performance. But depending on what you want to achieve, Device::GetBackBuffer() and Device::GetFrontBufferData() are what you need.
Jacob Roman
Jacob Roman
Whoops, forgot to log in. I was the annonymous poster.
DBX
DBX
DirectDraw has always been there, if it was taken out then no games which use it would work anymore. It hasn't been updated in 8 though, so there is no version 8 interface.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.