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.
GL_CLEAR_BMP
-
- Posts: 7
- Joined: Mon Mar 15, 2010 12:16 pm
GL_CLEAR_BMP
- Attachments
-
- 3D_Clear_BMP.rar
- (3.16 KiB) Downloaded 404 times
Re: GL_CLEAR_BMP
clear bmp is supported by desmume and nocash
-
- Posts: 7
- Joined: Mon Mar 15, 2010 12:16 pm
Re: GL_CLEAR_BMP
Desmume 0.9.5 show no background.
Re: GL_CLEAR_BMP
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.
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests