Skip to main content
GameDev.net gamedev.net
🔒 Locked

Help with BackBuffers

Started by Enerjak Jan 27, 2008 at 10:01 PM 1 replies 1k views
Original Post
Enerjak
Enerjak
I figured i'd post a new thread since no one responded in my CUSTOMVERTEX type one. Anyways, i'm trying to use backbuffers. i created a SwapChain and used it to get the back buffer. but it blinks it's like trying to draw both of them at the same time. and it blinks like i just said. and I also have a render function. does anyone maybe know of an exaple that uses back buffers? Cause yeah, i want to be able to render multiple scenes.


Direct3DDevice9->GetBackBuffer(1,0,D3DBACKBUFFER_TYPE_MONO,&BackBuffer);
			Direct3DDevice9->Clear(1,NULL,D3DCLEAR_TARGET,D3DCOLOR_XRGB(0,0,0),1.0f,0);
			SwapChain->GetBackBuffer(3,D3DBACKBUFFER_TYPE_MONO,&BackBuffer);
		
			g_pFonts->DrawTextA(NULL,
				"Hello World....FINALLY",
				22,
				&text,
				DT_CENTER | DT_VCENTER,
				D3DCOLOR_XRGB(255,255,255));
		SwapChain->Present(NULL,NULL,NULL,NULL,NULL);


renman29
renman29
I came accross this recently:
http://www.fairyengine.com/articles/dxmultiviews.htm

Looks like they're swapping z-buffer and setting render targets too. I haven't really read it though.
Hopefully it's helpful though. :)
Enerjak
Enerjak
Not to be ungratefull...but isn't there an easier one? :-p I guess i'll have to look it up or just look at the tutorial and study it.

Topic Locked

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

Sign in to reply to this topic.