Index: basetexture.c =================================================================== RCS file: /home/wine/wine/dlls/d3d8/basetexture.c,v retrieving revision 1.4 diff -u -r1.4 basetexture.c --- basetexture.c 12 Apr 2003 00:06:43 -0000 1.4 +++ basetexture.c 6 May 2003 20:19:47 -0000 @@ -100,7 +100,7 @@ } D3DRESOURCETYPE WINAPI IDirect3DBaseTexture8Impl_GetType(LPDIRECT3DBASETEXTURE8 iface) { ICOM_THIS(IDirect3DBaseTexture8Impl,iface); - TRACE("(%p) : returning %d\n", This, This->ResourceType); + /*TRACE("(%p) : returning %d\n", This, This->ResourceType);*/ return This->ResourceType; } Index: d3d8_private.h =================================================================== RCS file: /home/wine/wine/dlls/d3d8/d3d8_private.h,v retrieving revision 1.21 diff -u -r1.21 d3d8_private.h --- d3d8_private.h 6 May 2003 00:15:49 -0000 1.21 +++ d3d8_private.h 6 May 2003 20:20:23 -0000 @@ -142,6 +142,15 @@ TRACE("%s call ok %s / %d\n", A, __FILE__, __LINE__); \ } \ } +#define vcheckGLcall(A) \ +{ \ + GLint err = glGetError(); \ + if (err != GL_NO_ERROR) { \ + FIXME(">>>>>>>>>>>>>>>>> %x from %s @ %s / %d\n", err, A, __FILE__, __LINE__); \ + } else { \ + VTRACE(("%s call ok %s / %d\n", A, __FILE__, __LINE__)); \ + } \ +} #define checkGLSupport(ExtName) FALSE/*(TRUE == This->direct3d8->glInfo.supported[ExtName])*/ #define GLExtCall(FuncName) /*(This->direct3d8->glInfo.FuncName)*/ Index: device.c =================================================================== RCS file: /home/wine/wine/dlls/d3d8/device.c,v retrieving revision 1.45 diff -u -r1.45 device.c --- device.c 6 May 2003 00:19:11 -0000 1.45 +++ device.c 6 May 2003 20:21:47 -0000 @@ -3312,17 +3312,16 @@ } /* Make appropriate texture active */ - TRACE("Activating appropriate texture state %ld\n", Stage); + VTRACE(("Activating appropriate texture state %ld\n", Stage)); if (This->isMultiTexture) { #if defined(GL_VERSION_1_3) glActiveTexture(GL_TEXTURE0 + Stage); - checkGLcall("glActiveTexture"); + vcheckGLcall("glActiveTexture"); #else glActiveTextureARB(GL_TEXTURE0_ARB + Stage); - checkGLcall("glActiveTextureARB"); + vcheckGLcall("glActiveTextureARB"); #endif - - } else if (Stage>0) { + } else if (Stage > 0) { FIXME("Program using multiple concurrent textures which this opengl implementation doesnt support\n"); } @@ -3458,15 +3457,15 @@ if (isAlphaArg) { TRACE("Source %x = %x, Operand %x = %x\n", SOURCEx_ALPHA_EXT(Type), source, OPERANDx_ALPHA_EXT(Type), operand); glTexEnvi(GL_TEXTURE_ENV, SOURCEx_ALPHA_EXT(Type), source); - checkGLcall("glTexEnvi(GL_TEXTURE_ENV, SOURCEx_ALPHA_EXT, source);"); + vcheckGLcall("glTexEnvi(GL_TEXTURE_ENV, SOURCEx_ALPHA_EXT, source);"); glTexEnvi(GL_TEXTURE_ENV, OPERANDx_ALPHA_EXT(Type), operand); - checkGLcall("glTexEnvi(GL_TEXTURE_ENV, OPERANDx_ALPHA_EXT, operand);"); + vcheckGLcall("glTexEnvi(GL_TEXTURE_ENV, OPERANDx_ALPHA_EXT, operand);"); } else { TRACE("Source %x = %x, Operand %x = %x\n", SOURCEx_RGB_EXT(Type), source, OPERANDx_RGB_EXT(Type), operand); glTexEnvi(GL_TEXTURE_ENV, SOURCEx_RGB_EXT(Type), source); - checkGLcall("glTexEnvi(GL_TEXTURE_ENV, SOURCEx_RGB_EXT, source);"); + vcheckGLcall("glTexEnvi(GL_TEXTURE_ENV, SOURCEx_RGB_EXT, source);"); glTexEnvi(GL_TEXTURE_ENV, OPERANDx_RGB_EXT(Type), operand); - checkGLcall("glTexEnvi(GL_TEXTURE_ENV, OPERANDx_RGB_EXT, operand);"); + vcheckGLcall("glTexEnvi(GL_TEXTURE_ENV, OPERANDx_RGB_EXT, operand);"); } } break; @@ -3476,9 +3475,9 @@ { int Scale = 1; - int Parm = (Type == D3DTSS_ALPHAOP)? GL_COMBINE_ALPHA_EXT : GL_COMBINE_RGB_EXT; + int Parm = (Type == D3DTSS_ALPHAOP) ? GL_COMBINE_ALPHA_EXT : GL_COMBINE_RGB_EXT; - if (Type==D3DTSS_COLOROP && Value == D3DTOP_DISABLE) { + if (Type == D3DTSS_COLOROP && Value == D3DTOP_DISABLE) { /* TODO: Disable by making this and all later levels disabled */ glDisable(GL_TEXTURE_1D); checkGLcall("Disable GL_TEXTURE_1D"); @@ -3489,7 +3488,7 @@ } else { /* Enable only the appropriate texture dimension */ - if (Type==D3DTSS_COLOROP) { + if (Type == D3DTSS_COLOROP) { if (This->StateBlock->textureDimensions[Stage] == GL_TEXTURE_1D) { glEnable(GL_TEXTURE_1D); checkGLcall("Enable GL_TEXTURE_1D"); @@ -3538,10 +3537,10 @@ /* Correct scale */ if (Type == D3DTSS_ALPHAOP) { glTexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE, Scale); - checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE, Scale)"); + vcheckGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE, Scale)"); } else { glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, Scale); - checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, Scale)"); + vcheckGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, Scale)"); } glTexEnvi(GL_TEXTURE_ENV, Parm, GL_MODULATE); checkGLcall("glTexEnvi(GL_TEXTURE_ENV, Parm, GL_MODULATE);"); @@ -3549,13 +3548,13 @@ case D3DTOP_ADD : glTexEnvi(GL_TEXTURE_ENV, Parm, GL_ADD); - checkGLcall("glTexEnvi(GL_TEXTURE_ENV, Parm, GL_ADD)"); + vcheckGLcall("glTexEnvi(GL_TEXTURE_ENV, Parm, GL_ADD)"); break; case D3DTOP_ADDSIGNED2X : Scale = Scale * 2; /* Drop through */ case D3DTOP_ADDSIGNED : glTexEnvi(GL_TEXTURE_ENV, Parm, GL_ADD_SIGNED_EXT); - checkGLcall("glTexEnvi(GL_TEXTURE_ENV, Parm, GL_ADD_SIGNED_EXT)"); + vcheckGLcall("glTexEnvi(GL_TEXTURE_ENV, Parm, GL_ADD_SIGNED_EXT)"); break; case D3DTOP_DOTPRODUCT3 : Index: directx.c =================================================================== RCS file: /home/wine/wine/dlls/d3d8/directx.c,v retrieving revision 1.26 diff -u -r1.26 directx.c --- directx.c 22 Apr 2003 04:05:08 -0000 1.26 +++ directx.c 6 May 2003 20:22:00 -0000 @@ -335,8 +335,15 @@ pCaps->LineCaps = D3DLINECAPS_TEXTURE | D3DLINECAPS_ZTEST; - pCaps->MaxTextureWidth = 16384; - pCaps->MaxTextureHeight = 16384; + /*pCaps->MaxTextureWidth = 16384; + pCaps->MaxTextureHeight = 16384;*/ + { + GLint gl_tex_size; + glGetIntegerv(GL_MAX_TEXTURE_SIZE, &gl_tex_size); + pCaps->MaxTextureWidth = gl_tex_size; + pCaps->MaxTextureHeight = gl_tex_size; + } + pCaps->MaxVolumeExtent = 0; pCaps->MaxTextureRepeat = 32768; @@ -371,8 +378,11 @@ { GLint gl_max; - +#if defined(GL_VERSION_1_3) + glGetIntegerv(GL_MAX_TEXTURE_UNITS, &gl_max); +#else glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max); +#endif TRACE("GLCaps: GL_MAX_TEXTURE_UNITS_ARB=%d\n", gl_max); pCaps->MaxTextureBlendStages = min(8, gl_max); pCaps->MaxSimultaneousTextures = min(8, gl_max);