Sign in to follow this  

Directx 9 Surfaces

Recommended Posts

I am trying to learn DX9 and have been working through some books to start getting things happening. I can create a window and set up the device and everything is all well. Next I wanted to display a jpg as a background so I have been using
	HRESULT hResult = pD3D9->CreateOffscreenPlainSurface(800,600,D3DFMT_UNKNOWN,D3DPOOL_DEFAULT,&surface,NULL);
but when I compile i get the error (82): error C2039: 'CreateOffscreenPlainSurface' : is not a member of 'IDirect3D9' I create the device like so
	if ( FAILED( pD3D9->CreateDevice( D3DADAPTER_DEFAULT,
									  D3DDEVTYPE_HAL, hWnd,
									  &D3Dpp, &pD3DDevice)))
Is there something simple i am doing wrong here? Thanks for looking

Share this post

Link to post
Share on other sites
From what I can see (sorry at work)-- it looks like your trying to create the surface from IDirect3D9, not the device


// Wrong
HRESULT hResult =

// Right
HRESULT hResult =

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this