mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-14 19:04:44 +00:00
Texture Flickering Directx9 #937
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#937
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imgui causing textures to flicker in game depending on window position, directx9. CreateStateBlock with D3DSBT_ALL should be saving all the states, it seems like this could be z-fighting?
Any input would be great thanks.
Small Flicker:




More Flicker:
No Flicker:
TONS of Flicker:
You could use a frame analyser see what's happening when it's flickering. Not sure how many of them still support Directx9 though, I know RenderDoc doesn't at least.
Comment out part of the imgui dx9 renderer to find which line/block is affecting your game.
Figured it out, the viewport needed to be set. It still flickers if I move the window off screen in the upper left corner, I can live with that though.
// Create viewport
D3DVIEWPORT9 viewport;
viewport.Width = io.DisplaySize.x;
viewport.Height = io.DisplaySize.y;
viewport.MinZ = 0.0f;
viewport.MaxZ = 1.0f;
viewport.X = 0.0f;
viewport.Y = 0.0f;
// Set viewport.
g_pd3dDevice->SetViewport(&viewport);
I now made the DX9 example code explicitly set (and supposedly restore) the viewport to follow on other examples.