I have some textures for labels which I have rendered onto triangles within a 3d model. They are Pool.Managed and they work fine normally, I just discovered something odd.

By disabling my OnApplicationIdle loop that calls Render() (And it does nothing else) and forcing render from a toolbar button, textures will not render but the rest of the scene does

Iv observed the following behaviour when I have my onapplicationidle loop disabled
No z buffer / alpha blending - black boxes in place of textures forcing Render()
alpha enabled - nothing
z + alpha - nothing
when rendered from onapplicationdle, success, nice pretty labels, etc
forcing render() while onapplicationidle is active does not cause them to dissapear

Any ideas on this one

Re: Game Technologies: Graphics MDX: Textures not appearing all the time


Code Snippet

' draw joints
If vtbMain <> Nothing Then
dev.SetStreamSource(0, vtbMain, 0)
dev.VertexFormat = CustomVertex.PositionColored.Format
dev.SetTexture(0, Nothing)
dev.DrawPrimitives(PrimitiveType.PointList, 0, joints.Length)
dev.DrawPrimitives(PrimitiveType.LineList, joints.Length, 12)
End If

' draw labels
If vtbLabels IsNot Nothing And bShowLabels Then
dev.SetStreamSource(0, vtbLabels, 0)
dev.VertexFormat = CustomVertex.PositionTextured.Format
For i As Integer = 0 To joints.Length - 1
If (joints(i).Selected) Then
dev.SetTexture(0, joints(i).texLabelSel)
dev.SetTexture(0, joints(i).texLabel)
End If

dev.DrawPrimitives(PrimitiveType.TriangleList, 6 * i, 2)
End If

sprLabels.Draw2D(texSelection, New Rectangle(0, 0, 1, 1), New SizeF(5, 5), New PointF(5, 5), Color.Transparent)

of course no one can solve this because its insane and illogical
Ignoring my first post totally, take for instance, If i comment out the bottom 3 lines, it causes the labels no longer appear. The sprite texSelection in question never renders. All this makes me wanna shoot myself in the head Sad

I am having this problem on 2 pc's at home and at work, its just so random.