ReactOS 0.4.15-dev-8100-g1887773
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}
void gl_error(GLcontext *ctx, GLenum error, const char *s)
Definition: context.c:1421
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define GL_LUMINANCE_ALPHA
Definition: gl.h:485
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: gl.h:1546
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define GL_INVALID_OPERATION
Definition: gl.h:696
#define GL_LUMINANCE
Definition: gl.h:484
#define GL_RGB
Definition: gl.h:502
#define GL_BLUE
Definition: gl.h:482
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define GL_RED
Definition: gl.h:480
#define GL_RGBA
Definition: gl.h:503
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
#define GL_DEPTH_COMPONENT
Definition: gl.h:307
#define GL_COLOR_INDEX
Definition: gl.h:479
#define GL_ALPHA
Definition: gl.h:483
GLint GLint GLsizei width
Definition: gl.h:1546
#define GL_INVALID_ENUM
Definition: gl.h:694
#define GL_GREEN
Definition: gl.h:481
#define GL_STENCIL_INDEX
Definition: gl.h:458
#define GL_BGR_EXT
Definition: glext.h:3114
#define GL_BGRA_EXT
Definition: glext.h:3115
#define INSIDE_BEGIN_END(CTX)
Definition: macros.h:135
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_color_pixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
Definition: readpix.c:611
static void read_depth_pixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum type, GLvoid *pixels)
Definition: readpix.c:233
static void read_stencil_pixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, GLenum type, GLvoid *pixels)
Definition: readpix.c:391

Referenced by init_dlist_pointers(), and init_exec_pointers().