- struct vertex_stage_data *store = (struct vertex_stage_data *)stage->private;
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- struct vertex_buffer *VB = &tnl->vb;
-
- if (stage->changed_inputs)
- {
-/* VB->ObjPtr->size = 4; */
-
- if (ctx->_NeedEyeCoords) {
- /* Seperate modelview and project transformations:
- */
- if (ctx->ModelView.type == MATRIX_IDENTITY)
- VB->EyePtr = VB->ObjPtr;
- else
- VB->EyePtr = TransformRaw( &store->eye, &ctx->ModelView,
- VB->ObjPtr);
-
- if (ctx->ProjectionMatrix.type == MATRIX_IDENTITY)
- VB->ClipPtr = VB->EyePtr;
- else
- VB->ClipPtr = TransformRaw( &store->clip, &ctx->ProjectionMatrix,
- VB->EyePtr );
- }
- else
- {
- /* Combined modelviewproject transform:
- */
- if (ctx->_ModelProjectMatrix.type == MATRIX_IDENTITY)
- VB->ClipPtr = VB->ObjPtr;
- else
- VB->ClipPtr = TransformRaw( &store->clip, &ctx->_ModelProjectMatrix,
- VB->ObjPtr );
- }
-
- /* Cliptest and perspective divide. Clip functions must clear
- * the clipmask.
+ struct vertex_stage_data *store = (struct vertex_stage_data *)stage->privatePtr;
+ TNLcontext *tnl = TNL_CONTEXT(ctx);
+ struct vertex_buffer *VB = &tnl->vb;
+
+ if (ctx->VertexProgram._Current)
+ return GL_TRUE;
+
+ if (ctx->_NeedEyeCoords) {
+ /* Separate modelview transformation:
+ * Use combined ModelProject to avoid some depth artifacts