ReactOS 0.4.15-dev-8092-ge0ba2f3
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}
void gl_error(GLcontext *ctx, GLenum error, const char *s)
Definition: context.c:1421
#define NEW_RASTER_OPS
Definition: types.h:1233
#define GL_INVALID_VALUE
Definition: gl.h:695
#define GL_INVALID_OPERATION
Definition: gl.h:696
GLsizeiptr size
Definition: glext.h:5919
#define INSIDE_BEGIN_END(CTX)
Definition: macros.h:135

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}
#define GL_RENDER
Definition: gl.h:388
#define GL_FEEDBACK
Definition: gl.h:387
unsigned char GLboolean
Definition: gl.h:151
static void general_rgba_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:307
static void select_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:179
static void general_ci_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:257
static void antialiased_rgba_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:430
static void feedback_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:127
void size1_ci_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:195
static void null_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:531
static void size1_rgba_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:226
static void textured_rgba_points(GLcontext *ctx, GLuint first, GLuint last)
Definition: points.c:363

Referenced by gl_update_state().