1

The documentation implies that you can either have 3D rendering or framebuffer mode, and each only to the active display. Is there any way to render 3D to one screen and framebuffer to the other?

FeepingCreature
  • 3,648
  • 2
  • 26
  • 25
  • Are we talking 3D to main screen and framebuffer to the sub screen, or are we talking about 3D on one background and framebuffer on the other? If the latter I would like to know too since I want to do motion blur with the FB :) – Skurmedel Jun 23 '09 at 10:30
  • The former would be plenty for me. :) – FeepingCreature Jun 23 '09 at 10:35

2 Answers2

0

Well I've heard that there is display capture functionality that lets you draw 3D on the sub engine (bottom screen) so I looked it up and I found an example.

Sadly the DCAP macros doesn't seem to be documented, so I had a look at the real defines nds/arm9/video.h:

// Display capture control

#define REG_DISPCAPCNT        (*(vu32*)0x04000064)
#define REG_DISP_MMEM_FIFO  (*(vu32*)0x04000068)

#define DCAP_ENABLE    BIT(31)
#define DCAP_MODE(n)   (((n) & 3) << 29)
#define DCAP_DST(n)    (((n) & 3) << 26)
#define DCAP_SRC(n)    (((n) & 3) << 24)
#define DCAP_SIZE(n)   (((n) & 3) << 20)
#define DCAP_OFFSET(n) (((n) & 3) << 18)
#define DCAP_BANK(n)   (((n) & 3) << 16)
#define DCAP_B(n)      (((n) & 0x1F) << 8)
#define DCAP_A(n)      (((n) & 0x1F) << 0)

To my feeble mind it looks like you can capture 3D, draw it on the sub and use the frame buffer on the main if you want to. To be able to use the framebuffer on the sub engine you'll need to swap the screens with lcdSwap().

Skurmedel
  • 21,515
  • 5
  • 53
  • 66
0

Not entirely certain what your need is but utilizing 3D on the main display engine still leaves the entire sub engine to do framebuffer (or any other 2D) type graphics (using an extended rotation background for instance).

If you mean to use the framebuffer mode to capture output from the 3D engine so you can render 3D to both screens then there is an example in the libnds examples folder which does just this:

http://libnds.devkitpro.org/a00035.html

Jason
  • 193
  • 7