internal/graphicsdriver/playstation5: add kBlend* consts

This commit is contained in:
Hajime Hoshi 2024-10-14 00:12:27 +09:00
parent 09c027b670
commit 8c84be54b5
2 changed files with 23 additions and 0 deletions

View File

@ -23,6 +23,8 @@ type Blend struct {
BlendOperationAlpha BlendOperation BlendOperationAlpha BlendOperation
} }
// BlendFactor and BlendOperation must be synced with internal/graphicsdriver/playstation5/graphics_playstation5.h.
type BlendFactor byte type BlendFactor byte
const ( const (

View File

@ -49,6 +49,27 @@ typedef struct ebitengine_DstRegion {
int index_count; int index_count;
} ebitengine_DstRegion; } ebitengine_DstRegion;
// kBlendFactor* and kBlendOperation* must be synced with
// internal/graphicsdriver/blend.go.
const uint8_t kBlendFactorZero = 0;
const uint8_t kBlendFactorOne = 1;
const uint8_t kBlendFactorSourceColor = 2;
const uint8_t kBlendFactorOneMinusSourceColor = 3;
const uint8_t kBlendFactorSourceAlpha = 4;
const uint8_t kBlendFactorOneMinusSourceAlpha = 5;
const uint8_t kBlendFactorDestinationColor = 6;
const uint8_t kBlendFactorOneMinusDestinationColor = 7;
const uint8_t kBlendFactorDestinationAlpha = 8;
const uint8_t kBlendFactorOneMinusDestinationAlpha = 9;
const uint8_t kBlendFactorSourceAlphaSaturated = 10;
const uint8_t kBlendOperationAdd = 0;
const uint8_t kBlendOperationSubtract = 1;
const uint8_t kBlendOperationReverseSubtract = 2;
const uint8_t kBlendOperationMin = 3;
const uint8_t kBlendOperationMax = 4;
typedef struct ebitengine_Blend { typedef struct ebitengine_Blend {
uint8_t factor_src_rgb; uint8_t factor_src_rgb;
uint8_t factor_src_alpha; uint8_t factor_src_alpha;