if (!rb->Data)
return NULL;
- return (rb->Data +
+ return ((char *) rb->Data +
(y * rb->RowStride + x) * _mesa_get_format_bytes(rb->Format));
}
if (mask) {
for (i = 0; i < count; i++) {
- void *dst = row + i * format_bytes;
- const void *src = values + i * datatype_bytes;
+ char *dst = (char *) row + i * format_bytes;
+ const char *src = (const char *) values + i * datatype_bytes;
if (mask[i]) {
memcpy(dst, src, format_bytes);
}
else {
for (i = 0; i < count; i++) {
- void *dst = row + i * format_bytes;
- const void *src = values + i * datatype_bytes;
+ char *dst = (char *) row + i * format_bytes;
+ const char *src = (const char *) values + i * datatype_bytes;
memcpy(dst, src, format_bytes);
}
}
if (mask) {
for (i = 0; i < count; i++) {
- void *dst = row + i * format_bytes;
+ char *dst = (char *) row + i * format_bytes;
if (mask[i]) {
memcpy(dst, value, format_bytes);
}
}
else {
for (i = 0; i < count; i++) {
- void *dst = row + i * format_bytes;
+ char *dst = (char *) row + i * format_bytes;
memcpy(dst, value, format_bytes);
}
}
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
- void *row = rb->GetPointer(ctx, rb, x[i], y[i]);
- void *dst = row + i * format_bytes;
- const void *src = values + i * datatype_bytes;
-
+ void *dst = rb->GetPointer(ctx, rb, x[i], y[i]);
+ const char *src = (const char *) values + i * datatype_bytes;
memcpy(dst, src, format_bytes);
}
}
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
- void *row = rb->GetPointer(ctx, rb, x[i], y[i]);
- void *dst = row + i * format_bytes;
+ void *dst = rb->GetPointer(ctx, rb, x[i], y[i]);
memcpy(dst, value, format_bytes);
}
}
get_row_ubyte3(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
GLint x, GLint y, void *values)
{
- const GLubyte *src = (const GLubyte *) (rb->Data +
- 3 * (y * rb->RowStride + x));
+ const GLubyte *src = ((const GLubyte *) rb->Data) +
+ 3 * (y * rb->RowStride + x);
GLubyte *dst = (GLubyte *) values;
GLuint i;
ASSERT(rb->Format == MESA_FORMAT_RGB888);
ASSERT(rb->DataType == GL_UNSIGNED_BYTE);
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
- GLubyte *dst = (GLubyte *) (rb->Data +
- 3 * (y[i] * rb->RowStride + x[i]));
+ GLubyte *dst = ((GLubyte *) rb->Data) +
+ 3 * (y[i] * rb->RowStride + x[i]);
dst[0] = val0;
dst[1] = val1;
dst[2] = val2;
ASSERT(rb->DataType == GL_UNSIGNED_SHORT || rb->DataType == GL_SHORT);
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
- GLushort *dst = (GLushort *) (rb->Data + 4 *
- (y[i] * rb->RowStride + x[i]));
+ GLushort *dst =
+ ((GLushort *) rb->Data) + 4 * (y[i] * rb->RowStride + x[i]);
dst[0] = src[i * 4 + 0];
dst[1] = src[i * 4 + 1];
dst[2] = src[i * 4 + 2];
ASSERT(rb->DataType == GL_UNSIGNED_SHORT || rb->DataType == GL_SHORT);
for (i = 0; i < count; i++) {
if (!mask || mask[i]) {
- GLushort *dst = (GLushort *) (rb->Data +
- 4 * (y[i] * rb->RowStride + x[i]));
+ GLushort *dst = ((GLushort *) rb->Data) +
+ 4 * (y[i] * rb->RowStride + x[i]);
dst[0] = val0;
dst[1] = val1;
dst[2] = val2;