111 a = ((
b & 0x01) << 7) |
132 p[
i] = (
p[
i] >> 8) | ((
p[
i] << 8) & 0xff00);
148 | ((
b >> 8) & 0xff00)
149 | ((
b << 8) & 0xff0000)
150 | ((
b << 24) & 0xff000000);
179 return sizeof(
GLint);
237 GLint bytes_per_comp;
238 GLint comp_per_pixel;
240 GLint pixels_per_row;
248 if (bytes_per_comp<0) {
254 if (comp_per_pixel<0) {
263 pixels_per_row =
width;
272 bytes_per_row = alignment
273 *
CEILING( comp_per_pixel*pixels_per_row, 8*alignment );
276 + (skiprows +
row) * bytes_per_row
282 if (bytes_per_comp>=alignment) {
283 comps_per_row = comp_per_pixel * pixels_per_row;
286 GLint bytes_per_row = bytes_per_comp * comp_per_pixel
289 comps_per_row = alignment / bytes_per_comp
290 *
CEILING( bytes_per_row, alignment );
295 + (skiprows +
row) * bytes_per_comp * comps_per_row
296 + (skippixels) * bytes_per_comp * comp_per_pixel;
299 return (
GLvoid *) pixel_addr;
367 dst += width_in_bytes;
370 if (
ctx->Unpack.LsbFirst) {
383 image->Components = 0;
406 GLint width_in_bytes;
426 dst += width_in_bytes;
429 if (
ctx->Unpack.LsbFirst) {
438 image->Format = srcFormat;
479 for (
j=0;
j<elems_per_row;
j++) {
484 for (
j=0;
j<elems_per_row;
j++) {
491 for (
j=0;
j<elems_per_row;
j++) {
496 for (
j=0;
j<elems_per_row;
j++) {
502 if (
ctx->Unpack.SwapBytes) {
503 for (
j=0;
j<elems_per_row;
j++) {
516 for (
j=0;
j<elems_per_row;
j++) {
521 for (
j=0;
j<elems_per_row;
j++) {
528 if (
ctx->Unpack.SwapBytes) {
529 for (
j=0;
j<elems_per_row;
j++) {
542 for (
j=0;
j<elems_per_row;
j++) {
547 for (
j=0;
j<elems_per_row;
j++) {
554 if (
ctx->Unpack.SwapBytes) {
556 for (
j=0;
j<elems_per_row;
j++) {
559 | ((
value & 0x00ff0000) >> 8)
560 | ((
value & 0x0000ff00) << 8)
561 | ((
value & 0x000000ff) << 24);
572 for (
j=0;
j<elems_per_row;
j++) {
577 for (
j=0;
j<elems_per_row;
j++) {
584 if (
ctx->Unpack.SwapBytes) {
586 for (
j=0;
j<elems_per_row;
j++) {
589 | ((
value & 0x00ff0000) >> 8)
590 | ((
value & 0x0000ff00) << 8)
591 | ((
value & 0x000000ff) << 24);
602 for (
j=0;
j<elems_per_row;
j++) {
607 for (
j=0;
j<elems_per_row;
j++) {
614 if (
ctx->Unpack.SwapBytes) {
616 for (
j=0;
j<elems_per_row;
j++) {
619 | ((
value & 0x00ff0000) >> 8)
620 | ((
value & 0x0000ff00) << 8)
621 | ((
value & 0x000000ff) << 24);
627 dst += elems_per_row;
641 image->Format = srcFormat;
static unsigned char bytes[4]
static void normalize(float vec[3])
void gl_problem(const GLcontext *ctx, const char *s)
GLint gl_sizeof_type(GLenum type)
GLint gl_components_in_format(GLenum format)
GLvoid * gl_pixel_addr_in_image(struct gl_pixelstore_attrib *packing, const GLvoid *image, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint row)
struct gl_image * gl_unpack_image(GLcontext *ctx, GLint width, GLint height, GLenum srcFormat, GLenum srcType, const GLvoid *pixels)
void gl_free_image(struct gl_image *image)
void gl_flip_bytes(GLubyte *p, GLuint n)
void gl_swap4(GLuint *p, GLuint n)
void gl_swap2(GLushort *p, GLuint n)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
#define GL_UNSIGNED_SHORT
#define GL_LUMINANCE_ALPHA
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
GLuint GLuint GLsizei GLenum type
GLint GLint GLsizei GLsizei height
#define GL_DEPTH_COMPONENT
GLint GLint GLsizei width
GLenum GLenum GLuint components
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define UBYTE_TO_FLOAT(B)
#define MEMCPY(DST, SRC, BYTES)
#define SHORT_TO_FLOAT(S)
#define USHORT_TO_FLOAT(S)