Page 1 of 1

GL_CLEAR_BMP

Posted: Fri Jul 09, 2010 3:21 pm
by yatagarasu
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.

Re: GL_CLEAR_BMP

Posted: Fri Jul 09, 2010 5:16 pm
by zeromus
clear bmp is supported by desmume and nocash

Re: GL_CLEAR_BMP

Posted: Tue Jul 20, 2010 11:47 am
by yatagarasu
Desmume 0.9.5 show no background.

Re: GL_CLEAR_BMP

Posted: Wed Jul 21, 2010 12:30 am
by zeromus
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.