I want to draw on both screens with citro2d but when I do the bottom screen is very buggy and picture gets duplicated and only the half get drawn.
The top screen works fine
Sorry for my bad english
How can I draw on both Screens with citro2d
Re: How can I draw on both Screens with citro2d
Can you post your code? Without it I can't diagnose or give you advice.
Donate to devkitPro - help us stay alive!
Re: How can I draw on both Screens with citro2d
Never mind I found the problem: consoleInit(GFX_BOTTOM, NULL);
but idk why this was the problem
This was the code
but idk why this was the problem
This was the code
Code: Select all
#include <citro2d.h>
#include <3ds.h>
int main(int argc, char* argv[]) {
gfxInitDefault();
C3D_Init(C3D_DEFAULT_CMDBUF_SIZE);
C2D_Init(C2D_DEFAULT_MAX_OBJECTS);
C2D_Prepare();
consoleInit(GFX_BOTTOM, NULL);
C3D_RenderTarget* bot = C2D_CreateScreenTarget(GFX_BOTTOM, GFX_LEFT);
u32 clear_color = C2D_Color32f(0.0f, 0.0f, 0.0f, 1.0f);
while (aptMainLoop()) {
gspWaitForVBlank();
hidScanInput();
u32 kDown = hidKeysDown();
if (kDown & KEY_SELECT)
break;
C3D_FrameBegin(C3D_FRAME_SYNCDRAW);
C2D_TargetClear(bot, clear_color);
C2D_SceneBegin(bot);
C2D_DrawRectSolid(0, 0, 0, 40, 40, C2D_Color32f(1, 1, 1, 1));
C2D_Flush();
C3D_FrameEnd(0);
}
C2D_Fini();
C3D_Fini();
gfxExit();
return 0;
}
Re: How can I draw on both Screens with citro2d
You were both creating a rendertarget on the bottom screen *and* a console. Put the console on the other screen so that they don't conflict.
When using citro3d/citro2d, you must not use gspWaitForVBlank, as these libs automatically handle screen synchronization.
When using citro3d/citro2d, you must not use gspWaitForVBlank, as these libs automatically handle screen synchronization.
Donate to devkitPro - help us stay alive!
Re: How can I draw on both Screens with citro2d
Is it possible to uninitialize the console, use it for citro2d and back on
Re: How can I draw on both Screens with citro2d
Nope, sorry. The console is really only meant to be used in quick prototype programs that are not interested in setting up proper rendering.
Donate to devkitPro - help us stay alive!
Who is online
Users browsing this forum: No registered users and 1 guest