SoGLRenderState

InventorModule

genre

Shader

author

MeVis Medical Solutions AG

package

MeVisLab/Standard

dll

SoShader

definition

SoShader.def

keywords

vertex, fragment, geometry, shader

Purpose

The low-level module SoGLRenderState allows for manually changing the OpenGL state in the Open Inventor scene. Use it only if you understand the implications, as manual changes to the OpenGL state are not recognized by Open Inventor and may lead to unexpected side effects.

This module is somewhat unusual because, by default, all fields are set to the ‘ignored’ state and do not affect the scene.

To enable a field’s functionality, access the field’s context menu and disable Set Open Inventor Ignore Flag.

Output Fields

self

name: self, type: SoNode

Parameter Fields

Field Index

attribSaveMode: Enum

Point Sprites: Bool

Blend Mode: Enum

Poly Back Mode: Enum

Blending: Bool

Poly Front Mode: Enum

Cull Mode: Enum

Write Mask Depth: Bool

Depth Enable: Bool

Depth Function: Enum

Line Smooth: Bool

Line Width: Float

Visible Fields

Cull Mode

name: cullMode, type: Enum, default: BACK

Defines the cull mode.

Values:

Title

Name

​None

​NONE

​Back

​BACK

​Front

​FRONT

​Front And Back

​FRONT_AND_BACK

Depth Enable

name: depthEnable, type: Bool, default: TRUE

If checked, the depth buffer is enabled.

Depth Function

name: depthFunction, type: Enum, default: LESS

Defines the depth compare function.

Values:

Title

Name

​Never

​NEVER

​Less

​LESS

​Equal

​EQUAL

​Less Equal

​LESS_EQUAL

​Greater

​GREATER

​Not Equal

​NOT_EQUAL

​Greater Equal

​GREATER_EQUAL

​Always

​ALWAYS

Write Mask Depth

name: writeMaskDepth, type: Bool, default: TRUE

If checked, the writing to the depth buffer is enabled.

Poly Front Mode

name: polyFrontMode, type: Enum, default: FILL

Defines the draw style of the front side of polygons.

Values:

Title

Name

​Points

​POINTS

​Lines

​LINES

​Fill

​FILL

Poly Back Mode

name: polyBackMode, type: Enum, default: FILL

Defines the draw style of the back side of polygons.

Values:

Title

Name

​Points

​POINTS

​Lines

​LINES

​Fill

​FILL

Line Width

name: lineWidth, type: Float, default: 1

Sets the line width.

Line Smooth

name: lineSmooth, type: Bool, default: FALSE

If checked, the use of line smoothing should is enabled.

NOTE: Typically, you should enable Blending as well; otherwise, line smoothing will not function correctly, as it requires alpha blending.

Point Sprites

name: pointSprites, type: Bool, default: FALSE

If checked, the point sprite mode for GL_POINTS is enabled.

Blending

name: blending, type: Bool, default: FALSE

If checked, blending is enabled.

This overrides the blending settings of all following Open Inventor nodes: the blending will not be changed according to the transparency in the colors of shapes anymore.

Blend Mode

name: blendMode, type: Enum, default: BLEND_BLEND

Defines the blend mode that should be used if blending is enabled.

Values:

Title

Name

​Replace

​BLEND_REPLACE

​Add

​BLEND_ADD

​Blend

​BLEND_BLEND

​Premultiplied Blend

​BLEND_PREMULTIPLIED_BLEND

Hidden Fields

attribSaveMode

name: attribSaveMode, type: Enum, default: PUSH

Values:

Title

Name

​Push

​PUSH

​Pop

​POP