ReactOS  0.4.14-dev-552-g2fad488
readpix.h File Reference
#include "types.h"
Include dependency graph for readpix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void gl_ReadPixels (GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
 

Function Documentation

◆ gl_ReadPixels()

void gl_ReadPixels ( GLcontext ctx,
GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height,
GLenum  format,
GLenum  type,
GLvoid pixels 
)

Definition at line 1059 of file readpix.c.

1062 {
1063  if (INSIDE_BEGIN_END(ctx))
1064  {
1065  gl_error(ctx, GL_INVALID_OPERATION, "glReadPixels");
1066  return;
1067  }
1068 
1069  (void) (*ctx->Driver.SetBuffer)(ctx, ctx->Pixel.ReadBuffer);
1070 
1071  switch (format)
1072  {
1073  case GL_COLOR_INDEX:
1075  break;
1076  case GL_STENCIL_INDEX:
1078  break;
1079  case GL_DEPTH_COMPONENT:
1081  break;
1082  case GL_RED:
1083  case GL_GREEN:
1084  case GL_BLUE:
1085  case GL_ALPHA:
1086  case GL_RGB:
1087  case GL_BGR_EXT:
1088  case GL_LUMINANCE:
1089  case GL_LUMINANCE_ALPHA:
1090  case GL_RGBA:
1091  case GL_BGRA_EXT:
1093  break;
1094  default:
1095  gl_error(ctx, GL_INVALID_ENUM, "glReadPixels(format)");
1096  }
1097 
1098  (void) (*ctx->Driver.SetBuffer)(ctx, ctx->Color.DrawBuffer);
1099 }
#define GL_BGR_EXT
Definition: glext.h:3114
GLint GLint GLsizei width
Definition: gl.h:1546
#define GL_RED
Definition: gl.h:480
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define GL_ALPHA
Definition: gl.h:483
#define GL_BGRA_EXT
Definition: glext.h:3115
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define INSIDE_BEGIN_END(CTX)
Definition: macros.h:135
struct dd_function_table Driver
Definition: types.h:1276
struct gl_pixel_attrib Pixel
Definition: types.h:1328
struct gl_colorbuffer_attrib Color
Definition: types.h:1319
#define GL_LUMINANCE_ALPHA
Definition: gl.h:485
#define GL_RGB
Definition: gl.h:502
#define GL_STENCIL_INDEX
Definition: gl.h:458
#define GL_INVALID_OPERATION
Definition: gl.h:696
#define GL_BLUE
Definition: gl.h:482
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
static void read_depth_pixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum type, GLvoid *pixels)
Definition: readpix.c:233
void gl_error(GLcontext *ctx, GLenum error, const char *s)
Definition: context.c:1421
#define GL_LUMINANCE
Definition: gl.h:484
#define GL_DEPTH_COMPONENT
Definition: gl.h:307
static void read_color_pixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
Definition: readpix.c:611
#define GL_GREEN
Definition: gl.h:481
#define GL_COLOR_INDEX
Definition: gl.h:479
static void read_index_pixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum type, GLvoid *pixels)
Definition: readpix.c:84
static void read_stencil_pixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum type, GLvoid *pixels)
Definition: readpix.c:391
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: gl.h:1546
#define GL_INVALID_ENUM
Definition: gl.h:694
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define GL_RGBA
Definition: gl.h:503

Referenced by init_dlist_pointers(), and init_exec_pointers().