From 7c26d8e68d85e5dc41e18cd5fd16e1a765f8f956 Mon Sep 17 00:00:00 2001 From: Lectem Date: Sat, 16 May 2015 21:43:34 +0200 Subject: [PATCH 1/2] added missing texenv op --- libctru/include/3ds/gpu/gpu.h | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/libctru/include/3ds/gpu/gpu.h b/libctru/include/3ds/gpu/gpu.h index 8d59c4d..18fdd49 100644 --- a/libctru/include/3ds/gpu/gpu.h +++ b/libctru/include/3ds/gpu/gpu.h @@ -173,6 +173,9 @@ typedef enum{ #define GPU_ATTRIBFMT(i, n, f) (((((n)-1)<<2)|((f)&3))<<((i)*4)) +/** +* Texture combiners sources +*/ typedef enum{ GPU_PRIMARY_COLOR = 0x00, GPU_TEXTURE0 = 0x03, @@ -183,6 +186,43 @@ typedef enum{ GPU_PREVIOUS = 0x0F, }GPU_TEVSRC; +/** +* Texture RGB combiners operands +*/ +typedef enum{ + GL_TEVOP_RGB_SRC_COLOR = 0x00, + GL_TEVOP_RGB_ONE_MINUS_SRC_COLOR = 0x01, + GL_TEVOP_RGB_SRC_ALPHA = 0x02, + GL_TEVOP_RGB_ONE_MINUS_SRC_ALPHA = 0x03, + GL_TEVOP_RGB_SRC0_RGB = 0x04, + GL_TEVOP_RGB_0x05 = 0x05, + GL_TEVOP_RGB_0x06 = 0x06, + GL_TEVOP_RGB_0x07 = 0x07, + GL_TEVOP_RGB_SRC1_RGB = 0x08, + GL_TEVOP_RGB_0x09 = 0x09, + GL_TEVOP_RGB_0x0A = 0x0A, + GL_TEVOP_RGB_0x0B = 0x0B, + GL_TEVOP_RGB_SRC2_RGB = 0x0C, + GL_TEVOP_RGB_0x0D = 0x0D, + GL_TEVOP_RGB_0x0E = 0x0E, + GL_TEVOP_RGB_0x0F = 0x0F, +}GPU_TEVOP_RGB; + + +/** +* Texture ALPHA combiners operands +*/ +typedef enum{ + GL_TEVOP_A_SRC_ALPHA = 0x00, + GL_TEVOP_A_ONE_MINUS_SRC_ALPHA = 0x01, + GL_TEVOP_A_SRC0_RGB = 0x02, + GL_TEVOP_A_SRC1_RGB = 0x04, + GL_TEVOP_A_SRC2_RGB = 0x06, +}GPU_TEVOP_A; + +/** +* Texture combiner functions +*/ typedef enum{ GPU_REPLACE = 0x00, GPU_MODULATE = 0x01, From 53b03ef6c5cdb8a2f416b9b764f9327a99e10405 Mon Sep 17 00:00:00 2001 From: Lectem Date: Sat, 16 May 2015 21:53:10 +0200 Subject: [PATCH 2/2] use GPU prefix instead of GL --- libctru/include/3ds/gpu/gpu.h | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/libctru/include/3ds/gpu/gpu.h b/libctru/include/3ds/gpu/gpu.h index 18fdd49..1d79138 100644 --- a/libctru/include/3ds/gpu/gpu.h +++ b/libctru/include/3ds/gpu/gpu.h @@ -190,22 +190,22 @@ typedef enum{ * Texture RGB combiners operands */ typedef enum{ - GL_TEVOP_RGB_SRC_COLOR = 0x00, - GL_TEVOP_RGB_ONE_MINUS_SRC_COLOR = 0x01, - GL_TEVOP_RGB_SRC_ALPHA = 0x02, - GL_TEVOP_RGB_ONE_MINUS_SRC_ALPHA = 0x03, - GL_TEVOP_RGB_SRC0_RGB = 0x04, - GL_TEVOP_RGB_0x05 = 0x05, - GL_TEVOP_RGB_0x06 = 0x06, - GL_TEVOP_RGB_0x07 = 0x07, - GL_TEVOP_RGB_SRC1_RGB = 0x08, - GL_TEVOP_RGB_0x09 = 0x09, - GL_TEVOP_RGB_0x0A = 0x0A, - GL_TEVOP_RGB_0x0B = 0x0B, - GL_TEVOP_RGB_SRC2_RGB = 0x0C, - GL_TEVOP_RGB_0x0D = 0x0D, - GL_TEVOP_RGB_0x0E = 0x0E, - GL_TEVOP_RGB_0x0F = 0x0F, + GPU_TEVOP_RGB_SRC_COLOR = 0x00, + GPU_TEVOP_RGB_ONE_MINUS_SRC_COLOR = 0x01, + GPU_TEVOP_RGB_SRC_ALPHA = 0x02, + GPU_TEVOP_RGB_ONE_MINUS_SRC_ALPHA = 0x03, + GPU_TEVOP_RGB_SRC0_RGB = 0x04, + GPU_TEVOP_RGB_0x05 = 0x05, + GPU_TEVOP_RGB_0x06 = 0x06, + GPU_TEVOP_RGB_0x07 = 0x07, + GPU_TEVOP_RGB_SRC1_RGB = 0x08, + GPU_TEVOP_RGB_0x09 = 0x09, + GPU_TEVOP_RGB_0x0A = 0x0A, + GPU_TEVOP_RGB_0x0B = 0x0B, + GPU_TEVOP_RGB_SRC2_RGB = 0x0C, + GPU_TEVOP_RGB_0x0D = 0x0D, + GPU_TEVOP_RGB_0x0E = 0x0E, + GPU_TEVOP_RGB_0x0F = 0x0F, }GPU_TEVOP_RGB; @@ -213,11 +213,11 @@ typedef enum{ * Texture ALPHA combiners operands */ typedef enum{ - GL_TEVOP_A_SRC_ALPHA = 0x00, - GL_TEVOP_A_ONE_MINUS_SRC_ALPHA = 0x01, - GL_TEVOP_A_SRC0_RGB = 0x02, - GL_TEVOP_A_SRC1_RGB = 0x04, - GL_TEVOP_A_SRC2_RGB = 0x06, + GPU_TEVOP_A_SRC_ALPHA = 0x00, + GPU_TEVOP_A_ONE_MINUS_SRC_ALPHA = 0x01, + GPU_TEVOP_A_SRC0_RGB = 0x02, + GPU_TEVOP_A_SRC1_RGB = 0x04, + GPU_TEVOP_A_SRC2_RGB = 0x06, }GPU_TEVOP_A; /**