GL_CLEAR_BMP
Posted: 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.
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.