view:polygonoffset
List of: Scheme Extensions
Subjects: Viewing
Contents: Graphic Interaction

Action: Enables and disables polygonoffset within an OpenGL view.

Filename: gi/gi_scm/view_scm_gi.cxx

Syntax: (view:polygonoffset [on-off] [view=active])

Arg Types: on-off boolean

view view

Returns: view

Description: The on-off argument enables (#t) and disables (#f) polygon offsetting. The polygons refer to those used in faceting a model, which is a requirement for rendering. When enabled and when model edges (view:edges) enabled, this command pushes the faceted polygon edges back so the model edges become more visible. Prevents z-buffer problems when displaying edges on top of the shaded object.

Limitations: This extension is available on all platforms, but produces results only on NT using OpenGL. Works in OpenGL views only. view:edges should be enabled to see any effect.

Example: ; view:polygonoffset

; Define a view.

(define view1 (view:gl))

;; #[view 1075519376]

; Define a block.

(define block1


(solid:block (position 0 0 0)


(position 25 20 30)))

;; block1

(define cylinder1


(solid:cylinder (position -10 -10 -10)


(position -10 -10 30) 5))

;; cylinder1

; Verify that edges are turned on

(view:edges #t view1)

;; #[view 1075519376]

; Turn on polygon offset to make edges easier to see

(view:polygonoffset #t view1)

;; #[view 1075519376]

; If edges are not turned on, you won't see

; anything when shading is turned off.


PDF/GI/03SCV.PDF
HTM/DATA/GI/GI/03SCV/0025.HTM