ReactOS  0.4.15-dev-1201-gb2cf5a4
vb.c File Reference
#include <stdlib.h>
#include "types.h"
#include "vb.h"
Include dependency graph for vb.c:

Go to the source code of this file.

Functions

struct vertex_buffergl_alloc_vb (void)
 

Function Documentation

◆ gl_alloc_vb()

struct vertex_buffer* gl_alloc_vb ( void  )

Definition at line 65 of file vb.c.

66 {
67  struct vertex_buffer *vb;
68  vb = (struct vertex_buffer *) calloc(sizeof(struct vertex_buffer), 1);
69  if (vb) {
70  /* set non-zero fields */
71  GLuint i;
72  for (i=0;i<VB_SIZE;i++) {
73  vb->MaterialMask[i] = 0;
74  vb->ClipMask[i] = 0;
75  vb->Obj[i][3] = 1.0F;
76  vb->TexCoord[i][2] = 0.0F;
77  vb->TexCoord[i][3] = 1.0F;
78  }
80  vb->TexCoordSize = 2;
81  vb->MonoColor = GL_TRUE;
82  vb->MonoMaterial = GL_TRUE;
83  vb->MonoNormal = GL_TRUE;
84  vb->ClipOrMask = 0;
86  }
87  return vb;
88 }
GLuint TexCoordSize
Definition: vb.h:128
GLuint VertexSizeMask
Definition: vb.h:127
#define VERTEX3_BIT
Definition: vb.h:94
GLubyte ClipMask[VB_SIZE]
Definition: vb.h:119
GLfloat Obj[VB_SIZE][4]
Definition: vb.h:100
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 const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLfloat TexCoord[VB_SIZE][4]
Definition: vb.h:117
GLubyte ClipAndMask
Definition: vb.h:121
GLuint MaterialMask[VB_SIZE]
Definition: vb.h:134
GLboolean MonoColor
Definition: vb.h:129
GLubyte ClipOrMask
Definition: vb.h:120
#define VB_SIZE
Definition: vb.h:89
unsigned int GLuint
Definition: gl.h:159
#define GL_TRUE
Definition: gl.h:174
GLboolean MonoNormal
Definition: vb.h:130
#define calloc
Definition: rosglue.h:14
#define CLIP_ALL_BITS
Definition: vb.h:148
GLboolean MonoMaterial
Definition: vb.h:131

Referenced by gl_create_context().