Problems arise when I try to run the third code snippet, to render the texture on screen as a full-screen quad. So to test this stuff I made a checkerboard sprite, spawn it in the center of the screen, and start translating it to the right over time. Impl->dev->Present(NULL, NULL, NULL, NULL) create draw call for full-screen quad here ![]() HR_CHECK(impl->dev->Clear(0, NULL, D3DCLEAR_TARGET, 0xFFFF0000, far_dist, 0)) HR_CHECK(impl->dev->SetRenderTarget(0, screen_surface)) gather up all the draw calls and submit themĪnd rendering texture to fullscreen quad: HR_CHECK(impl->dev->Clear(0, NULL, D3DCLEAR_TARGET, 0xFF0000FF, far_dist, 0)) HR_CHECK(impl->dev->SetRenderTarget(0, texture_surface)) Res = texture->GetSurfaceLevel(0, &texture_surface) HRESULT res = impl->dev->CreateTexture(w, h, 0, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &texture, NULL) Here's how I'm creating my texture render target: By once I mean all subsequent attempts to render to texture will return no error codes, however, the texture contents will never get updated. My problem is very odd: if I ever attempt to render this texture onto the screen as a full-screen quad, I am only able to render to the texture *once*. I'm able to render to the texture just fine, and have verified this in a few ways (more on that later). ![]() I'm using D3D9 to render to a texture, and I want to then render that texture to a fullscreen quad.
0 Comments
Leave a Reply. |