DiscussionsIssue archiveOCCT:Visualization

Archived issue #0025474

Visualization, TKOpenGl - support lighting + colored vertices within built-in GLSL programs

Open CASCADEOCCT:Visualizationclosed5 public notes

Search issues

Description

Within fixed pipeline combination of per-vertex color and lighting is possible, see OpenGl_VertexBuffer::bindFixed():
    case Graphic3d_TOA_COLOR:
    {
      theCtx->core11->glEnableClientState (GL_COLOR_ARRAY);
      theCtx->core11->glColorPointer (theNbComp, theDataType, theStride, theOffset);
      theCtx->core11->glColorMaterial (GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE);
      theCtx->core11fwd->glEnable (GL_COLOR_MATERIAL);


however within built-in GLSL programs this combination (Normals + Colors) is ignored.
Modified shader should use occVertColor in place of occFrontMaterial_Ambient(), occFrontMaterial_Diffuse(), occBackMaterial_Ambient() and occBackMaterial_Diffuse() to provide the same behavior.

Public activity

5 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Sun Nov 23 17:29:38 2014 +0300

    0025474: Visualization, TKOpenGl - support lighting + colored vertices within built-in GLSL programs
02Author
Please take a look at the patch in branch CR25474.
03Author
Dear Commenter 1,

please switch to tested (within #0025304).
04Commenter 1
Issue has been fixed within 0025304
05Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records