ReactOS  0.4.15-dev-499-g1f31905
points.h File Reference
#include "types.h"
Include dependency graph for points.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void gl_PointSize (GLcontext *ctx, GLfloat size)
 
void gl_set_point_function (GLcontext *ctx)
 

Function Documentation

◆ gl_PointSize()

void gl_PointSize ( GLcontext ctx,
GLfloat  size 
)

Definition at line 91 of file points.c.

92 {
93  if (size<=0.0) {
94  gl_error( ctx, GL_INVALID_VALUE, "glPointSize" );
95  return;
96  }
97  if (INSIDE_BEGIN_END(ctx)) {
98  gl_error( ctx, GL_INVALID_OPERATION, "glPointSize" );
99  return;
100  }
101  ctx->Point.Size = size;
102  ctx->NewState |= NEW_RASTER_OPS;
103 }
GLuint NewState
Definition: types.h:1355
struct gl_point_attrib Point
Definition: types.h:1329
#define INSIDE_BEGIN_END(CTX)
Definition: macros.h:135
GLsizeiptr size
Definition: glext.h:5919
#define GL_INVALID_VALUE
Definition: gl.h:695
#define GL_INVALID_OPERATION
Definition: gl.h:696
#define NEW_RASTER_OPS
Definition: types.h:1233
void gl_error(GLcontext *ctx, GLenum error, const char *s)
Definition: context.c:1421

Referenced by execute_list(), and init_exec_pointers().

◆ gl_set_point_function()

void gl_set_point_function ( GLcontext ctx)

Definition at line 541 of file points.c.

542 {
543  GLboolean rgbmode = ctx->Visual->RGBAflag;
544 
545  if (ctx->RenderMode==GL_RENDER) {
546  if (ctx->NoRaster) {
547  ctx->Driver.PointsFunc = null_points;
548  return;
549  }
550  if (ctx->Driver.PointsFunc) {
551  /* Device driver will draw points. */
552  ctx->Driver.PointsFunc = ctx->Driver.PointsFunc;
553  }
554  else {
555  if (ctx->Point.SmoothFlag && rgbmode) {
556  ctx->Driver.PointsFunc = antialiased_rgba_points;
557  }
558  else if (ctx->Texture.Enabled) {
559  ctx->Driver.PointsFunc = textured_rgba_points;
560  }
561  else if (ctx->Point.Size==1.0) {
562  /* size=1, any raster ops */
563  if (rgbmode)
564  ctx->Driver.PointsFunc = size1_rgba_points;
565  else
566  ctx->Driver.PointsFunc = size1_ci_points;
567  }
568  else {
569  /* every other kind of point rendering */
570  if (rgbmode)
571  ctx->Driver.PointsFunc = general_rgba_points;
572  else
573  ctx->Driver.PointsFunc = general_ci_points;
574  }
575  }
576  }
577  else if (ctx->RenderMode==GL_FEEDBACK) {
578  ctx->Driver.PointsFunc = feedback_points;
579  }
580  else {
581  /* GL_SELECT mode */
582  ctx->Driver.PointsFunc = select_points;
583  }
584 
585 }
GLboolean RGBAflag
Definition: types.h:1137
struct gl_point_attrib Point
Definition: types.h:1329
static void general_ci_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:257
GLvisual * Visual
Definition: types.h:1272
static void textured_rgba_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:363
static void feedback_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:127
struct dd_function_table Driver
Definition: types.h:1276
void size1_ci_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:195
unsigned char GLboolean
Definition: gl.h:151
static void select_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:179
GLenum RenderMode
Definition: types.h:1356
struct gl_texture_attrib Texture
Definition: types.h:1334
GLboolean NoRaster
Definition: types.h:1404
static void null_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:531
#define GL_FEEDBACK
Definition: gl.h:387
#define GL_RENDER
Definition: gl.h:388
static void general_rgba_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:307
static void size1_rgba_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:226
static void antialiased_rgba_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:430

Referenced by gl_update_state().