Sign in to follow this  
ucfchuck

Texture flickering

Recommended Posts

i am having a problem with texture flickering and all sorts of wierd rendering errors, im using slimdx and dx10. basically i am using 2 draw calls to draw a triangle strip and linelist and a drawindexed for triangle list http://i.imgur.com/kk6Cu.jpg heres an image of one part of it messing up. the part in the middle is fine its just looking at different data, but the scale on the right side completely screws up. that surface is static and is never meant to change. the vertex buffer is only created once and never modified an yet the geometry for it is very warped, at least thats what it looks like, also the colors screw up even though they are never accessed. this warping happens with all three surfaces though it is rather unique in how it warps each. the middle texture will sometimes look like the triangles are disconnected in time with a thin black line separating them, or it can show up with a wapred geometry as well. the ruler on the side will often show up 'filled in' as though each of the lines were part of a quad or something and it will also somehow get color. it will also sometimes shift to the side and scale, the same with the others, sometimes it seems like it is overlapping the vertex buffers and trying to render one object as another. if i turn off all but the middle texture render then most of the problem goes away but i still get a black screen flicker every second or so. anyone have any ideas?

Share this post


Link to post
Share on other sites
For starters there are no triangle strips in DX10. So???

Secondly looks like the matrix for the geometry is screwed up. If the image on the right is right and the image on the left is your problem i'd say the matrix for the verticies is all messed up since

1)you can see the clear color behind the vertices, which means the geometry is definately not the rect. you see over on the right.

2) There still seem to be 8 vertices in the messed up geometry, so my guess is you have two quad there, and the matrix is toast.

I would check the matrix you are using to transform those vertices. Make absolutely sure its what you want in the vertex shader at draw time.

Share this post


Link to post
Share on other sites
the triangle strip is from slimdx.direct3d10.PrimitiveTopology.TriangleStrip

the view world and projection matrices only change when the user is moving the image with the mouse and the updates are in events which are only called when the user moves the image, for that image i uploaded there was no movement and the view projection and world matrices remained constant.

Share this post


Link to post
Share on other sites
yea its just every once in a while, probly every couple of frames at most and once every few hundred at the least. it gets worse when i have the mouse hovering over the window though i dont use the hover event, all i use are the mousebutton down and up events.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this