c# - DirectX Z order -


i have draw map managed directx. map arrived in mapinfo format (lines, polylines, regions/polygons). polygons triangulated (done glutesselator).

the idea:

  1. gps coordinates converted x,y points (mercator projection)
  2. i use positioncolored vertexformat
  3. center of view [x,y] (can modify mouse move)
  4. camera positioned [x,y,z] z zoom (-100 default, can modify mouse wheel)
  5. camera target is: [x,y,0], camera up: [0,1,0]
  6. the layers of map positioned z (+1.0, 0.99, 0.98, 0.97...etc)

i can do:

  1. draw lines , polylines
  2. draw 1 layer of polygons

my problem is: when want draw layers see 1 of them. think there problem z ordering. should solve this? modify renderstate? best if draw in gdi (first in back, last in front).

other question: how can coordinate of pixel under mouse cursor? (in gdi version of map because used own viewport rendering, directx everything)

thanks!

if map purely 2d, make sure z buffering turned off. once is, things display in order draw them in.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -