wut  1.0.0-beta9
Wii U Toolchain
buffer.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include "resource.h"
4 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef struct GX2RBuffer GX2RBuffer;
16 
17 struct GX2RBuffer
18 {
20  uint32_t elemSize;
21  uint32_t elemCount;
22  void *buffer;
23 };
24 WUT_CHECK_SIZE(GX2RBuffer, 0x10);
25 WUT_CHECK_OFFSET(GX2RBuffer, 0x00, flags);
26 WUT_CHECK_OFFSET(GX2RBuffer, 0x04, elemSize);
27 WUT_CHECK_OFFSET(GX2RBuffer, 0x08, elemCount);
28 WUT_CHECK_OFFSET(GX2RBuffer, 0x0C, buffer);
29 
30 BOOL
32 
33 BOOL
35 
36 BOOL
38  void *memory,
39  uint32_t size);
40 
41 void
43  GX2RResourceFlags flags);
44 
45 uint32_t
47 
48 uint32_t
50 
51 void
53  GX2RResourceFlags flags);
54 
55 void *
57  GX2RResourceFlags flags);
58 
59 void
61  GX2RResourceFlags flags);
62 
63 void
65  uint32_t location,
66  uint32_t offset);
67 
68 void
70  uint32_t location,
71  uint32_t offset);
72 
73 void
75  uint32_t location,
76  uint32_t offset);
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
GX2RResourceFlags
GX2RResourceFlags
Definition: resource.h:14
GX2RSetPixelUniformBlock
void GX2RSetPixelUniformBlock(GX2RBuffer *buffer, uint32_t location, uint32_t offset)
GX2RDestroyBufferEx
void GX2RDestroyBufferEx(GX2RBuffer *buffer, GX2RResourceFlags flags)
GX2RBuffer::elemCount
uint32_t elemCount
Definition: buffer.h:21
GX2RCreateBuffer
BOOL GX2RCreateBuffer(GX2RBuffer *buffer)
GX2RBuffer
Definition: buffer.h:17
wut.h
GX2RGetBufferAllocationSize
uint32_t GX2RGetBufferAllocationSize(GX2RBuffer *buffer)
resource.h
GX2RBuffer::elemSize
uint32_t elemSize
Definition: buffer.h:20
GX2RSetGeometryUniformBlock
void GX2RSetGeometryUniformBlock(GX2RBuffer *buffer, uint32_t location, uint32_t offset)
GX2RSetVertexUniformBlock
void GX2RSetVertexUniformBlock(GX2RBuffer *buffer, uint32_t location, uint32_t offset)
GX2RBuffer::buffer
void * buffer
Definition: buffer.h:22
GX2RInvalidateBuffer
void GX2RInvalidateBuffer(GX2RBuffer *buffer, GX2RResourceFlags flags)
GX2RLockBufferEx
void * GX2RLockBufferEx(GX2RBuffer *buffer, GX2RResourceFlags flags)
BOOL
int32_t BOOL
Definition: wut_types.h:4
GX2RBufferExists
BOOL GX2RBufferExists(GX2RBuffer *buffer)
GX2RGetBufferAlignment
uint32_t GX2RGetBufferAlignment(GX2RResourceFlags flags)
GX2RUnlockBufferEx
void GX2RUnlockBufferEx(GX2RBuffer *buffer, GX2RResourceFlags flags)
GX2RCreateBufferUserMemory
BOOL GX2RCreateBufferUserMemory(GX2RBuffer *buffer, void *memory, uint32_t size)
GX2RBuffer::flags
GX2RResourceFlags flags
Definition: buffer.h:19