can't see lines

Apr 5, 2011 at 1:43 PM

When I draw my own geometry, I can't see any lines I draw. Faces work fine.

I add vertices and lines using FullDetailLevel.SetVertex() and FullDetailLevel.SetLine(), but the lines are not shown.

I read some issues on lightning in previous versions. Is this related?

Gr, Sander

Apr 8, 2011 at 10:58 AM
Edited Apr 8, 2011 at 11:12 AM

Maybe I should provide some code (see below). I am using Balder version I have also used a self-compiled newer version (rev. 851), with the same problem.

What am I missing?

Gr, Sander


<Execution:Game Name="myBalderGameObject" Width="640" Height="480">
		<View:Camera Name="myCamera" Position="0,0,-20" />
	<Lighting:OmniLight Position="0,2,-10" Strength="1" Diffuse="White" Specular="White" />
	<Custom:MyGeometry x:Name="myGeometry" Color="Blue"/>
public class MyGeometry : Balder.Objects.Geometries.Geometry
	public MyGeometry()
		: base()

	public override void Prepare(Balder.Display.Viewport viewport)

	public void DrawLine()
		// drawing small boxes here
		FullDetailLevel.SetVertex(0, new Vertex(0, 0, 0));
		FullDetailLevel.SetVertex(1, new Vertex(10, 0, 0));

		FullDetailLevel.SetLine(0, new Line(0, 1));


Apr 8, 2011 at 11:06 AM

Hi, Sanderl

Have you taken a look at this example :

Take a look at the Prepare override.


Apr 8, 2011 at 11:14 AM
Edited Apr 8, 2011 at 1:02 PM

Hi StuartTrez,

Yes, I have. Actually, my original code does include the Prepare override (changed it in my example above).

I'm having the same problem with the example in your link.

Gr, Sander

Apr 8, 2011 at 11:50 AM

Hi sanderl,

I have just run through the code you have posted and it seems to be working fine ! If you want to send me over you full code I will take a look for you.


Apr 8, 2011 at 1:09 PM

Thanks for your helpfulness, StuartTrez. In my attempt to provide you my code, I found out that my simplified example did work!

The problem was that I had a second custom geometry class (containing a plane/face), which was located below the line geometry in my XAML, and was therefore drawn after the line was drawn, blocking my line (even though it was actually located behind the line in 3D space).

Gr, Sander

Apr 8, 2011 at 1:34 PM

np, Glad to help. I suggest you use the latest source and build Balder yourself (if you are not already)  as it has a lot of Culling and Clipping fixes in it.