55 #define GPU_vertbuf_create_with_format(format) \
56 GPU_vertbuf_create_with_format_ex(format, GPU_USAGE_STATIC)
80 #define GPU_vertbuf_init_with_format(verts, format) \
81 GPU_vertbuf_init_with_format_ex(verts, format, GPU_USAGE_STATIC)
128 unsigned char *_data_end;
134 unsigned char *
data =
a->data;
135 a->data +=
a->stride;
142 return ((
a->data -
a->data_init) /
a->stride);
183 #define GPU_VERTBUF_DISCARD_SAFE(verts) \
185 if (verts != NULL) { \
186 GPU_vertbuf_discard(verts); \
#define ENUM_OPERATORS(_type, _max)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei stride
uint GPU_vertbuf_get_vertex_alloc(const GPUVertBuf *verts)
void GPU_vertbuf_wrap_handle(GPUVertBuf *verts, uint64_t handle)
void * GPU_vertbuf_unmap(const GPUVertBuf *verts, const void *mapped_data)
const GPUVertFormat * GPU_vertbuf_get_format(const GPUVertBuf *verts)
uint GPU_vertbuf_get_vertex_len(const GPUVertBuf *verts)
void GPU_vertbuf_vert_set(GPUVertBuf *verts, uint v_idx, const void *data)
void GPU_vertbuf_discard(GPUVertBuf *)
void * GPU_vertbuf_steal_data(GPUVertBuf *verts)
struct GPUVertBuf GPUVertBuf
GPU_INLINE uint GPU_vertbuf_raw_used(GPUVertBufRaw *a)
void GPU_vertbuf_update_sub(GPUVertBuf *verts, uint start, uint len, const void *data)
GPUVertBuf * GPU_vertbuf_calloc(void)
void GPU_vertbuf_clear(GPUVertBuf *verts)
void GPU_vertbuf_handle_ref_remove(GPUVertBuf *verts)
void GPU_vertbuf_data_alloc(GPUVertBuf *, uint v_len)
void GPU_vertbuf_init_with_format_ex(GPUVertBuf *, const GPUVertFormat *, GPUUsageType)
@ GPU_VERTBUF_DATA_UPLOADED
void GPU_vertbuf_bind_as_ssbo(struct GPUVertBuf *verts, int binding)
GPUVertBufStatus GPU_vertbuf_get_status(const GPUVertBuf *verts)
void GPU_vertbuf_attr_fill_stride(GPUVertBuf *, uint a_idx, uint stride, const void *data)
void * GPU_vertbuf_get_data(const GPUVertBuf *verts)
GPUVertBuf * GPU_vertbuf_duplicate(GPUVertBuf *verts)
void GPU_vertbuf_init_build_on_device(GPUVertBuf *verts, GPUVertFormat *format, uint v_len)
void GPU_vertbuf_use(GPUVertBuf *)
const void * GPU_vertbuf_read(GPUVertBuf *verts)
GPUVertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat *, GPUUsageType)
void GPU_vertbuf_attr_fill(GPUVertBuf *, uint a_idx, const void *data)
GPU_INLINE void * GPU_vertbuf_raw_step(GPUVertBufRaw *a)
void GPU_vertbuf_data_len_set(GPUVertBuf *, uint v_len)
void GPU_vertbuf_attr_get_raw_data(GPUVertBuf *, uint a_idx, GPUVertBufRaw *access)
void GPU_vertbuf_bind_as_texture(struct GPUVertBuf *verts, int binding)
void GPU_vertbuf_handle_ref_add(GPUVertBuf *verts)
uint GPU_vertbuf_get_memory_usage(void)
struct GPUVertBufRaw GPUVertBufRaw
void GPU_vertbuf_tag_dirty(GPUVertBuf *verts)
void GPU_vertbuf_attr_set(GPUVertBuf *, uint a_idx, uint v_idx, const void *data)
void GPU_vertbuf_data_resize(GPUVertBuf *, uint v_len)
unsigned __int64 uint64_t
unsigned char * data_init