Don't try to create HW Vertex Shaders when code is NULL (ie use

default rendering code using VertexShaderDeclaration for datas) as GL
drivers don't like empty programs.
oldstable
Raphael Junqueira 2004-04-23 21:28:02 +00:00 committed by Alexandre Julliard
parent b42da1c51c
commit e4a96cd571
1 changed files with 3 additions and 2 deletions

View File

@ -919,9 +919,10 @@ inline static VOID IDirect3DVertexShaderImpl_ParseProgram(IDirect3DVertexShaderI
}
/* Generate HW shader in needed */
if (useHW)
if (useHW && NULL != pFunction) {
IDirect3DVertexShaderImpl_GenerateProgramArbHW(vshader, pFunction);
}
/* copy the function ... because it will certainly be released by application */
if (NULL != pFunction) {
vshader->function = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, vshader->functionLength);