gx2r: Add some gx2r draw functions.

This commit is contained in:
James Benton 2016-10-09 20:57:50 +01:00
parent bb3543b626
commit 41cee3bd14
3 changed files with 49 additions and 0 deletions

View File

@ -18,10 +18,18 @@ typedef void (*GX2EventCallbackFunction)(GX2EventType, void *);
struct GX2DisplayListOverrunData
{
//! Pointer to overrun display list
void *oldList;
//! Size of overrun display list
uint32_t oldSize;
//! Pointer to new display list
void *newList;
//! Size of new display list
uint32_t newSize;
UNKNOWN(8);
};
CHECK_OFFSET(GX2DisplayListOverrunData, 0x00, oldList);

37
include/gx2r/draw.h Normal file
View File

@ -0,0 +1,37 @@
#pragma once
#include <wut.h>
#include <gx2/enum.h>
#include "resource.h"
/**
* \defgroup gx2r_draw Draw
* \ingroup gx2r
* @{
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef struct GX2RBuffer GX2RBuffer;
void
GX2RSetAttributeBuffer(GX2RBuffer *buffer,
uint32_t index,
uint32_t stride,
uint32_t offset);
void
GX2RDrawIndexed(GX2PrimitiveMode mode,
GX2RBuffer *buffer,
GX2IndexType indexType,
uint32_t count,
uint32_t indexOffset,
uint32_t vertexOffset,
uint32_t numInstances);
#ifdef __cplusplus
}
#endif
/** @} */

View File

@ -220,3 +220,7 @@ EXPORT(GX2REndDisplayList);
EXPORT(GX2RCallDisplayList);
EXPORT(GX2RDirectCallDisplayList);
// gx2r/draw.h
EXPORT(GX2RSetAttributeBuffer);
EXPORT(GX2RDrawIndexed);