mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Compare commits
3 Commits
2bbceec451
...
3eda0dd387
Author | SHA1 | Date | |
---|---|---|---|
|
3eda0dd387 | ||
|
ca54ce69c4 | ||
|
7f1e6cb538 |
@ -32,7 +32,10 @@ ebitengine_NewScreenFramebufferImage(int *image, int width, int height) {
|
||||
|
||||
extern "C" void ebitengine_DisposeImage(int id) {}
|
||||
|
||||
ebitengine_Error
|
||||
extern "C" void ebitengine_SetVertices(float *vertices, int vertexCount,
|
||||
uint32_t *indices, int indexCount) {}
|
||||
|
||||
extern "C" ebitengine_Error
|
||||
ebitengine_DrawTriangles(int dst, int *srcs, int srcCount, int shader,
|
||||
ebitengine_DstRegion *dstRegions, int dstRegionCount,
|
||||
int indexOffset, ebitengine_Blend blend,
|
||||
|
@ -72,6 +72,9 @@ func (g *Graphics) SetTransparent(transparent bool) {
|
||||
}
|
||||
|
||||
func (g *Graphics) SetVertices(vertices []float32, indices []uint32) error {
|
||||
defer runtime.KeepAlive(vertices)
|
||||
defer runtime.KeepAlive(indices)
|
||||
C.ebitengine_SetVertices((*C.float)(&vertices[0]), C.int(len(vertices)), (*C.uint32_t)(&indices[0]), C.int(len(indices)))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -57,6 +57,9 @@ ebitengine_Error ebitengine_NewScreenFramebufferImage(int *image, int width,
|
||||
int height);
|
||||
void ebitengine_DisposeImage(int id);
|
||||
|
||||
void ebitengine_SetVertices(float *vertices, int vertexCount, uint32_t *indices,
|
||||
int indexCount);
|
||||
|
||||
ebitengine_Error
|
||||
ebitengine_DrawTriangles(int dst, int *srcs, int srcCount, int shader,
|
||||
ebitengine_DstRegion *dstRegions, int dstRegionCount,
|
||||
|
Loading…
Reference in New Issue
Block a user