diff --git a/DarkEdif/Inc/Windows/WindowsSurface.hpp b/DarkEdif/Inc/Windows/WindowsSurface.hpp index 0afda7af..6c823550 100644 --- a/DarkEdif/Inc/Windows/WindowsSurface.hpp +++ b/DarkEdif/Inc/Windows/WindowsSurface.hpp @@ -655,12 +655,13 @@ class FusionAPIImport cSurface // Sets this cSurface as the current one in a double-buffer... in what context? How are surfaces paired, and how do we know what the pairs target? void SetCurrentDevice(); - // TODO: YQ: Rendering to GetRenderTargetSurface()? Where and why do we need to call BeginRendering()? // Implemented in Direct3D 9 and 11 on CF2.5+. Not available in Direct3D 8. + // Use if you plan to do your own HWA rendering (i.e, doing rendering with DirectX driver info) onto the surface; if the surface is an HWA render target this function binds the render target as the current one in Fusion's D3D device state. int BeginRendering(BOOL clear, RGBAREF rgba); - // TODO: YQ: Rendering to GetRenderTargetSurface()? + // Call after you've finished rendering after a previous BeginRendering() call. int EndRendering(); - // TODO: YQ: update how? + // Only works on frame surface; redraws Fusion's window. + // Note that on D3D9 this usually can't be called in a Display/DisplayRunObject() routine, my assumption being that it's due to the fact you'd be in a BeginScene()/EndScene() pair at that point (which, D3D9 usually does not allow screen updates in that case). BOOL UpdateScreen(); #ifdef HWABETA @@ -670,7 +671,7 @@ class FusionAPIImport cSurface void ReleaseRenderTargetSurface(cSurface* psf); // TODO: YQ: What does this do, how does Max affect it ? void Flush(BOOL bMax); - // TODO: YQ: I would guess this is the Z position of the buffer, but a float makes no sense here. + // Frame-surface only. In D3D9, this enables Z-buffering similar to how you can also enable it in shaders, but I still have no idea what the z2D parameter does.. void SetZBuffer(float z2D); #endif @@ -1056,7 +1057,11 @@ class FusionAPIImport cSurface // Lost device callback #ifdef HWABETA + // TODO: This apparently must be called inside of a lost-device callback.. void OnLostDevice(); + // Adds a lost device callback to the surface. + // Such callback is executed right when the D3D device is lost, in which case you must free all custom D3D resources you may have created as part of this surface. + // NB: There's no callbacks to recover from device loss, only when it occurs, so you'll need to figure out yourself when to recreate your custom D3D resources had you created any. void AddLostDeviceCallBack(LOSTDEVICECALLBACKPROC pCallback, LPARAM lUserParam); void RemoveLostDeviceCallBack(LOSTDEVICECALLBACKPROC pCallback, LPARAM lUserParam);