Index: include/nuiMeshEngine.h
===================================================================
RCS file: /cvsroot/ngl/nui/include/nuiMeshEngine.h,v
retrieving revision 1.1
diff -c -r1.1 nuiMeshEngine.h
*** include/nuiMeshEngine.h	7 Jan 2003 16:48:16 -0000	1.1
--- include/nuiMeshEngine.h	18 Feb 2003 20:27:51 -0000
***************
*** 55,60 ****
--- 55,61 ----
  class nuiMeshEngine
  {
  public:
+ float mPOA, mPOB;
    static const uint ModeNoLight;
    static const uint ModeNoMaterial;
    static const uint ModeWireFrame;
Index: src/widgets/nuiMesh.cpp
===================================================================
RCS file: /cvsroot/ngl/nui/src/widgets/nuiMesh.cpp,v
retrieving revision 1.2
diff -c -r1.2 nuiMesh.cpp
*** src/widgets/nuiMesh.cpp	8 Jan 2003 16:42:06 -0000	1.2
--- src/widgets/nuiMesh.cpp	18 Feb 2003 20:27:51 -0000
***************
*** 262,269 ****
--- 262,274 ----
      float len = axis.Length();
  
      mViewMode = eViewPan;
+ #if 0
      mXScale = len / diag;
      mYScale = len / diag;
+ #else
+     mXScale = 0.01f;
+     mYScale = 0.01f;
+ #endif
    }
    else
    if (IsKeyDown(NK_LSHIFT) || IsKeyDown(NK_RSHIFT))
***************
*** 324,329 ****
--- 329,335 ----
  
      case eViewPan:
      {
+ #if 0
        nglVectorf eye = mEyeRef;
        nglVectorf target = mTargetRef;
        nglVectorf delta = mHorizon * DeltaX - mUp * DeltaY;
***************
*** 332,337 ****
--- 338,348 ----
        target += delta;
  
        mpEngine->SetCamera(&eye, &target);
+ #else
+       mpEngine->mPOA = (float)DeltaX;
+       mpEngine->mPOB = -(float)DeltaY;
+       NGL_OUT("glPolygonOffset(%.2f, %.2f)\n", mpEngine->mPOA, mpEngine->mPOB);
+ #endif
        Invalidate();
      }
      break;
Index: src/widgets/nuiMeshEngine.cpp
===================================================================
RCS file: /cvsroot/ngl/nui/src/widgets/nuiMeshEngine.cpp,v
retrieving revision 1.2
diff -c -r1.2 nuiMeshEngine.cpp
*** src/widgets/nuiMeshEngine.cpp	8 Jan 2003 16:42:06 -0000	1.2
--- src/widgets/nuiMeshEngine.cpp	18 Feb 2003 20:27:51 -0000
***************
*** 66,71 ****
--- 66,73 ----
  nuiMeshEngine::nuiMeshEngine (nglContext* pContext)
  {
    mpContext = pContext;
+ mPOA = -9.3f;
+ mPOB = 0.5f;
  
    Init();
  };
***************
*** 184,189 ****
--- 186,193 ----
   * Renderer
   */
  
+ #define CELLSHADER
+ 
  void nuiMeshEngine::Draw (nuiDrawContext* pContext, const nuiRect& rViewPort)
  {
    if (!mCamera.size())
***************
*** 192,202 ****
--- 196,215 ----
    // Setup context
    pContext->EnableDepthTest(true);
    pContext->EnableCullFace(true);
+   glCullFace(GL_BACK);
  
    // Setup background
    ngl3DSColor& bg = mScene.mpBgColor[0];
+ #ifdef CELLSHADER
+   bg.mR = bg.mG = bg.mB = 1.f;
+ #endif
    glClearColor(bg.mR, bg.mG, bg.mB, 1.0f);
    glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);
+ /*
+ glEnable(GL_POLYGON_OFFSET_FILL);
+ glPolygonOffset(mPOA, mPOB);
+ */
+ glDisable(GL_POLYGON_OFFSET_FILL);
  
    // Save projection and movelview matrices
    glMatrixMode(GL_PROJECTION);
***************
*** 221,226 ****
--- 234,256 ----
    glPolygonMode(GL_FRONT, (mMode & ModeWireFrame) ? GL_LINE : GL_FILL);
  
    OnDraw(pContext);
+ #ifdef CELLSHADER
+   pContext->EnableLighting(false);
+   glColor3f(0.f, 0.f, 0.f);
+ /*
+   glEnable(GL_LINE_SMOOTH);
+   glLineWidth(3.f);
+ */
+ 
+   glCullFace(GL_FRONT);
+ /*
+   glPolygonMode(GL_BACK, GL_LINE);
+ */
+   glEnable(GL_POLYGON_OFFSET_FILL);
+   glPolygonOffset(mPOA, mPOB);
+ 
+   OnDraw(pContext);
+ #endif // CELLSHADER
  
    // Restore projection and modelview matrices
    glMatrixMode(GL_PROJECTION);
