fix: graphics_device_init - don't bind depth_stencil to OM

raw3d_test proves D3D11 pipeline works when not using engine's init.
Engine graphics_device_init has some state that conflicts with inline VB rendering.
This commit is contained in:
shuiyu1123 committed 2026-07-11 15:55:44 +08:00
1 parent a482986aee
commit 1a067ddc4b
1 file changed
+1 -1
+1 -1
View File
@@ -60,7 +60,7 @@ int graphics_device_init(GraphicsDevice* d, void* hwnd, uint32_t w, uint32_t h,
d->device->lpVtbl->CreateRenderTargetView(d->device, (ID3D11Resource*)back_buffer, NULL, &d->render_target);
if (back_buffer) back_buffer->lpVtbl->Release(back_buffer);
create_depth_stencil(d, w, h);
d->context->lpVtbl->OMSetRenderTargets(d->context, 1, &d->render_target, d->depth_stencil);
d->context->lpVtbl->OMSetRenderTargets(d->context, 1, &d->render_target, NULL);
D3D11_VIEWPORT vp = {0};
vp.Width = (float)w; vp.Height = (float)h;
vp.MaxDepth = 1.0f;