Explorar el Código

fix release build-break

georges hace 25 años
padre
commit
a04bba01d4
Se han modificado 1 ficheros con 13 adiciones y 5 borrados
  1. 13 5
      panda/src/dxgsg/dxTextureContext.cxx

+ 13 - 5
panda/src/dxgsg/dxTextureContext.cxx

@@ -760,7 +760,8 @@ CreateTexture( HDC PrimaryDC, LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts,
           delete pnmi;
           delete pnmi;
     }
     }
 
 
-#if 1
+#if 0
+//#ifdef _DEBUG
 // use dxcapsviewer
 // use dxcapsviewer
     { static BOOL bPrinted=FALSE;
     { static BOOL bPrinted=FALSE;
        if(!bPrinted) {
        if(!bPrinted) {
@@ -921,7 +922,11 @@ CreateTexture( HDC PrimaryDC, LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts,
 
 
        if(ddsd.ddpfPixelFormat.dwFlags & DDPF_LUMINANCE) {
        if(ddsd.ddpfPixelFormat.dwFlags & DDPF_LUMINANCE) {
            // look for native lum fmt
            // look for native lum fmt
-         if(!dx_force_16bpptextures) {
+       #ifdef _DEBUG
+         if(!dx_force_16bpptextures) 
+       #endif
+          {
+
            for(i=0,pCurPixFmt=&pTexPixFmts[cNumTexPixFmts-1];i<cNumTexPixFmts;i++,pCurPixFmt--) {
            for(i=0,pCurPixFmt=&pTexPixFmts[cNumTexPixFmts-1];i<cNumTexPixFmts;i++,pCurPixFmt--) {
                if((pCurPixFmt->dwRGBBitCount==16) && (pCurPixFmt->dwFlags & DDPF_ALPHAPIXELS) &&
                if((pCurPixFmt->dwRGBBitCount==16) && (pCurPixFmt->dwFlags & DDPF_ALPHAPIXELS) &&
                   (pCurPixFmt->dwFlags & DDPF_LUMINANCE)) {
                   (pCurPixFmt->dwFlags & DDPF_LUMINANCE)) {
@@ -1021,8 +1026,10 @@ CreateTexture( HDC PrimaryDC, LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts,
               // look for native lum fmt
               // look for native lum fmt
 
 
               assert(cNumAlphaBits==0);  // dont handle those other 8bit lum fmts like 4-4, since 16 8-8 is usually supported too
               assert(cNumAlphaBits==0);  // dont handle those other 8bit lum fmts like 4-4, since 16 8-8 is usually supported too
-
-             if(!dx_force_16bpptextures) {
+            #ifdef _DEBUG
+             if(!dx_force_16bpptextures) 
+            #endif
+             {
               for(i=0,pCurPixFmt=&pTexPixFmts[cNumTexPixFmts-1];i<cNumTexPixFmts;i++,pCurPixFmt--) {
               for(i=0,pCurPixFmt=&pTexPixFmts[cNumTexPixFmts-1];i<cNumTexPixFmts;i++,pCurPixFmt--) {
                   if((pCurPixFmt->dwRGBBitCount==8) && (pCurPixFmt->dwFlags & DDPF_LUMINANCE) &&
                   if((pCurPixFmt->dwRGBBitCount==8) && (pCurPixFmt->dwFlags & DDPF_LUMINANCE) &&
                      (pCurPixFmt->dwLuminanceBitMask=0xFF)) {
                      (pCurPixFmt->dwLuminanceBitMask=0xFF)) {
@@ -1165,8 +1172,9 @@ CreateTexture( HDC PrimaryDC, LPDIRECT3DDEVICE7 pd3dDevice, int cNumTexPixFmts,
         aniso_degree=_tex->get_anisotropic_degree();
         aniso_degree=_tex->get_anisotropic_degree();
         if((aniso_degree>devDesc.dwMaxAnisotropy) 
         if((aniso_degree>devDesc.dwMaxAnisotropy) 
 #ifdef _DEBUG
 #ifdef _DEBUG
-           || dx_force_anisotropic_filtering) 
+           || dx_force_anisotropic_filtering
 #endif
 #endif
+          )
              aniso_degree=devDesc.dwMaxAnisotropy;
              aniso_degree=devDesc.dwMaxAnisotropy;
     } 
     } 
     _tex->set_anisotropic_degree(aniso_degree);
     _tex->set_anisotropic_degree(aniso_degree);