Depth Buffer question

Member
Posts: 509
Joined: 2002.05
Post: #1
I have finally subdivided my road enough so that it renders over my heightmap correctly, but that required me offsetting the Y value of the road a tiny bit. Now my problem is that the bikes tire can go under the road anywhere from 0 to 1/3th of the tire.

How could I fix this, is there anyway to make any the Z value of polygons rendered in the bike smaller by .1?
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #2
glPolygonOffset(), and you need to render the bike after the road & terrain.
Quote this message in a reply
Member
Posts: 509
Joined: 2002.05
Post: #3
I remember trying glPolygonOffset() on my roads and it never worked correctly and someone said not to use it. I tried about every two combinations of parameters there were and didn't get it to work. What are the two parameters I should use if I want it to be closer to the camera by .1?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Depth Buffer Question AnotherJake 10 4,644 Sep 23, 2008 01:43 PM
Last Post: AnotherJake
  problems getting the depth buffer akb825 3 4,154 Jun 2, 2006 12:51 PM
Last Post: akb825
  Drawing to the Depth Buffer unknown 12 4,232 Dec 9, 2005 02:49 PM
Last Post: OneSadCookie
  Depth Buffer / Testing basic question... WhatMeWorry 5 6,331 Nov 18, 2005 12:50 AM
Last Post: arekkusu
  Reading from the Depth Buffer Joseph Duchesne 2 3,020 Jun 16, 2005 04:51 PM
Last Post: OneSadCookie