depth_component support to dxgsg

This commit is contained in:
rdb 2009-01-31 18:36:23 +00:00
parent 4afcd201a2
commit 454dca9dfe
3 changed files with 5 additions and 0 deletions

View File

@ -256,6 +256,7 @@ rebuild_bitplanes() {
for (int i=0; i<count_textures(); i++) {
if (get_rtm_mode(i) == RTM_bind_or_copy) {
if ((get_texture(i)->get_format() != Texture::F_depth_stencil)&&
(get_texture(i)->get_format() != Texture::F_depth_component)&&
(color_tex_index < 0)) {
color_tex_index = i;
} else {
@ -420,6 +421,7 @@ select_cube_map(int cube_map_index) {
for (int i=0; i<count_textures(); i++) {
if (get_rtm_mode(i) == RTM_bind_or_copy) {
if ((get_texture(i)->get_format() != Texture::F_depth_stencil)&&
(get_texture(i)->get_format() != Texture::F_depth_component)&&
(color_tex_index < 0)) {
color_tex_index = i;
} else {

View File

@ -2127,6 +2127,8 @@ get_bits_per_pixel(Texture::Format format, int *alphbits) {
case Texture::F_rgba5:
*alphbits = 1;
return 16;
case Texture::F_depth_component:
return 16;
case Texture::F_depth_stencil:
return 32;
case Texture::F_rgb5:

View File

@ -594,6 +594,7 @@ select_cube_map(int cube_map_index) {
for (int i=0; i<count_textures(); i++) {
if (get_rtm_mode(i) == RTM_bind_or_copy) {
if ((get_texture(i)->get_format() != Texture::F_depth_stencil)&&
(get_texture(i)->get_format() != Texture::F_depth_component)&&
(color_tex_index < 0)) {
color_tex_index = i;
} else {