I apologize if this isn't the right place for this. I'm really hoping someone can help.
I've been pouring over the devkitpro forums, the devkitpro examples, the source code for Citro2d and Citro3d, and just all this stuff for days now, trying to solve what seem to be basic problems with some 3DS homebrew I'm trying to make.
The biggest question I have right now is: using Citro2D, how do I "clear" a rectangle on a texture? I'm drawing shapes using the commands such as C2D_DrawRectSolid, etc, and all that stuff works, but all the Citro2D commands appear to be additive blending / compositing. I need to be able to draw a fully transparent rectangle and have it overwrite whatever is on the texture rather than adding on top of it, to create an "erased" section. Note: I don't mean erase the whole texture, just a portion of it. If there wasn't swizzling and whatever else making the texture format in memory awful to work with, I'd just memcopy the rectangle of 0's into the raw data.
Assume I already have all the code set up for creating a vram texture, creating a target to draw into, the screen initialization, and system loop etc. I can provide some example code if needed, but really I just want to know "If I'm at the point where I can draw a rectangle on screen, how do I draw that rectangle as a full replacement, including the alpha channel, rather than blended with whatever is there".
If there's anyone here who has experience with these things, I do have more questions pertaining to weird quirks with off-screen textures/etc. It's just this one thing is completely stopping me from moving forward, and I've been sifting through the citro2d/3d library source code for days now and I'm so tired.
I've been pouring over the devkitpro forums, the devkitpro examples, the source code for Citro2d and Citro3d, and just all this stuff for days now, trying to solve what seem to be basic problems with some 3DS homebrew I'm trying to make.
The biggest question I have right now is: using Citro2D, how do I "clear" a rectangle on a texture? I'm drawing shapes using the commands such as C2D_DrawRectSolid, etc, and all that stuff works, but all the Citro2D commands appear to be additive blending / compositing. I need to be able to draw a fully transparent rectangle and have it overwrite whatever is on the texture rather than adding on top of it, to create an "erased" section. Note: I don't mean erase the whole texture, just a portion of it. If there wasn't swizzling and whatever else making the texture format in memory awful to work with, I'd just memcopy the rectangle of 0's into the raw data.
Assume I already have all the code set up for creating a vram texture, creating a target to draw into, the screen initialization, and system loop etc. I can provide some example code if needed, but really I just want to know "If I'm at the point where I can draw a rectangle on screen, how do I draw that rectangle as a full replacement, including the alpha channel, rather than blended with whatever is there".
If there's anyone here who has experience with these things, I do have more questions pertaining to weird quirks with off-screen textures/etc. It's just this one thing is completely stopping me from moving forward, and I've been sifting through the citro2d/3d library source code for days now and I'm so tired.