ReactOS 0.4.15-dev-7654-g6bc40d3
vbfill.c File Reference
#include <assert.h>
#include "context.h"
#include "light.h"
#include "clip.h"
#include "dlist.h"
#include "feedback.h"
#include "macros.h"
#include "matrix.h"
#include "mmath.h"
#include "pb.h"
#include "types.h"
#include "vb.h"
#include "vbfill.h"
#include "vbxform.h"
#include "xform.h"
Include dependency graph for vbfill.c:

Go to the source code of this file.

Macros

#define FLOAT_COLOR_TO_UBYTE_COLOR(b, f)    b = FloatToInt(CLAMP(f, 0.0F, 1.0F) * 255.0F)
 

Functions

void gl_Normal3f (GLcontext *ctx, GLfloat nx, GLfloat ny, GLfloat nz)
 
void gl_Normal3fv (GLcontext *ctx, const GLfloat *n)
 
void gl_Indexf (GLcontext *ctx, GLfloat c)
 
void gl_Indexi (GLcontext *ctx, GLint c)
 
void gl_Color3f (GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue)
 
void gl_Color3f8bit (GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue)
 
void gl_Color3fv (GLcontext *ctx, const GLfloat *c)
 
void gl_Color3fv8bit (GLcontext *ctx, const GLfloat *c)
 
void gl_Color4f (GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
 
void gl_Color4f8bit (GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
 
void gl_Color4fv (GLcontext *ctx, const GLfloat *c)
 
void gl_Color4fv8bit (GLcontext *ctx, const GLfloat *c)
 
void gl_Color4ub (GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
 
void gl_Color4ub8bit (GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
 
void gl_Color4ubv (GLcontext *ctx, const GLubyte *c)
 
void gl_Color4ubv8bit (GLcontext *ctx, const GLubyte *c)
 
void gl_ColorMat3f (GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue)
 
void gl_ColorMat3fv (GLcontext *ctx, const GLfloat *c)
 
void gl_ColorMat4f (GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
 
void gl_ColorMat4fv (GLcontext *ctx, const GLfloat *c)
 
void gl_ColorMat4ub (GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
 
void gl_ColorMat4ubv (GLcontext *ctx, const GLubyte *c)
 
void gl_EdgeFlag (GLcontext *ctx, GLboolean flag)
 
static void vertex4f_feedback (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 
static void vertex3f_feedback (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
 
static void vertex2f_feedback (GLcontext *ctx, GLfloat x, GLfloat y)
 
static void vertex3fv_feedback (GLcontext *ctx, const GLfloat v[3])
 
static void vertex4 (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 
static void vertex3f_normal_color_tex2 (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
 
static void vertex3f_normal_color_tex4 (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
 
static void vertex3f_normal (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
 
static void vertex3f_color_tex2 (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
 
static void vertex3f_color_tex4 (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
 
static void vertex3f_color (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
 
static void vertex3f_index (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
 
static void vertex2f_normal_color_tex2 (GLcontext *ctx, GLfloat x, GLfloat y)
 
static void vertex2f_normal_color_tex4 (GLcontext *ctx, GLfloat x, GLfloat y)
 
static void vertex2f_normal (GLcontext *ctx, GLfloat x, GLfloat y)
 
static void vertex2f_color_tex2 (GLcontext *ctx, GLfloat x, GLfloat y)
 
static void vertex2f_color_tex4 (GLcontext *ctx, GLfloat x, GLfloat y)
 
static void vertex2f_color (GLcontext *ctx, GLfloat x, GLfloat y)
 
static void vertex2f_index (GLcontext *ctx, GLfloat x, GLfloat y)
 
static void vertex3fv_normal_color_tex2 (GLcontext *ctx, const GLfloat v[3])
 
static void vertex3fv_normal_color_tex4 (GLcontext *ctx, const GLfloat v[3])
 
static void vertex3fv_normal (GLcontext *ctx, const GLfloat v[3])
 
static void vertex3fv_color_tex2 (GLcontext *ctx, const GLfloat v[3])
 
static void vertex3fv_color_tex4 (GLcontext *ctx, const GLfloat v[3])
 
static void vertex3fv_color (GLcontext *ctx, const GLfloat v[3])
 
static void vertex3fv_index (GLcontext *ctx, const GLfloat v[3])
 
void gl_vertex4f_nop (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 
void gl_vertex3f_nop (GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
 
void gl_vertex2f_nop (GLcontext *ctx, GLfloat x, GLfloat y)
 
void gl_vertex3fv_nop (GLcontext *ctx, const GLfloat v[3])
 
void gl_TexCoord2f (GLcontext *ctx, GLfloat s, GLfloat t)
 
void gl_TexCoord2f4 (GLcontext *ctx, GLfloat s, GLfloat t)
 
void gl_TexCoord4f (GLcontext *ctx, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
 
void gl_set_vertex_function (GLcontext *ctx)
 
void gl_set_color_function (GLcontext *ctx)
 
void gl_eval_vertex (GLcontext *ctx, const GLfloat vertex[4], const GLfloat normal[3], const GLubyte color[4], GLuint index, const GLfloat texcoord[4])
 
void gl_Begin (GLcontext *ctx, GLenum p)
 
void gl_End (GLcontext *ctx)
 

Macro Definition Documentation

◆ FLOAT_COLOR_TO_UBYTE_COLOR

#define FLOAT_COLOR_TO_UBYTE_COLOR (   b,
  f 
)     b = FloatToInt(CLAMP(f, 0.0F, 1.0F) * 255.0F)

Definition at line 205 of file vbfill.c.

Function Documentation

◆ gl_Begin()

void gl_Begin ( GLcontext ctx,
GLenum  p 
)

Definition at line 1341 of file vbfill.c.

1342{
1343 struct vertex_buffer *VB = ctx->VB;
1344 struct pixel_buffer *PB = ctx->PB;
1345#ifdef PROFILE
1346 begin_time = gl_time();
1347#endif
1348
1349 if (INSIDE_BEGIN_END(ctx)) {
1350 gl_error( ctx, GL_INVALID_OPERATION, "glBegin" );
1351 return;
1352 }
1353 if (ctx->NewModelViewMatrix) {
1355 }
1356 if (ctx->NewProjectionMatrix) {
1358 }
1359 if (ctx->NewState) {
1361 }
1362 else if (ctx->Exec.Vertex3f==gl_vertex3f_nop) {
1364 }
1365
1366 if (ctx->Driver.Begin) {
1367 (*ctx->Driver.Begin)( ctx, p );
1368 }
1369
1370 ctx->Primitive = p;
1371 VB->Start = VB->Count = 0;
1372
1373 VB->MonoColor = ctx->MonoPixels;
1374 VB->MonoNormal = GL_TRUE;
1375 if (VB->MonoColor) {
1376 /* All pixels generated are likely to be the same color so have
1377 * the device driver set the "monocolor" now.
1378 */
1379 if (ctx->Visual->RGBAflag) {
1380 GLubyte r = ctx->Current.ByteColor[0];
1381 GLubyte g = ctx->Current.ByteColor[1];
1382 GLubyte b = ctx->Current.ByteColor[2];
1383 GLubyte a = ctx->Current.ByteColor[3];
1384 (*ctx->Driver.Color)( ctx, r, g, b, a );
1385 }
1386 else {
1387 (*ctx->Driver.Index)( ctx, ctx->Current.Index );
1388 }
1389 }
1390
1391 /* By default use front color/index. Two-sided lighting may override. */
1392 VB->Color = VB->Fcolor;
1393 VB->Index = VB->Findex;
1394
1395 switch (ctx->Primitive) {
1396 case GL_POINTS:
1397 ctx->LightTwoSide = GL_FALSE;
1398 PB_INIT( PB, GL_POINT );
1399 break;
1400 case GL_LINES:
1401 case GL_LINE_STRIP:
1402 case GL_LINE_LOOP:
1403 ctx->LightTwoSide = GL_FALSE;
1404 ctx->StippleCounter = 0;
1405 PB_INIT( PB, GL_LINE );
1406 break;
1407 case GL_TRIANGLES:
1408 case GL_TRIANGLE_STRIP:
1409 case GL_TRIANGLE_FAN:
1410 case GL_QUADS:
1411 case GL_QUAD_STRIP:
1412 case GL_POLYGON:
1413 ctx->LightTwoSide = ctx->Light.Enabled && ctx->Light.Model.TwoSide;
1414 PB_INIT( PB, GL_POLYGON );
1415 break;
1416 default:
1417 gl_error( ctx, GL_INVALID_ENUM, "glBegin" );
1418 ctx->Primitive = GL_BITMAP;
1419 }
1420}
void gl_error(GLcontext *ctx, GLenum error, const char *s)
Definition: context.c:1421
void gl_update_state(GLcontext *ctx)
Definition: context.c:1749
void gl_analyze_modelview_matrix(GLcontext *ctx)
Definition: matrix.c:420
void gl_analyze_projection_matrix(GLcontext *ctx)
Definition: matrix.c:455
#define PB
unsigned char GLubyte
Definition: gl.h:157
#define GL_TRUE
Definition: gl.h:174
#define GL_POINT
Definition: gl.h:265
#define GL_QUADS
Definition: gl.h:197
#define GL_TRIANGLE_FAN
Definition: gl.h:196
#define GL_LINE_STRIP
Definition: gl.h:193
#define GL_LINES
Definition: gl.h:191
#define GL_INVALID_OPERATION
Definition: gl.h:696
#define GL_TRIANGLES
Definition: gl.h:194
#define GL_BITMAP
Definition: gl.h:497
#define GL_POINTS
Definition: gl.h:190
#define GL_LINE
Definition: gl.h:266
#define GL_FALSE
Definition: gl.h:173
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define GL_POLYGON
Definition: gl.h:199
#define GL_LINE_LOOP
Definition: gl.h:192
#define GL_TRIANGLE_STRIP
Definition: gl.h:195
#define GL_INVALID_ENUM
Definition: gl.h:694
#define GL_QUAD_STRIP
Definition: gl.h:198
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean g
Definition: glext.h:6204
GLfloat GLfloat p
Definition: glext.h:8902
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
#define INSIDE_BEGIN_END(CTX)
Definition: macros.h:135
#define PB_INIT(PB, PRIM)
Definition: pb.h:79
struct vertex_buffer * VB
Definition: tritemp.h:139
void gl_vertex3f_nop(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
Definition: vbfill.c:1084
void gl_set_vertex_function(GLcontext *ctx)
Definition: vbfill.c:1154

Referenced by execute_list(), gl_DrawArrays(), gl_DrawElements(), gl_EvalMesh1(), gl_EvalMesh2(), gl_Rectf(), and init_exec_pointers().

◆ gl_Color3f()

void gl_Color3f ( GLcontext ctx,
GLfloat  red,
GLfloat  green,
GLfloat  blue 
)

Definition at line 216 of file vbfill.c.

217{
218 ctx->Current.ByteColor[0] = FloatToInt(CLAMP(red , 0.0F, 1.0F) * ctx->Visual->RedScale);
219 ctx->Current.ByteColor[1] = FloatToInt(CLAMP(green, 0.0F, 1.0F) * ctx->Visual->GreenScale);
220 ctx->Current.ByteColor[2] = FloatToInt(CLAMP(blue , 0.0F, 1.0F) * ctx->Visual->BlueScale);
221 ctx->Current.ByteColor[3] = FloatToInt(ctx->Visual->AlphaScale);
222 ASSERT( !ctx->Light.ColorMaterialEnabled );
223 ctx->VB->MonoColor = GL_FALSE;
224}
GLclampf green
Definition: gl.h:1740
GLclampf GLclampf blue
Definition: gl.h:1740
#define red
Definition: linetest.c:67
#define FloatToInt(F)
Definition: mmath.h:56
#define ASSERT(a)
Definition: mode.c:44
#define CLAMP(f, min, max)
Definition: tif_color.c:177

Referenced by gl_set_color_function(), and init_exec_pointers().

◆ gl_Color3f8bit()

void gl_Color3f8bit ( GLcontext ctx,
GLfloat  red,
GLfloat  green,
GLfloat  blue 
)

Definition at line 231 of file vbfill.c.

232{
233 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[0], red);
234 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[1], green);
235 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[2], blue);
236 ctx->Current.ByteColor[3] = 255;
237 ASSERT( !ctx->Light.ColorMaterialEnabled );
238 ctx->VB->MonoColor = GL_FALSE;
239}
#define FLOAT_COLOR_TO_UBYTE_COLOR(b, f)
Definition: vbfill.c:205

Referenced by gl_set_color_function().

◆ gl_Color3fv()

void gl_Color3fv ( GLcontext ctx,
const GLfloat c 
)

Definition at line 246 of file vbfill.c.

247{
248 ctx->Current.ByteColor[0] = FloatToInt(CLAMP(c[0], 0.0F, 1.0F) * ctx->Visual->RedScale);
249 ctx->Current.ByteColor[1] = FloatToInt(CLAMP(c[1], 0.0F, 1.0F) * ctx->Visual->GreenScale);
250 ctx->Current.ByteColor[2] = FloatToInt(CLAMP(c[2], 0.0F, 1.0F) * ctx->Visual->BlueScale);
251 ctx->Current.ByteColor[3] = FloatToInt(ctx->Visual->AlphaScale);
252 ASSERT( !ctx->Light.ColorMaterialEnabled );
253 ctx->VB->MonoColor = GL_FALSE;
254}
const GLubyte * c
Definition: glext.h:8905

Referenced by gl_set_color_function(), and init_exec_pointers().

◆ gl_Color3fv8bit()

void gl_Color3fv8bit ( GLcontext ctx,
const GLfloat c 
)

Definition at line 261 of file vbfill.c.

262{
263 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[0], c[0]);
264 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[1], c[1]);
265 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[2], c[2]);
266 ctx->Current.ByteColor[3] = 255;
267 ASSERT( !ctx->Light.ColorMaterialEnabled );
268 ctx->VB->MonoColor = GL_FALSE;
269}

Referenced by gl_set_color_function().

◆ gl_Color4f()

void gl_Color4f ( GLcontext ctx,
GLfloat  red,
GLfloat  green,
GLfloat  blue,
GLfloat  alpha 
)

Definition at line 277 of file vbfill.c.

279{
280 ctx->Current.ByteColor[0] = FloatToInt(CLAMP(red , 0.0F, 1.0F) * ctx->Visual->RedScale);
281 ctx->Current.ByteColor[1] = FloatToInt(CLAMP(green, 0.0F, 1.0F) * ctx->Visual->GreenScale);
282 ctx->Current.ByteColor[2] = FloatToInt(CLAMP(blue , 0.0F, 1.0F) * ctx->Visual->BlueScale);
283 ctx->Current.ByteColor[3] = FloatToInt(CLAMP(alpha, 0.0F, 1.0F) * ctx->Visual->AlphaScale);
284 ASSERT( !ctx->Light.ColorMaterialEnabled );
285 ctx->VB->MonoColor = GL_FALSE;
286}
GLclampf GLclampf GLclampf alpha
Definition: gl.h:1740

Referenced by gl_set_color_function(), and init_exec_pointers().

◆ gl_Color4f8bit()

void gl_Color4f8bit ( GLcontext ctx,
GLfloat  red,
GLfloat  green,
GLfloat  blue,
GLfloat  alpha 
)

Definition at line 293 of file vbfill.c.

295{
296 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[0], red);
297 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[1], green);
298 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[2], blue);
299 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[3], alpha);
300 ASSERT( !ctx->Light.ColorMaterialEnabled );
301 ctx->VB->MonoColor = GL_FALSE;
302}

Referenced by gl_set_color_function().

◆ gl_Color4fv()

void gl_Color4fv ( GLcontext ctx,
const GLfloat c 
)

Definition at line 309 of file vbfill.c.

310{
311 ctx->Current.ByteColor[0] = FloatToInt(CLAMP(c[0], 0.0F, 1.0F) * ctx->Visual->RedScale);
312 ctx->Current.ByteColor[1] = FloatToInt(CLAMP(c[1], 0.0F, 1.0F) * ctx->Visual->GreenScale);
313 ctx->Current.ByteColor[2] = FloatToInt(CLAMP(c[2], 0.0F, 1.0F) * ctx->Visual->BlueScale);
314 ctx->Current.ByteColor[3] = FloatToInt(CLAMP(c[3], 0.0F, 1.0F) * ctx->Visual->AlphaScale);
315 ASSERT( !ctx->Light.ColorMaterialEnabled );
316 ctx->VB->MonoColor = GL_FALSE;
317}

Referenced by gl_set_color_function(), and init_exec_pointers().

◆ gl_Color4fv8bit()

void gl_Color4fv8bit ( GLcontext ctx,
const GLfloat c 
)

Definition at line 324 of file vbfill.c.

325{
326 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[0], c[0]);
327 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[1], c[1]);
328 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[2], c[2]);
329 FLOAT_COLOR_TO_UBYTE_COLOR(ctx->Current.ByteColor[3], c[3]);
330 ASSERT( !ctx->Light.ColorMaterialEnabled );
331 ctx->VB->MonoColor = GL_FALSE;
332}

Referenced by gl_set_color_function().

◆ gl_Color4ub()

void gl_Color4ub ( GLcontext ctx,
GLubyte  red,
GLubyte  green,
GLubyte  blue,
GLubyte  alpha 
)

Definition at line 339 of file vbfill.c.

341{
342 ctx->Current.ByteColor[0] = red * ctx->Visual->RedScale * (1.0F/255.0F);
343 ctx->Current.ByteColor[1] = green * ctx->Visual->GreenScale * (1.0F/255.0F);
344 ctx->Current.ByteColor[2] = blue * ctx->Visual->BlueScale * (1.0F/255.0F);
345 ctx->Current.ByteColor[3] = alpha * ctx->Visual->AlphaScale * (1.0F/255.0F);
346 ASSERT( !ctx->Light.ColorMaterialEnabled );
347 ctx->VB->MonoColor = GL_FALSE;
348}

Referenced by gl_set_color_function(), and init_exec_pointers().

◆ gl_Color4ub8bit()

void gl_Color4ub8bit ( GLcontext ctx,
GLubyte  red,
GLubyte  green,
GLubyte  blue,
GLubyte  alpha 
)

Definition at line 355 of file vbfill.c.

357{
358 ASSIGN_4V( ctx->Current.ByteColor, red, green, blue, alpha );
359 ASSERT( !ctx->Light.ColorMaterialEnabled );
360 ctx->VB->MonoColor = GL_FALSE;
361}
#define ASSIGN_4V(V, V0, V1, V2, V3)
Definition: macros.h:128

Referenced by gl_set_color_function().

◆ gl_Color4ubv()

void gl_Color4ubv ( GLcontext ctx,
const GLubyte c 
)

Definition at line 368 of file vbfill.c.

369{
370 ctx->Current.ByteColor[0] = c[0] * ctx->Visual->RedScale * (1.0F/255.0F);
371 ctx->Current.ByteColor[1] = c[1] * ctx->Visual->GreenScale * (1.0F/255.0F);
372 ctx->Current.ByteColor[2] = c[2] * ctx->Visual->BlueScale * (1.0F/255.0F);
373 ctx->Current.ByteColor[3] = c[3] * ctx->Visual->AlphaScale * (1.0F/255.0F);
374 ASSERT( !ctx->Light.ColorMaterialEnabled );
375 ctx->VB->MonoColor = GL_FALSE;
376}

Referenced by gl_set_color_function(), and init_exec_pointers().

◆ gl_Color4ubv8bit()

void gl_Color4ubv8bit ( GLcontext ctx,
const GLubyte c 
)

Definition at line 384 of file vbfill.c.

385{
386 COPY_4UBV( ctx->Current.ByteColor, c );
387 ASSERT( !ctx->Light.ColorMaterialEnabled );
388 ctx->VB->MonoColor = GL_FALSE;
389}
#define COPY_4UBV(DST, SRC)
Definition: macros.h:110

Referenced by gl_set_color_function().

◆ gl_ColorMat3f()

void gl_ColorMat3f ( GLcontext ctx,
GLfloat  red,
GLfloat  green,
GLfloat  blue 
)

Definition at line 396 of file vbfill.c.

397{
398 GLfloat color[4];
399 ctx->Current.ByteColor[0] = FloatToInt(CLAMP(red , 0.0F, 1.0F) * ctx->Visual->RedScale);
400 ctx->Current.ByteColor[1] = FloatToInt(CLAMP(green, 0.0F, 1.0F) * ctx->Visual->GreenScale);
401 ctx->Current.ByteColor[2] = FloatToInt(CLAMP(blue , 0.0F, 1.0F) * ctx->Visual->BlueScale);
402 ctx->Current.ByteColor[3] = FloatToInt(ctx->Visual->AlphaScale);
403 /* update material */
404 ASSERT( ctx->Light.ColorMaterialEnabled );
405 ASSIGN_4V( color, red, green, blue, 1.0F );
406 gl_set_material( ctx, ctx->Light.ColorMaterialBitmask, color );
407 ctx->VB->MonoColor = GL_FALSE;
408}
float GLfloat
Definition: gl.h:161
GLuint color
Definition: glext.h:6243
void gl_set_material(GLcontext *ctx, GLuint bitmask, const GLfloat *params)
Definition: light.c:413

Referenced by gl_set_color_function().

◆ gl_ColorMat3fv()

void gl_ColorMat3fv ( GLcontext ctx,
const GLfloat c 
)

Definition at line 415 of file vbfill.c.

416{
417 GLfloat color[4];
418 ctx->Current.ByteColor[0] = FloatToInt(CLAMP(c[0], 0.0F, 1.0F) * ctx->Visual->RedScale);
419 ctx->Current.ByteColor[1] = FloatToInt(CLAMP(c[1], 0.0F, 1.0F) * ctx->Visual->GreenScale);
420 ctx->Current.ByteColor[2] = FloatToInt(CLAMP(c[2], 0.0F, 1.0F) * ctx->Visual->BlueScale);
421 ctx->Current.ByteColor[3] = FloatToInt(ctx->Visual->AlphaScale);
422 /* update material */
423 ASSERT( ctx->Light.ColorMaterialEnabled );
424 ASSIGN_4V( color, c[0], c[1], c[2], 1.0F );
425 gl_set_material( ctx, ctx->Light.ColorMaterialBitmask, color );
426 ctx->VB->MonoColor = GL_FALSE;
427}

Referenced by gl_set_color_function().

◆ gl_ColorMat4f()

void gl_ColorMat4f ( GLcontext ctx,
GLfloat  red,
GLfloat  green,
GLfloat  blue,
GLfloat  alpha 
)

Definition at line 434 of file vbfill.c.

436{
437 GLfloat color[4];
438 ctx->Current.ByteColor[0] = FloatToInt(CLAMP(red , 0.0F, 1.0F) * ctx->Visual->RedScale);
439 ctx->Current.ByteColor[1] = FloatToInt(CLAMP(green, 0.0F, 1.0F) * ctx->Visual->GreenScale);
440 ctx->Current.ByteColor[2] = FloatToInt(CLAMP(blue , 0.0F, 1.0F) * ctx->Visual->BlueScale);
441 ctx->Current.ByteColor[3] = FloatToInt(CLAMP(alpha, 0.0F, 1.0F) * ctx->Visual->AlphaScale);
442 /* update material */
443 ASSERT( ctx->Light.ColorMaterialEnabled );
445 gl_set_material( ctx, ctx->Light.ColorMaterialBitmask, color );
446 ctx->VB->MonoColor = GL_FALSE;
447}

Referenced by gl_set_color_function().

◆ gl_ColorMat4fv()

void gl_ColorMat4fv ( GLcontext ctx,
const GLfloat c 
)

Definition at line 454 of file vbfill.c.

455{
456 GLfloat color[4];
457 ctx->Current.ByteColor[0] = FloatToInt(CLAMP(c[0], 0.0F, 1.0F) * ctx->Visual->RedScale);
458 ctx->Current.ByteColor[1] = FloatToInt(CLAMP(c[1], 0.0F, 1.0F) * ctx->Visual->GreenScale);
459 ctx->Current.ByteColor[2] = FloatToInt(CLAMP(c[2], 0.0F, 1.0F) * ctx->Visual->BlueScale);
460 ctx->Current.ByteColor[3] = FloatToInt(CLAMP(c[3], 0.0F, 1.0F) * ctx->Visual->AlphaScale);
461 /* update material */
462 ASSERT( ctx->Light.ColorMaterialEnabled );
463 ASSIGN_4V( color, c[0], c[1], c[2], c[3] );
464 gl_set_material( ctx, ctx->Light.ColorMaterialBitmask, color );
465 ctx->VB->MonoColor = GL_FALSE;
466}

Referenced by gl_set_color_function().

◆ gl_ColorMat4ub()

void gl_ColorMat4ub ( GLcontext ctx,
GLubyte  red,
GLubyte  green,
GLubyte  blue,
GLubyte  alpha 
)

Definition at line 473 of file vbfill.c.

475{
476 GLfloat color[4];
477 if (ctx->Visual->EightBitColor) {
478 ASSIGN_4V( ctx->Current.ByteColor, red, green, blue, alpha );
479 }
480 else {
481 ctx->Current.ByteColor[0] = red * ctx->Visual->RedScale * (1.0F/255.0F);
482 ctx->Current.ByteColor[1] = green * ctx->Visual->GreenScale * (1.0F/255.0F);
483 ctx->Current.ByteColor[2] = blue * ctx->Visual->BlueScale * (1.0F/255.0F);
484 ctx->Current.ByteColor[3] = alpha * ctx->Visual->AlphaScale * (1.0F/255.0F);
485 }
486 /* update material */
487 ASSERT( ctx->Light.ColorMaterialEnabled );
488 color[0] = red * (1.0F/255.0F);
489 color[1] = green * (1.0F/255.0F);
490 color[2] = blue * (1.0F/255.0F);
491 color[3] = alpha * (1.0F/255.0F);
492 gl_set_material( ctx, ctx->Light.ColorMaterialBitmask, color );
493 ctx->VB->MonoColor = GL_FALSE;
494}

Referenced by gl_ColorMat4ubv(), and gl_set_color_function().

◆ gl_ColorMat4ubv()

void gl_ColorMat4ubv ( GLcontext ctx,
const GLubyte c 
)

Definition at line 501 of file vbfill.c.

502{
503 gl_ColorMat4ub( ctx, c[0], c[1], c[2], c[3] );
504}
void gl_ColorMat4ub(GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
Definition: vbfill.c:473

Referenced by gl_set_color_function().

◆ gl_EdgeFlag()

void gl_EdgeFlag ( GLcontext ctx,
GLboolean  flag 
)

Definition at line 515 of file vbfill.c.

516{
517 ctx->Current.EdgeFlag = flag;
518}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52

Referenced by init_exec_pointers().

◆ gl_End()

void gl_End ( GLcontext ctx)

Definition at line 1424 of file vbfill.c.

1425{
1426 struct pixel_buffer *PB = ctx->PB;
1427 struct vertex_buffer *VB = ctx->VB;
1428
1429 if (ctx->Primitive==GL_BITMAP) {
1430 /* glEnd without glBegin */
1431 gl_error( ctx, GL_INVALID_OPERATION, "glEnd" );
1432 return;
1433 }
1434
1435 if (VB->Count > VB->Start) {
1437 }
1438 if (PB->count>0) {
1440 }
1441
1442 if (ctx->Driver.End) {
1443 (*ctx->Driver.End)(ctx);
1444 }
1445
1446 PB->primitive = ctx->Primitive = GL_BITMAP; /* Default mode */
1447
1448#ifdef PROFILE
1449 ctx->BeginEndTime += gl_time() - begin_time;
1450 ctx->BeginEndCount++;
1451#endif
1452}
void gl_flush_pb(GLcontext *ctx)
Definition: pb.c:136
void gl_transform_vb_part1(GLcontext *ctx, GLboolean allDone)
Definition: vbxform.c:1120

Referenced by execute_list(), gl_DrawArrays(), gl_DrawElements(), gl_EvalMesh1(), gl_EvalMesh2(), gl_Rectf(), and init_exec_pointers().

◆ gl_eval_vertex()

void gl_eval_vertex ( GLcontext ctx,
const GLfloat  vertex[4],
const GLfloat  normal[3],
const GLubyte  color[4],
GLuint  index,
const GLfloat  texcoord[4] 
)

Definition at line 1290 of file vbfill.c.

1295{
1296 struct vertex_buffer *VB = ctx->VB;
1297 GLuint count = VB->Count; /* copy to local var to encourage optimization */
1298
1299 VB->VertexSizeMask = VERTEX4_BIT;
1300 VB->MonoNormal = GL_FALSE;
1301 COPY_4V( VB->Obj[count], vertex );
1302 COPY_3V( VB->Normal[count], normal );
1303 COPY_4UBV( VB->Fcolor[count], color );
1304
1305#ifdef GL_VERSION_1_1
1306 if (ctx->Light.ColorMaterialEnabled
1307 && (ctx->Eval.Map1Color4 || ctx->Eval.Map2Color4)) {
1308 GLfloat fcolor[4];
1309 fcolor[0] = color[0] * ctx->Visual->InvRedScale;
1310 fcolor[1] = color[1] * ctx->Visual->InvGreenScale;
1311 fcolor[2] = color[2] * ctx->Visual->InvBlueScale;
1312 fcolor[3] = color[3] * ctx->Visual->InvAlphaScale;
1313 gl_set_material( ctx, ctx->Light.ColorMaterialBitmask, fcolor );
1314 }
1315#endif
1316 VB->Findex[count] = index;
1317 COPY_4V( VB->TexCoord[count], texcoord );
1318 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
1319
1320 count++;
1321 VB->Count = count;
1322 if (count==VB_MAX) {
1324 }
1325}
#define index(s, c)
Definition: various.h:29
unsigned int GLuint
Definition: gl.h:159
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define COPY_3V(DST, SRC)
Definition: macros.h:98
#define COPY_4V(DST, SRC)
Definition: macros.h:102
@ normal
Definition: optimize.h:166
Definition: mesh.c:4558
#define VERTEX4_BIT
Definition: vb.h:95
#define VB_MAX
Definition: vb.h:86

Referenced by gl_EvalCoord1f(), and gl_EvalCoord2f().

◆ gl_Indexf()

void gl_Indexf ( GLcontext ctx,
GLfloat  c 
)

Definition at line 159 of file vbfill.c.

160{
161 ctx->Current.Index = (GLuint) (GLint) c;
162 ctx->VB->MonoColor = GL_FALSE;
163}
int GLint
Definition: gl.h:156
#define c
Definition: ke_i.h:80

Referenced by init_exec_pointers().

◆ gl_Indexi()

void gl_Indexi ( GLcontext ctx,
GLint  c 
)

Definition at line 169 of file vbfill.c.

170{
171 ctx->Current.Index = (GLuint) c;
172 ctx->VB->MonoColor = GL_FALSE;
173}

Referenced by init_exec_pointers().

◆ gl_Normal3f()

void gl_Normal3f ( GLcontext ctx,
GLfloat  nx,
GLfloat  ny,
GLfloat  nz 
)

Definition at line 130 of file vbfill.c.

131{
132 ctx->Current.Normal[0] = nx;
133 ctx->Current.Normal[1] = ny;
134 ctx->Current.Normal[2] = nz;
135 ctx->VB->MonoNormal = GL_FALSE;
136}
#define nz(x)
GLfloat ny
Definition: glext.h:8896
GLfloat GLfloat GLfloat GLfloat nx
Definition: glext.h:8898

Referenced by init_exec_pointers().

◆ gl_Normal3fv()

void gl_Normal3fv ( GLcontext ctx,
const GLfloat n 
)

Definition at line 142 of file vbfill.c.

143{
144 ctx->Current.Normal[0] = n[0];
145 ctx->Current.Normal[1] = n[1];
146 ctx->Current.Normal[2] = n[2];
147 ctx->VB->MonoNormal = GL_FALSE;
148}
GLdouble n
Definition: glext.h:7729

Referenced by init_exec_pointers().

◆ gl_set_color_function()

void gl_set_color_function ( GLcontext ctx)

Definition at line 1236 of file vbfill.c.

1237{
1239
1240 if (ctx->Light.ColorMaterialEnabled) {
1241 ctx->Exec.Color3f = gl_ColorMat3f;
1242 ctx->Exec.Color3fv = gl_ColorMat3fv;
1243 ctx->Exec.Color4f = gl_ColorMat4f;
1244 ctx->Exec.Color4fv = gl_ColorMat4fv;
1245 ctx->Exec.Color4ub = gl_ColorMat4ub;
1246 ctx->Exec.Color4ubv = gl_ColorMat4ubv;
1247 }
1248 else if (ctx->Visual->EightBitColor) {
1249 ctx->Exec.Color3f = gl_Color3f8bit;
1250 ctx->Exec.Color3fv = gl_Color3fv8bit;
1251 ctx->Exec.Color4f = gl_Color4f8bit;
1252 ctx->Exec.Color4fv = gl_Color4fv8bit;
1253 ctx->Exec.Color4ub = gl_Color4ub8bit;
1254 ctx->Exec.Color4ubv = gl_Color4ubv8bit;
1255 }
1256 else {
1257 ctx->Exec.Color3f = gl_Color3f;
1258 ctx->Exec.Color3fv = gl_Color3fv;
1259 ctx->Exec.Color4f = gl_Color4f;
1260 ctx->Exec.Color4fv = gl_Color4fv;
1261 ctx->Exec.Color4ub = gl_Color4ub;
1262 ctx->Exec.Color4ubv = gl_Color4ubv;
1263 }
1264 if (!ctx->CompileFlag) {
1265 ctx->API.Color3f = ctx->Exec.Color3f;
1266 ctx->API.Color3fv = ctx->Exec.Color3fv;
1267 ctx->API.Color4f = ctx->Exec.Color4f;
1268 ctx->API.Color4fv = ctx->Exec.Color4fv;
1269 ctx->API.Color4ub = ctx->Exec.Color4ub;
1270 ctx->API.Color4ubv = ctx->Exec.Color4ubv;
1271 }
1272}
void gl_ColorMat4fv(GLcontext *ctx, const GLfloat *c)
Definition: vbfill.c:454
void gl_Color4f(GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
Definition: vbfill.c:277
void gl_ColorMat4ubv(GLcontext *ctx, const GLubyte *c)
Definition: vbfill.c:501
void gl_Color3fv8bit(GLcontext *ctx, const GLfloat *c)
Definition: vbfill.c:261
void gl_Color4fv8bit(GLcontext *ctx, const GLfloat *c)
Definition: vbfill.c:324
void gl_Color4ubv8bit(GLcontext *ctx, const GLubyte *c)
Definition: vbfill.c:384
void gl_ColorMat3fv(GLcontext *ctx, const GLfloat *c)
Definition: vbfill.c:415
void gl_Color4ubv(GLcontext *ctx, const GLubyte *c)
Definition: vbfill.c:368
void gl_ColorMat3f(GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue)
Definition: vbfill.c:396
void gl_Color4ub(GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
Definition: vbfill.c:339
void gl_ColorMat4f(GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
Definition: vbfill.c:434
void gl_Color4f8bit(GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
Definition: vbfill.c:293
void gl_Color4ub8bit(GLcontext *ctx, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
Definition: vbfill.c:355
void gl_Color3fv(GLcontext *ctx, const GLfloat *c)
Definition: vbfill.c:246
void gl_Color4fv(GLcontext *ctx, const GLfloat *c)
Definition: vbfill.c:309
void gl_Color3f8bit(GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue)
Definition: vbfill.c:231
void gl_Color3f(GLcontext *ctx, GLfloat red, GLfloat green, GLfloat blue)
Definition: vbfill.c:216

Referenced by gl_enable(), and gl_update_state().

◆ gl_set_vertex_function()

void gl_set_vertex_function ( GLcontext ctx)

Definition at line 1154 of file vbfill.c.

1155{
1156 if (ctx->RenderMode==GL_FEEDBACK) {
1157 ctx->Exec.Vertex4f = vertex4f_feedback;
1158 ctx->Exec.Vertex3f = vertex3f_feedback;
1159 ctx->Exec.Vertex2f = vertex2f_feedback;
1160 ctx->Exec.Vertex3fv = vertex3fv_feedback;
1161 }
1162 else {
1163 ctx->Exec.Vertex4f = vertex4;
1164 if (ctx->Visual->RGBAflag) {
1165 if (ctx->NeedNormals) {
1166 /* lighting enabled, need normal vectors */
1167 if (ctx->Texture.Enabled) {
1168 if (ctx->VB->TexCoordSize==2) {
1169 ctx->Exec.Vertex2f = vertex2f_normal_color_tex2;
1170 ctx->Exec.Vertex3f = vertex3f_normal_color_tex2;
1171 ctx->Exec.Vertex3fv = vertex3fv_normal_color_tex2;
1172 }
1173 else {
1174 ctx->Exec.Vertex2f = vertex2f_normal_color_tex4;
1175 ctx->Exec.Vertex3f = vertex3f_normal_color_tex4;
1176 ctx->Exec.Vertex3fv = vertex3fv_normal_color_tex4;
1177 }
1178 }
1179 else {
1180 ctx->Exec.Vertex2f = vertex2f_normal;
1181 ctx->Exec.Vertex3f = vertex3f_normal;
1182 ctx->Exec.Vertex3fv = vertex3fv_normal;
1183 }
1184 }
1185 else {
1186 /* not lighting, need vertex color */
1187 if (ctx->Texture.Enabled) {
1188 if (ctx->VB->TexCoordSize==2) {
1189 ctx->Exec.Vertex2f = vertex2f_color_tex2;
1190 ctx->Exec.Vertex3f = vertex3f_color_tex2;
1191 ctx->Exec.Vertex3fv = vertex3fv_color_tex2;
1192 }
1193 else {
1194 ctx->Exec.Vertex2f = vertex2f_color_tex4;
1195 ctx->Exec.Vertex3f = vertex3f_color_tex4;
1196 ctx->Exec.Vertex3fv = vertex3fv_color_tex4;
1197 }
1198 }
1199 else {
1200 ctx->Exec.Vertex2f = vertex2f_color;
1201 ctx->Exec.Vertex3f = vertex3f_color;
1202 ctx->Exec.Vertex3fv = vertex3fv_color;
1203 }
1204 }
1205 }
1206 else {
1207 /* color index mode */
1208 if (ctx->Light.Enabled) {
1209 ctx->Exec.Vertex2f = vertex2f_normal;
1210 ctx->Exec.Vertex3f = vertex3f_normal;
1211 ctx->Exec.Vertex3fv = vertex3fv_normal;
1212 }
1213 else {
1214 ctx->Exec.Vertex2f = vertex2f_index;
1215 ctx->Exec.Vertex3f = vertex3f_index;
1216 ctx->Exec.Vertex3fv = vertex3fv_index;
1217 }
1218 }
1219 }
1220
1221 if (!ctx->CompileFlag) {
1222 ctx->API.Vertex2f = ctx->Exec.Vertex2f;
1223 ctx->API.Vertex3f = ctx->Exec.Vertex3f;
1224 ctx->API.Vertex4f = ctx->Exec.Vertex4f;
1225 ctx->API.Vertex3fv = ctx->Exec.Vertex3fv;
1226 }
1227}
#define GL_FEEDBACK
Definition: gl.h:387
static void vertex2f_feedback(GLcontext *ctx, GLfloat x, GLfloat y)
Definition: vbfill.c:568
static void vertex3f_color_tex4(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
Definition: vbfill.c:703
static void vertex3fv_normal_color_tex2(GLcontext *ctx, const GLfloat v[3])
Definition: vbfill.c:924
static void vertex2f_color(GLcontext *ctx, GLfloat x, GLfloat y)
Definition: vbfill.c:880
static void vertex4f_feedback(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
Definition: vbfill.c:530
static void vertex3fv_normal(GLcontext *ctx, const GLfloat v[3])
Definition: vbfill.c:970
static void vertex4(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
Definition: vbfill.c:585
static void vertex2f_normal_color_tex4(GLcontext *ctx, GLfloat x, GLfloat y)
Definition: vbfill.c:792
static void vertex3fv_color_tex4(GLcontext *ctx, const GLfloat v[3])
Definition: vbfill.c:1013
static void vertex3f_feedback(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
Definition: vbfill.c:562
static void vertex2f_color_tex2(GLcontext *ctx, GLfloat x, GLfloat y)
Definition: vbfill.c:836
static void vertex2f_normal(GLcontext *ctx, GLfloat x, GLfloat y)
Definition: vbfill.c:815
static void vertex2f_color_tex4(GLcontext *ctx, GLfloat x, GLfloat y)
Definition: vbfill.c:858
static void vertex3fv_color_tex2(GLcontext *ctx, const GLfloat v[3])
Definition: vbfill.c:991
static void vertex3f_normal_color_tex2(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
Definition: vbfill.c:611
static void vertex3fv_normal_color_tex4(GLcontext *ctx, const GLfloat v[3])
Definition: vbfill.c:947
static void vertex2f_normal_color_tex2(GLcontext *ctx, GLfloat x, GLfloat y)
Definition: vbfill.c:769
static void vertex3fv_color(GLcontext *ctx, const GLfloat v[3])
Definition: vbfill.c:1035
static void vertex3f_color_tex2(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
Definition: vbfill.c:680
static void vertex3f_normal(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
Definition: vbfill.c:659
static void vertex3f_color(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
Definition: vbfill.c:726
static void vertex3fv_index(GLcontext *ctx, const GLfloat v[3])
Definition: vbfill.c:1056
static void vertex2f_index(GLcontext *ctx, GLfloat x, GLfloat y)
Definition: vbfill.c:901
static void vertex3f_normal_color_tex4(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
Definition: vbfill.c:635
static void vertex3f_index(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z)
Definition: vbfill.c:747
static void vertex3fv_feedback(GLcontext *ctx, const GLfloat v[3])
Definition: vbfill.c:574

Referenced by execute_list(), gl_Begin(), gl_TexCoord4f(), and gl_update_state().

◆ gl_TexCoord2f()

void gl_TexCoord2f ( GLcontext ctx,
GLfloat  s,
GLfloat  t 
)

Definition at line 1109 of file vbfill.c.

1110{
1111 ctx->Current.TexCoord[0] = s;
1112 ctx->Current.TexCoord[1] = t;
1113}
GLdouble s
Definition: gl.h:2039
GLdouble GLdouble t
Definition: gl.h:2047

Referenced by init_exec_pointers().

◆ gl_TexCoord2f4()

void gl_TexCoord2f4 ( GLcontext ctx,
GLfloat  s,
GLfloat  t 
)

Definition at line 1120 of file vbfill.c.

1121{
1122 ctx->Current.TexCoord[0] = s;
1123 ctx->Current.TexCoord[1] = t;
1124 ctx->Current.TexCoord[2] = 0.0F;
1125 ctx->Current.TexCoord[3] = 1.0F;
1126}

Referenced by gl_TexCoord4f().

◆ gl_TexCoord4f()

void gl_TexCoord4f ( GLcontext ctx,
GLfloat  s,
GLfloat  t,
GLfloat  r,
GLfloat  q 
)

Definition at line 1132 of file vbfill.c.

1133{
1134 ctx->Current.TexCoord[0] = s;
1135 ctx->Current.TexCoord[1] = t;
1136 ctx->Current.TexCoord[2] = r;
1137 ctx->Current.TexCoord[3] = q;
1138 if (ctx->VB->TexCoordSize==2) {
1139 /* Have to switch to 4-component texture mode now */
1140 ctx->VB->TexCoordSize = 4;
1142 ctx->Exec.TexCoord2f = ctx->API.TexCoord2f = gl_TexCoord2f4;
1143 }
1144}
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
void gl_TexCoord2f4(GLcontext *ctx, GLfloat s, GLfloat t)
Definition: vbfill.c:1120

Referenced by init_exec_pointers().

◆ gl_vertex2f_nop()

void gl_vertex2f_nop ( GLcontext ctx,
GLfloat  x,
GLfloat  y 
)

Definition at line 1089 of file vbfill.c.

1090{
1091 gl_error( ctx, GL_INVALID_OPERATION, "glVertex2" );
1092}

Referenced by init_exec_pointers().

◆ gl_vertex3f_nop()

void gl_vertex3f_nop ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)

Definition at line 1084 of file vbfill.c.

1085{
1086 gl_error( ctx, GL_INVALID_OPERATION, "glVertex3" );
1087}

Referenced by gl_Begin(), and init_exec_pointers().

◆ gl_vertex3fv_nop()

void gl_vertex3fv_nop ( GLcontext ctx,
const GLfloat  v[3] 
)

Definition at line 1094 of file vbfill.c.

1095{
1096 gl_error( ctx, GL_INVALID_OPERATION, "glVertex3v" );
1097}

Referenced by init_exec_pointers().

◆ gl_vertex4f_nop()

void gl_vertex4f_nop ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)

Definition at line 1078 of file vbfill.c.

1080{
1081 gl_error( ctx, GL_INVALID_OPERATION, "glVertex4" );
1082}

Referenced by init_exec_pointers().

◆ vertex2f_color()

static void vertex2f_color ( GLcontext ctx,
GLfloat  x,
GLfloat  y 
)
static

Definition at line 880 of file vbfill.c.

881{
882 struct vertex_buffer *VB = ctx->VB;
883 GLuint count = VB->Count;
884
885 ASSIGN_3V( VB->Obj[count], x, y, 0.0F );
886 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
887 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
888
889 count++;
890 VB->Count = count;
891 if (count==VB_MAX) {
893 }
894}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
#define ASSIGN_3V(V, V0, V1, V2)
Definition: macros.h:126

Referenced by gl_set_vertex_function().

◆ vertex2f_color_tex2()

static void vertex2f_color_tex2 ( GLcontext ctx,
GLfloat  x,
GLfloat  y 
)
static

Definition at line 836 of file vbfill.c.

837{
838 struct vertex_buffer *VB = ctx->VB;
839 GLuint count = VB->Count;
840
841 ASSIGN_3V( VB->Obj[count], x, y, 0.0F );
842 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
843 COPY_2V( VB->TexCoord[count], ctx->Current.TexCoord );
844 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
845
846 count++;
847 VB->Count = count;
848 if (count==VB_MAX) {
850 }
851}
#define COPY_2V(DST, SRC)
Definition: macros.h:95

Referenced by gl_set_vertex_function().

◆ vertex2f_color_tex4()

static void vertex2f_color_tex4 ( GLcontext ctx,
GLfloat  x,
GLfloat  y 
)
static

Definition at line 858 of file vbfill.c.

859{
860 struct vertex_buffer *VB = ctx->VB;
861 GLuint count = VB->Count;
862
863 ASSIGN_3V( VB->Obj[count], x, y, 0.0F );
864 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
865 COPY_4V( VB->TexCoord[count], ctx->Current.TexCoord );
866 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
867
868 count++;
869 VB->Count = count;
870 if (count==VB_MAX) {
872 }
873}

Referenced by gl_set_vertex_function().

◆ vertex2f_feedback()

static void vertex2f_feedback ( GLcontext ctx,
GLfloat  x,
GLfloat  y 
)
static

Definition at line 568 of file vbfill.c.

569{
570 vertex4f_feedback(ctx, x, y, 0.0F, 1.0F);
571}

Referenced by gl_set_vertex_function().

◆ vertex2f_index()

static void vertex2f_index ( GLcontext ctx,
GLfloat  x,
GLfloat  y 
)
static

Definition at line 901 of file vbfill.c.

902{
903 struct vertex_buffer *VB = ctx->VB;
904 GLuint count = VB->Count;
905
906 ASSIGN_3V( VB->Obj[count], x, y, 0.0F );
907 VB->Findex[count] = ctx->Current.Index;
908 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
909
910 count++;
911 VB->Count = count;
912 if (count==VB_MAX) {
914 }
915}

Referenced by gl_set_vertex_function().

◆ vertex2f_normal()

static void vertex2f_normal ( GLcontext ctx,
GLfloat  x,
GLfloat  y 
)
static

Definition at line 815 of file vbfill.c.

816{
817 struct vertex_buffer *VB = ctx->VB;
818 GLuint count = VB->Count;
819
820 ASSIGN_3V( VB->Obj[count], x, y, 0.0F );
821 COPY_3V( VB->Normal[count], ctx->Current.Normal );
822 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
823
824 count++;
825 VB->Count = count;
826 if (count==VB_MAX) {
828 }
829}

Referenced by gl_set_vertex_function().

◆ vertex2f_normal_color_tex2()

static void vertex2f_normal_color_tex2 ( GLcontext ctx,
GLfloat  x,
GLfloat  y 
)
static

Definition at line 769 of file vbfill.c.

770{
771 struct vertex_buffer *VB = ctx->VB;
772 GLuint count = VB->Count;
773
774 ASSIGN_3V( VB->Obj[count], x, y, 0.0F );
775 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
776 COPY_3V( VB->Normal[count], ctx->Current.Normal );
777 COPY_2V( VB->TexCoord[count], ctx->Current.TexCoord );
778 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
779
780 count++;
781 VB->Count = count;
782 if (count==VB_MAX) {
784 }
785}

Referenced by gl_set_vertex_function().

◆ vertex2f_normal_color_tex4()

static void vertex2f_normal_color_tex4 ( GLcontext ctx,
GLfloat  x,
GLfloat  y 
)
static

Definition at line 792 of file vbfill.c.

793{
794 struct vertex_buffer *VB = ctx->VB;
795 GLuint count = VB->Count;
796
797 ASSIGN_3V( VB->Obj[count], x, y, 0.0F );
798 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
799 COPY_3V( VB->Normal[count], ctx->Current.Normal );
800 COPY_4V( VB->TexCoord[count], ctx->Current.TexCoord );
801 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
802
803 count++;
804 VB->Count = count;
805 if (count==VB_MAX) {
807 }
808}

Referenced by gl_set_vertex_function().

◆ vertex3f_color()

static void vertex3f_color ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)
static

Definition at line 726 of file vbfill.c.

727{
728 struct vertex_buffer *VB = ctx->VB;
729 GLuint count = VB->Count;
730
731 ASSIGN_3V( VB->Obj[count], x, y, z );
732 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
733 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
734
735 count++;
736 VB->Count = count;
737 if (count==VB_MAX) {
739 }
740}
GLdouble GLdouble z
Definition: glext.h:5874

Referenced by gl_set_vertex_function().

◆ vertex3f_color_tex2()

static void vertex3f_color_tex2 ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)
static

Definition at line 680 of file vbfill.c.

682{
683 struct vertex_buffer *VB = ctx->VB;
684 GLuint count = VB->Count;
685
686 ASSIGN_3V( VB->Obj[count], x, y, z );
687 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
688 COPY_2V( VB->TexCoord[count], ctx->Current.TexCoord );
689 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
690
691 count++;
692 VB->Count = count;
693 if (count==VB_MAX) {
695 }
696}

Referenced by gl_set_vertex_function().

◆ vertex3f_color_tex4()

static void vertex3f_color_tex4 ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)
static

Definition at line 703 of file vbfill.c.

705{
706 struct vertex_buffer *VB = ctx->VB;
707 GLuint count = VB->Count;
708
709 ASSIGN_3V( VB->Obj[count], x, y, z );
710 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
711 COPY_4V( VB->TexCoord[count], ctx->Current.TexCoord );
712 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
713
714 count++;
715 VB->Count = count;
716 if (count==VB_MAX) {
718 }
719}

Referenced by gl_set_vertex_function().

◆ vertex3f_feedback()

static void vertex3f_feedback ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)
static

Definition at line 562 of file vbfill.c.

563{
564 vertex4f_feedback(ctx, x, y, z, 1.0F);
565}

Referenced by gl_set_vertex_function().

◆ vertex3f_index()

static void vertex3f_index ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)
static

Definition at line 747 of file vbfill.c.

748{
749 struct vertex_buffer *VB = ctx->VB;
750 GLuint count = VB->Count;
751
752 ASSIGN_3V( VB->Obj[count], x, y, z );
753 VB->Findex[count] = ctx->Current.Index;
754 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
755
756 count++;
757 VB->Count = count;
758 if (count==VB_MAX) {
760 }
761}

Referenced by gl_set_vertex_function().

◆ vertex3f_normal()

static void vertex3f_normal ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)
static

Definition at line 659 of file vbfill.c.

660{
661 struct vertex_buffer *VB = ctx->VB;
662 GLuint count = VB->Count;
663
664 ASSIGN_3V( VB->Obj[count], x, y, z );
665 COPY_3V( VB->Normal[count], ctx->Current.Normal );
666 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
667
668 count++;
669 VB->Count = count;
670 if (count==VB_MAX) {
672 }
673}

Referenced by gl_set_vertex_function().

◆ vertex3f_normal_color_tex2()

static void vertex3f_normal_color_tex2 ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)
static

Definition at line 611 of file vbfill.c.

613{
614 struct vertex_buffer *VB = ctx->VB;
615 GLuint count = VB->Count;
616
617 ASSIGN_3V( VB->Obj[count], x, y, z );
618 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
619 COPY_3V( VB->Normal[count], ctx->Current.Normal );
620 COPY_2V( VB->TexCoord[count], ctx->Current.TexCoord );
621 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
622
623 count++;
624 VB->Count = count;
625 if (count==VB_MAX) {
627 }
628}

Referenced by gl_set_vertex_function().

◆ vertex3f_normal_color_tex4()

static void vertex3f_normal_color_tex4 ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z 
)
static

Definition at line 635 of file vbfill.c.

637{
638 struct vertex_buffer *VB = ctx->VB;
639 GLuint count = VB->Count;
640
641 ASSIGN_3V( VB->Obj[count], x, y, z );
642 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
643 COPY_3V( VB->Normal[count], ctx->Current.Normal );
644 COPY_4V( VB->TexCoord[count], ctx->Current.TexCoord );
645 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
646
647 count++;
648 VB->Count = count;
649 if (count==VB_MAX) {
651 }
652}

Referenced by gl_set_vertex_function().

◆ vertex3fv_color()

static void vertex3fv_color ( GLcontext ctx,
const GLfloat  v[3] 
)
static

Definition at line 1035 of file vbfill.c.

1036{
1037 struct vertex_buffer *VB = ctx->VB;
1038 GLuint count = VB->Count;
1039
1040 COPY_3V( VB->Obj[count], v );
1041 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
1042 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
1043
1044 count++;
1045 VB->Count = count;
1046 if (count==VB_MAX) {
1048 }
1049}
const GLdouble * v
Definition: gl.h:2040

Referenced by gl_set_vertex_function().

◆ vertex3fv_color_tex2()

static void vertex3fv_color_tex2 ( GLcontext ctx,
const GLfloat  v[3] 
)
static

Definition at line 991 of file vbfill.c.

992{
993 struct vertex_buffer *VB = ctx->VB;
994 GLuint count = VB->Count;
995
996 COPY_3V( VB->Obj[count], v );
997 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
998 COPY_2V( VB->TexCoord[count], ctx->Current.TexCoord );
999 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
1000
1001 count++;
1002 VB->Count = count;
1003 if (count==VB_MAX) {
1005 }
1006}

Referenced by gl_set_vertex_function().

◆ vertex3fv_color_tex4()

static void vertex3fv_color_tex4 ( GLcontext ctx,
const GLfloat  v[3] 
)
static

Definition at line 1013 of file vbfill.c.

1014{
1015 struct vertex_buffer *VB = ctx->VB;
1016 GLuint count = VB->Count;
1017
1018 COPY_3V( VB->Obj[count], v );
1019 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
1020 COPY_4V( VB->TexCoord[count], ctx->Current.TexCoord );
1021 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
1022
1023 count++;
1024 VB->Count = count;
1025 if (count==VB_MAX) {
1027 }
1028}

Referenced by gl_set_vertex_function().

◆ vertex3fv_feedback()

static void vertex3fv_feedback ( GLcontext ctx,
const GLfloat  v[3] 
)
static

Definition at line 574 of file vbfill.c.

575{
576 vertex4f_feedback(ctx, v[0], v[1], v[2], 1.0F);
577}

Referenced by gl_set_vertex_function().

◆ vertex3fv_index()

static void vertex3fv_index ( GLcontext ctx,
const GLfloat  v[3] 
)
static

Definition at line 1056 of file vbfill.c.

1057{
1058 struct vertex_buffer *VB = ctx->VB;
1059 GLuint count = VB->Count;
1060
1061 COPY_3V( VB->Obj[count], v );
1062 VB->Findex[count] = ctx->Current.Index;
1063 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
1064
1065 count++;
1066 VB->Count = count;
1067 if (count==VB_MAX) {
1069 }
1070}

Referenced by gl_set_vertex_function().

◆ vertex3fv_normal()

static void vertex3fv_normal ( GLcontext ctx,
const GLfloat  v[3] 
)
static

Definition at line 970 of file vbfill.c.

971{
972 struct vertex_buffer *VB = ctx->VB;
973 GLuint count = VB->Count;
974
975 COPY_3V( VB->Obj[count], v );
976 COPY_3V( VB->Normal[count], ctx->Current.Normal );
977 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
978
979 count++;
980 VB->Count = count;
981 if (count==VB_MAX) {
983 }
984}

Referenced by gl_set_vertex_function().

◆ vertex3fv_normal_color_tex2()

static void vertex3fv_normal_color_tex2 ( GLcontext ctx,
const GLfloat  v[3] 
)
static

Definition at line 924 of file vbfill.c.

925{
926 struct vertex_buffer *VB = ctx->VB;
927 GLuint count = VB->Count;
928
929 COPY_3V( VB->Obj[count], v );
930 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
931 COPY_3V( VB->Normal[count], ctx->Current.Normal );
932 COPY_2V( VB->TexCoord[count], ctx->Current.TexCoord );
933 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
934
935 count++;
936 VB->Count = count;
937 if (count==VB_MAX) {
939 }
940}

Referenced by gl_set_vertex_function().

◆ vertex3fv_normal_color_tex4()

static void vertex3fv_normal_color_tex4 ( GLcontext ctx,
const GLfloat  v[3] 
)
static

Definition at line 947 of file vbfill.c.

948{
949 struct vertex_buffer *VB = ctx->VB;
950 GLuint count = VB->Count;
951
952 COPY_3V( VB->Obj[count], v );
953 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
954 COPY_3V( VB->Normal[count], ctx->Current.Normal );
955 COPY_4V( VB->TexCoord[count], ctx->Current.TexCoord );
956 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
957
958 count++;
959 VB->Count = count;
960 if (count==VB_MAX) {
962 }
963}

Referenced by gl_set_vertex_function().

◆ vertex4()

static void vertex4 ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)
static

Definition at line 585 of file vbfill.c.

587{
588 struct vertex_buffer *VB = ctx->VB;
589 GLuint count = VB->Count;
590
591 ASSIGN_4V( VB->Obj[count], x, y, z, w );
592 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
593 COPY_3V( VB->Normal[count], ctx->Current.Normal );
594 COPY_4V( VB->TexCoord[count], ctx->Current.TexCoord );
595 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
596 VB->VertexSizeMask = VERTEX4_BIT;
597
598 count++;
599 VB->Count = count;
600 if (count==VB_MAX) {
602 }
603}
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102

Referenced by gl_set_vertex_function().

◆ vertex4f_feedback()

static void vertex4f_feedback ( GLcontext ctx,
GLfloat  x,
GLfloat  y,
GLfloat  z,
GLfloat  w 
)
static

Definition at line 530 of file vbfill.c.

532{
533 struct vertex_buffer *VB = ctx->VB;
534 GLuint count = VB->Count;
535
536 /* vertex */
537 ASSIGN_4V( VB->Obj[count], x, y, z, w );
538
539 /* color */
540 COPY_4UBV( VB->Fcolor[count], ctx->Current.ByteColor );
541
542 /* index */
543 VB->Findex[count] = ctx->Current.Index;
544
545 /* normal */
546 COPY_3V( VB->Normal[count], ctx->Current.Normal );
547
548 /* texcoord */
549 COPY_4V( VB->TexCoord[count], ctx->Current.TexCoord );
550
551 /* edgeflag */
552 VB->Edgeflag[count] = ctx->Current.EdgeFlag;
553
554 count++;
555 VB->Count = count;
556 if (count==VB_MAX) {
558 }
559}

Referenced by gl_set_vertex_function(), vertex2f_feedback(), vertex3f_feedback(), and vertex3fv_feedback().