#69720 - Extreme Coder - Wed Feb 01, 2006 2:57 pm
Hello.
I was trying to use the 2d (tiles+pals+sprites), with the 3d OGL hardware on the same screen. But only the 3d stuff appears. Here's the code I do for initalizing:
I tried different priorites, btw.
Thanx for the help in Advance.
I was trying to use the 2d (tiles+pals+sprites), with the 3d OGL hardware on the same screen. But only the 3d stuff appears. Here's the code I do for initalizing:
Code: |
// Turn on everything powerON(POWER_ALL); // Setup the Main screen for 3D videoSetMode(MODE_0_3D|DISPLAY_BG1_ACTIVE); vramSetBankA(VRAM_A_TEXTURE); //NEW must set up some memory for textures vramSetBankB(VRAM_B_TEXTURE); //NEW must set up some memory //vramSetBankC(VRAM_C_TEXTURE); //NEW must set up some memory vramSetBankC(VRAM_C_MAIN_BG); //gluLookAt(10.0f, 8.0f, 20.0f, 10.0f, 8.0f, 0.0f, 0.0f, 1.0f, 0.0f); BG0_CR |= BG_PRIORITY(1); BG1_CR = BG_MAP_BASE(31)|BG_PRIORITY(0); BG_PALETTE[255] = RGB15(31,31,31); //by default font will be rendered with color 255 //consoleInit() is a lot more flexible but this gets you up and running quick consoleInitDefault((u16*)SCREEN_BASE_BLOCK(31), (u16*)CHAR_BASE_BLOCK(0), 16); // IRQ basic setup irqInit(); irqSet(IRQ_VBLANK, 0); // Set our viewport to be the same size as the screen glViewPort(0,0,255,191); // Specify the Clear Color and Depth glClearColor(0,0,0); glClearDepth(0x7FFF); |
I tried different priorites, btw.
Thanx for the help in Advance.