ReactOS 0.4.16-dev-306-g647d351
quads.c File Reference
#include "types.h"
#include "quads.h"
Include dependency graph for quads.c:

Go to the source code of this file.

Functions

static void quad (GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLuint pv)
 
static void null_quad (GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLuint pv)
 
void gl_set_quad_function (GLcontext *ctx)
 

Function Documentation

◆ gl_set_quad_function()

void gl_set_quad_function ( GLcontext ctx)

Definition at line 82 of file quads.c.

83{
84 if (ctx->RenderMode==GL_RENDER) {
85 if (ctx->NoRaster) {
86 ctx->Driver.QuadFunc = null_quad;
87 }
88 else if (ctx->Driver.QuadFunc) {
89 /* Device driver will draw quads. */
90 }
91 else {
92 ctx->Driver.QuadFunc = quad;
93 }
94 }
95 else {
96 /* if in feedback or selection mode we can fall back to triangle code */
97 ctx->Driver.QuadFunc = quad;
98 }
99}
#define GL_RENDER
Definition: gl.h:388
static void quad(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLuint pv)
Definition: quads.c:63
static void null_quad(GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3, GLuint pv)
Definition: quads.c:75

Referenced by gl_update_state().

◆ null_quad()

static void null_quad ( GLcontext ctx,
GLuint  v0,
GLuint  v1,
GLuint  v2,
GLuint  v3,
GLuint  pv 
)
static

Definition at line 75 of file quads.c.

77{
78}

Referenced by gl_set_quad_function().

◆ quad()

static void quad ( GLcontext ctx,
GLuint  v0,
GLuint  v1,
GLuint  v2,
GLuint  v3,
GLuint  pv 
)
static

Definition at line 63 of file quads.c.

65{
66 (*ctx->Driver.TriangleFunc)( ctx, v0, v1, v3, pv );
67 (*ctx->Driver.TriangleFunc)( ctx, v1, v2, v3, pv );
68}
GLfloat v0
Definition: glext.h:6061
GLfloat GLfloat GLfloat GLfloat v3
Definition: glext.h:6064
GLfloat GLfloat v1
Definition: glext.h:6062
GLfloat GLfloat GLfloat v2
Definition: glext.h:6063

Referenced by gl_set_quad_function(), ATL::CImage::RGBFromPaletteIndex(), and Slicer::slice_old().