fprintf(stderr, "\n");
}
-static void do_import( struct vertex_buffer *VB,
- struct gl_client_array *to,
- struct gl_client_array *from )
-{
- GLuint count = VB->Count;
-
- if (!to->Ptr) {
- to->Ptr = ALIGN_MALLOC( VB->Size * 4 * sizeof(GLubyte), 32 );
- to->Type = GL_UNSIGNED_BYTE;
- }
-
- /* No need to transform the same value 3000 times.
- */
- if (!from->StrideB) {
- to->StrideB = 0;
- count = 1;
- }
- else
- to->StrideB = 4 * sizeof(GLubyte);
-
- _math_trans_4ub( (GLubyte (*)[4]) to->Ptr,
- from->Ptr,
- from->StrideB,
- from->Type,
- from->Size,
- 0,
- count);
-}
-
/* Interpolate the elements of the VB not included in typical hardware
* vertices.
*
#if DO_RGBA
STRIDE_4F(col, start * col_stride);
#endif
- coord = (GLfloat (*)[4])((GLubyte *)coord + start * coord_stride);
+ STRIDE_4F(coord, start * coord_stride);
+ /* coord = (GLfloat (*)[4])((GLubyte *)coord + start * coord_stride);*/
}
for (i=start; i < end; i++, v = (VERTEX *)((GLubyte *)v + stride)) {
#endif
#if DO_RGBA
- *((GLubyte *)p)++ = col[0][2]; /* VERTEX_?_B */
- *((GLubyte *)p)++ = col[0][1]; /* VERTEX_?_G */
- *((GLubyte *)p)++ = col[0][0]; /* VERTEX_?_R */
- *((GLubyte *)p)++ = col[0][3]; /* VERTEX_?_A */
+ UNCLAMPED_FLOAT_TO_UBYTE(*((GLubyte *)p), col[0][2]);
+ *((GLubyte *)p)++;
+ UNCLAMPED_FLOAT_TO_UBYTE(*((GLubyte *)p), col[0][1]);
+ *((GLubyte *)p)++;
+ UNCLAMPED_FLOAT_TO_UBYTE(*((GLubyte *)p), col[0][0]);
+ *((GLubyte *)p)++;
+ UNCLAMPED_FLOAT_TO_UBYTE(*((GLubyte *)p), col[0][3]);
+ *((GLubyte *)p)++;
STRIDE_4F(col, col_stride);
#else
p++;
if (mask[i] == 0) {
/* unclipped */
LE32_OUT( p,
- (VIEWPORT_X( coord[0][0] ) << 16) | /* VERTEX_?_X */
- (VIEWPORT_Y( coord[0][1] ) & 0xffff) ); /* VERTEX_?_Y */
+ (VIEWPORT_X( coord[i][0] ) << 16) | /* VERTEX_?_X */
+ (VIEWPORT_Y( coord[i][1] ) & 0xffff) ); /* VERTEX_?_Y */
if (MACH64_DEBUG & DEBUG_VERBOSE_PRIMS) {
fprintf( stderr, "%s: vert (importable) %d: %.2f %.2f %.2f %x\n",
}
#endif
#if DO_TEX1 || DO_TEX0 || DO_XYZW
- coord = (GLfloat (*)[4])((GLubyte *)coord + coord_stride);
+ STRIDE_4F(coord, start * coord_stride);
+ /* coord = (GLfloat (*)[4])((GLubyte *)coord + coord_stride);*/
#endif
assert( p + 1 - (CARD32 *)v == 10 );