Merge pull request #136 from Lectem/wrap_modes
added texture border color
This commit is contained in:
commit
e9651a2869
@ -274,7 +274,14 @@ void GPU_SetBlendingColor(u8 r, u8 g, u8 b, u8 a);
|
|||||||
void GPU_SetAttributeBuffers(u8 totalAttributes, u32* baseAddress, u64 attributeFormats, u16 attributeMask, u64 attributePermutation, u8 numBuffers, u32 bufferOffsets[], u64 bufferPermutations[], u8 bufferNumAttributes[]);
|
void GPU_SetAttributeBuffers(u8 totalAttributes, u32* baseAddress, u64 attributeFormats, u16 attributeMask, u64 attributePermutation, u8 numBuffers, u32 bufferOffsets[], u64 bufferPermutations[], u8 bufferNumAttributes[]);
|
||||||
|
|
||||||
void GPU_SetTextureEnable(GPU_TEXUNIT units); // GPU_TEXUNITx values can be ORed together to enable multiple texture units
|
void GPU_SetTextureEnable(GPU_TEXUNIT units); // GPU_TEXUNITx values can be ORed together to enable multiple texture units
|
||||||
|
|
||||||
|
|
||||||
void GPU_SetTexture(GPU_TEXUNIT unit, u32* data, u16 width, u16 height, u32 param, GPU_TEXCOLOR colorType);
|
void GPU_SetTexture(GPU_TEXUNIT unit, u32* data, u16 width, u16 height, u32 param, GPU_TEXCOLOR colorType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param borderColor The color used for the border when using the @ref GPU_CLAMP_TO_BORDER wrap mode
|
||||||
|
*/
|
||||||
|
void GPU_SetTextureBorderColor(GPU_TEXUNIT unit,u32 borderColor);
|
||||||
void GPU_SetTexEnv(u8 id, u16 rgbSources, u16 alphaSources, u16 rgbOperands, u16 alphaOperands, GPU_COMBINEFUNC rgbCombine, GPU_COMBINEFUNC alphaCombine, u32 constantColor);
|
void GPU_SetTexEnv(u8 id, u16 rgbSources, u16 alphaSources, u16 rgbOperands, u16 alphaOperands, GPU_COMBINEFUNC rgbCombine, GPU_COMBINEFUNC alphaCombine, u32 constantColor);
|
||||||
|
|
||||||
void GPU_DrawArray(GPU_Primitive_t primitive, u32 n);
|
void GPU_DrawArray(GPU_Primitive_t primitive, u32 n);
|
||||||
|
@ -129,7 +129,7 @@
|
|||||||
#define GPUREG_007E 0x007E
|
#define GPUREG_007E 0x007E
|
||||||
#define GPUREG_007F 0x007F
|
#define GPUREG_007F 0x007F
|
||||||
#define GPUREG_TEXUNITS_CONFIG 0x0080
|
#define GPUREG_TEXUNITS_CONFIG 0x0080
|
||||||
#define GPUREG_0081 0x0081
|
#define GPUREG_TEXUNIT0_BORDER_COLOR 0x0081
|
||||||
#define GPUREG_TEXUNIT0_DIM 0x0082
|
#define GPUREG_TEXUNIT0_DIM 0x0082
|
||||||
#define GPUREG_TEXUNIT0_PARAM 0x0083
|
#define GPUREG_TEXUNIT0_PARAM 0x0083
|
||||||
#define GPUREG_0084 0x0084
|
#define GPUREG_0084 0x0084
|
||||||
@ -145,7 +145,7 @@
|
|||||||
#define GPUREG_TEXUNIT0_TYPE 0x008E
|
#define GPUREG_TEXUNIT0_TYPE 0x008E
|
||||||
#define GPUREG_008F 0x008F
|
#define GPUREG_008F 0x008F
|
||||||
#define GPUREG_0090 0x0090
|
#define GPUREG_0090 0x0090
|
||||||
#define GPUREG_0091 0x0091
|
#define GPUREG_TEXUNIT1_BORDER_COLOR 0x0091
|
||||||
#define GPUREG_TEXUNIT1_DIM 0x0092
|
#define GPUREG_TEXUNIT1_DIM 0x0092
|
||||||
#define GPUREG_TEXUNIT1_PARAM 0x0093
|
#define GPUREG_TEXUNIT1_PARAM 0x0093
|
||||||
#define GPUREG_0094 0x0094
|
#define GPUREG_0094 0x0094
|
||||||
@ -153,7 +153,7 @@
|
|||||||
#define GPUREG_TEXUNIT1_TYPE 0x0096
|
#define GPUREG_TEXUNIT1_TYPE 0x0096
|
||||||
#define GPUREG_0097 0x0097
|
#define GPUREG_0097 0x0097
|
||||||
#define GPUREG_0098 0x0098
|
#define GPUREG_0098 0x0098
|
||||||
#define GPUREG_0099 0x0099
|
#define GPUREG_TEXUNIT2_BORDER_COLOR 0x0099
|
||||||
#define GPUREG_TEXUNIT2_DIM 0x009A
|
#define GPUREG_TEXUNIT2_DIM 0x009A
|
||||||
#define GPUREG_TEXUNIT2_PARAM 0x009B
|
#define GPUREG_TEXUNIT2_PARAM 0x009B
|
||||||
#define GPUREG_009C 0x009C
|
#define GPUREG_009C 0x009C
|
||||||
|
@ -397,6 +397,24 @@ void GPU_SetTexture(GPU_TEXUNIT unit, u32* data, u16 width, u16 height, u32 para
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GPU_SetTextureBorderColor(GPU_TEXUNIT unit,u32 borderColor)
|
||||||
|
{
|
||||||
|
switch (unit)
|
||||||
|
{
|
||||||
|
case GPU_TEXUNIT0:
|
||||||
|
GPUCMD_AddWrite(GPUREG_TEXUNIT0_BORDER_COLOR, borderColor);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GPU_TEXUNIT1:
|
||||||
|
GPUCMD_AddWrite(GPUREG_TEXUNIT1_BORDER_COLOR, borderColor);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GPU_TEXUNIT2:
|
||||||
|
GPUCMD_AddWrite(GPUREG_TEXUNIT2_BORDER_COLOR, borderColor);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const u8 GPU_FORMATSIZE[4]={1,1,2,4};
|
const u8 GPU_FORMATSIZE[4]={1,1,2,4};
|
||||||
|
|
||||||
void GPU_SetAttributeBuffers(u8 totalAttributes, u32* baseAddress, u64 attributeFormats, u16 attributeMask, u64 attributePermutation, u8 numBuffers, u32 bufferOffsets[], u64 bufferPermutations[], u8 bufferNumAttributes[])
|
void GPU_SetAttributeBuffers(u8 totalAttributes, u32* baseAddress, u64 attributeFormats, u16 attributeMask, u64 attributePermutation, u8 numBuffers, u32 bufferOffsets[], u64 bufferPermutations[], u8 bufferNumAttributes[])
|
||||||
|
Loading…
Reference in New Issue
Block a user