GL_CLEAR_BMP

Post Reply
yatagarasu
Posts: 7
Joined: Mon Mar 15, 2010 12:16 pm

GL_CLEAR_BMP

Post by yatagarasu » Fri Jul 09, 2010 3:21 pm

Always was curious what GL_CLEAR_BMP is for. And how it works.
It was unclear from devkitpro documentation how it can be used. So I decided to do some intelligence work on my own.

GL_CLEAR_BMP can be used to set bitmap background for 3D scene. Bitmap colour image is loaded into VRAM_C. Also there is bitmap depth image, which is loaded into VRAM_D. Color buffer format is A:1 R:5 G:5 B:5, and depth image format is Fog:1 Depth:15.
Bitmaps have dimensions 256х256 and are controlled by 0x04000356 memory address. It holds position of rendering origin in format y:8 X:8

Some nice effects can be achieved by playing with depth buffer.

Simple demo is attached.

Also... clear bmp is not supported by emulator.
Attachments
3D_Clear_BMP.rar
(3.16 KiB) Downloaded 405 times

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: GL_CLEAR_BMP

Post by zeromus » Fri Jul 09, 2010 5:16 pm

clear bmp is supported by desmume and nocash

yatagarasu
Posts: 7
Joined: Mon Mar 15, 2010 12:16 pm

Re: GL_CLEAR_BMP

Post by yatagarasu » Tue Jul 20, 2010 11:47 am

Desmume 0.9.5 show no background.

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: GL_CLEAR_BMP

Post by zeromus » Wed Jul 21, 2010 12:30 am

should try using a non-old version of the emulator. and, when testing advanced 3d functionality (or any 3d functionality for that matter) consider switching to the soft rasterizer which is more accurate.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 0 guests