Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

CrescentFresh

Member Since 12 Mar 2006
Offline Last Active Mar 26 2013 02:32 PM
-----

Posts I've Made

In Topic: Recover full screen device, procedurally from other process.

27 February 2013 - 08:33 AM

I'm handling all the input through the traditional WndProc message callbacks. I have a feeling I might be incorrectly using AllowSetForegroundWindow in the process that is supposed to give up focus when its done to the dx9 app, and that is what's causing the weird "rending on top, but input falls through to the windows behind".

 

Thanks, for helping tho!


In Topic: Recover full screen device, procedurally from other process.

26 February 2013 - 04:13 PM

Are you releasing all of your device resources, including textures, vertex buffers, essentially anything created by D3D? I'm only seeing the device currently, and it can't reset properly until all resources have been released.

Yeah, the m_pDevices[j].OnLostDevice(); is handling all of that within. I am able to have it recover properly when I use the mouse and keyboard to select the minimized application. That's why I'm pretty certain it's some sort of focus issue.

 

void LtGDevice::OnLostDevice()
{
	m_pD3DSprite->OnLostDevice();

	SAFE_RELEASE(m_pBackBuffer);
	SAFE_RELEASE(m_swapChain);

	// Kill all the tasks... they will be repopulated upon DeviceReset
	for(unsigned int i = 0; i < m_vScheduledTasks.size(); i++)
	{
		SAFE_DELETE(m_vScheduledTasks[i]);
	}
	m_vScheduledTasks.clear();

	for(map<int, LPDIRECT3DTEXTURE9>::iterator iter = m_mapTextures.begin(); iter != m_mapTextures.end(); ++iter)
	{
		SAFE_RELEASE(iter->second);
	}

	for(map<FONT_HANDLE, LPD3DXFONT>::iterator iter = m_mapFonts.begin(); iter != m_mapFonts.end(); ++iter)
	{
		iter->second->OnLostDevice();
	}

	m_bForceReset = false;
}

In Topic: Draw text and color bar using sprites

05 February 2013 - 10:17 AM

I'm not sure what you mean by "solid rectangles", but it may be that you don't have the correct render states enabled to draw text.

 

D3DXSPRITE_ALPHABLEND

D3DXSPRITE_SORT_TEXTURE

 

try enabling those states on the d3dDevice using SetRenderState();


PARTNERS