mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/graphicsdriver/playstation5: change the name convention
This commit is contained in:
parent
508922250a
commit
a499a976f7
@ -36,16 +36,16 @@ extern "C" void ebitengine_Begin() {}
|
||||
|
||||
extern "C" void ebitengine_End(int present) {}
|
||||
|
||||
extern "C" void ebitengine_SetVertices(const float *vertices, int vertexCount,
|
||||
extern "C" void ebitengine_SetVertices(const float *vertices, int vertex_count,
|
||||
const uint32_t *indices,
|
||||
int indexCount) {}
|
||||
int index_count) {}
|
||||
|
||||
extern "C" ebitengine_Error
|
||||
ebitengine_DrawTriangles(int dst, const int *srcs, int srcCount, int shader,
|
||||
const ebitengine_DstRegion *dstRegions,
|
||||
int dstRegionCount, int indexOffset,
|
||||
ebitengine_DrawTriangles(int dst, const int *srcs, int src_count, int shader,
|
||||
const ebitengine_DstRegion *dst_regions,
|
||||
int dst_region_count, int index_offset,
|
||||
ebitengine_Blend blend, const uint32_t *uniforms,
|
||||
int uniformCount, int fillRule) {
|
||||
int uniform_count, int fill_rule) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,8 @@ type playstation5Error struct {
|
||||
func newPlaystation5Error(name string, err C.ebitengine_Error) *playstation5Error {
|
||||
return &playstation5Error{
|
||||
name: name,
|
||||
code: int(err.Code),
|
||||
message: C.GoString(err.Message),
|
||||
code: int(err.code),
|
||||
message: C.GoString(err.message),
|
||||
}
|
||||
}
|
||||
|
||||
@ -137,21 +137,21 @@ func (g *Graphics) DrawTriangles(dst graphicsdriver.ImageID, srcs [graphics.Shad
|
||||
defer runtime.KeepAlive(cDstRegions)
|
||||
for i, r := range dstRegions {
|
||||
cDstRegions[i] = C.ebitengine_DstRegion{
|
||||
MinX: C.int(r.Region.Min.X),
|
||||
MinY: C.int(r.Region.Min.Y),
|
||||
MaxX: C.int(r.Region.Max.X),
|
||||
MaxY: C.int(r.Region.Max.Y),
|
||||
IndexCount: C.int(r.IndexCount),
|
||||
min_x: C.int(r.Region.Min.X),
|
||||
min_y: C.int(r.Region.Min.Y),
|
||||
max_x: C.int(r.Region.Max.X),
|
||||
max_y: C.int(r.Region.Max.Y),
|
||||
index_count: C.int(r.IndexCount),
|
||||
}
|
||||
}
|
||||
|
||||
cBlend := C.ebitengine_Blend{
|
||||
BlendFactorSourceRGB: C.uint8_t(blend.BlendFactorSourceRGB),
|
||||
BlendFactorSourceAlpha: C.uint8_t(blend.BlendFactorSourceAlpha),
|
||||
BlendFactorDestinationRGB: C.uint8_t(blend.BlendFactorDestinationRGB),
|
||||
BlendFactorDestinationAlpha: C.uint8_t(blend.BlendFactorDestinationAlpha),
|
||||
BlendOperationRGB: C.uint8_t(blend.BlendOperationRGB),
|
||||
BlendOperationAlpha: C.uint8_t(blend.BlendOperationAlpha),
|
||||
factor_src_rgb: C.uint8_t(blend.BlendFactorSourceRGB),
|
||||
factor_src_alpha: C.uint8_t(blend.BlendFactorSourceAlpha),
|
||||
factor_dst_rgb: C.uint8_t(blend.BlendFactorDestinationRGB),
|
||||
factor_dst_alpha: C.uint8_t(blend.BlendFactorDestinationAlpha),
|
||||
operation_rgb: C.uint8_t(blend.BlendOperationRGB),
|
||||
operation_alpha: C.uint8_t(blend.BlendOperationAlpha),
|
||||
}
|
||||
|
||||
cUniforms := make([]C.uint32_t, len(uniforms))
|
||||
|
@ -26,29 +26,29 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct ebitengine_Error {
|
||||
const char *Message;
|
||||
int Code;
|
||||
const char *message;
|
||||
int code;
|
||||
} ebitengine_Error;
|
||||
|
||||
static bool ebitengine_IsErrorNil(ebitengine_Error *err) {
|
||||
return err->Message == NULL && err->Code == 0;
|
||||
return err->message == NULL && err->code == 0;
|
||||
}
|
||||
|
||||
typedef struct ebitengine_DstRegion {
|
||||
int MinX;
|
||||
int MinY;
|
||||
int MaxX;
|
||||
int MaxY;
|
||||
int IndexCount;
|
||||
int min_x;
|
||||
int min_y;
|
||||
int max_x;
|
||||
int max_y;
|
||||
int index_count;
|
||||
} ebitengine_DstRegion;
|
||||
|
||||
typedef struct ebitengine_Blend {
|
||||
uint8_t BlendFactorSourceRGB;
|
||||
uint8_t BlendFactorSourceAlpha;
|
||||
uint8_t BlendFactorDestinationRGB;
|
||||
uint8_t BlendFactorDestinationAlpha;
|
||||
uint8_t BlendOperationRGB;
|
||||
uint8_t BlendOperationAlpha;
|
||||
uint8_t factor_src_rgb;
|
||||
uint8_t factor_src_alpha;
|
||||
uint8_t factor_dst_rgb;
|
||||
uint8_t factor_dst_alpha;
|
||||
uint8_t operation_rgb;
|
||||
uint8_t operation_alpha;
|
||||
} ebitengine_Blend;
|
||||
|
||||
ebitengine_Error ebitengine_InitializeGraphics(void);
|
||||
@ -59,15 +59,15 @@ void ebitengine_DisposeImage(int id);
|
||||
|
||||
void ebitengine_Begin();
|
||||
void ebitengine_End(int present);
|
||||
void ebitengine_SetVertices(const float *vertices, int vertexCount,
|
||||
const uint32_t *indices, int indexCount);
|
||||
void ebitengine_SetVertices(const float *vertices, int vertex_count,
|
||||
const uint32_t *indices, int index_count);
|
||||
|
||||
ebitengine_Error
|
||||
ebitengine_DrawTriangles(int dst, const int *srcs, int srcCount, int shader,
|
||||
const ebitengine_DstRegion *dstRegions,
|
||||
int dstRegionCount, int indexOffset,
|
||||
ebitengine_DrawTriangles(int dst, const int *srcs, int src_count, int shader,
|
||||
const ebitengine_DstRegion *dst_regions,
|
||||
int dst_region_count, int indexOffset,
|
||||
ebitengine_Blend blend, const uint32_t *uniforms,
|
||||
int uniformCount, int fillRule);
|
||||
int uniform_count, int fill_rule);
|
||||
|
||||
ebitengine_Error ebitengine_NewShader(int *shader, const char *source);
|
||||
void ebitengine_DisposeShader(int id);
|
||||
|
Loading…
Reference in New Issue
Block a user