Add DotProduct3 support if supported by opengl.

This commit is contained in:
Jason Edmeades 2003-04-19 20:30:58 +00:00 committed by Alexandre Julliard
parent 2e9f3d844c
commit 55e85807f8
3 changed files with 12 additions and 3 deletions

View File

@ -266,6 +266,7 @@ struct IDirect3DDevice8Impl
/* OpenGL Extension related */
BOOL isMultiTexture;
BOOL isDot3;
UINT TextureUnits;
UINT clipPlanes;
UINT maxLights;

View File

@ -3409,9 +3409,13 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
break;
case D3DTOP_DOTPRODUCT3 :
/*glTexEnvi(GL_TEXTURE_ENV, Parm, GL_DOT3_RGBA);
if (This->isDot3) {
glTexEnvi(GL_TEXTURE_ENV, Parm, GL_DOT3_RGBA);
checkGLcall("glTexEnvi(GL_TEXTURE_ENV, comb_target, GL_DOT3_RGBA);");
break;*/
} else {
FIXME("DotProduct3 extension requested but not supported via this version of opengl\n");
}
break;
case D3DTOP_SUBTRACT :
/* glTexEnvi(GL_TEXTURE_ENV, Parm, GL_SUBTRACT); Missing? */

View File

@ -573,6 +573,7 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
/* Initialize openGL extension related variables */
object->isMultiTexture = FALSE;
object->isDot3 = FALSE;
object->TextureUnits = 1;
/* Retrieve opengl defaults */
@ -607,6 +608,9 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
object->isMultiTexture = TRUE;
object->TextureUnits = min(8, gl_max);
TRACE("FOUND: Multitexture support - GL_MAX_TEXTURE_UNITS_ARB=%d\n", gl_max);
} else if (strcmp(ThisExtn, "GL_EXT_texture_env_dot3") == 0) {
object->isDot3 = TRUE;
TRACE("FOUND: Dot3 support\n");
}
if (*GL_Extensions == ' ') GL_Extensions++;