wined3d: Some point sprite fixes.
This commit is contained in:
parent
97b1d0692c
commit
a3854be0b3
|
@ -206,6 +206,7 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
|
|||
GLXFBConfig *cfgs = NULL;
|
||||
GLXContext ctx = NULL, oldCtx;
|
||||
WineD3DContext *ret = NULL;
|
||||
int s;
|
||||
|
||||
TRACE("(%p): Creating a %s context for render target %p\n", This, win ? "onscreen" : "offscreen", target);
|
||||
|
||||
|
@ -368,8 +369,6 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
|
|||
checkGLcall("glEnable(GL_WEIGHT_SUM_UNITY_ARB)");
|
||||
}
|
||||
if(GL_SUPPORT(NV_TEXTURE_SHADER2)) {
|
||||
int s;
|
||||
|
||||
glEnable(GL_TEXTURE_SHADER_NV);
|
||||
checkGLcall("glEnable(GL_TEXTURE_SHADER_NV)");
|
||||
|
||||
|
@ -382,6 +381,13 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
|
|||
checkGLcall("glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, ...\n");
|
||||
}
|
||||
}
|
||||
if(GL_SUPPORT(ARB_POINT_SPRITE)) {
|
||||
for(s = 0; s < GL_LIMITS(textures); s++) {
|
||||
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + s));
|
||||
glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);
|
||||
checkGLcall("glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)\n");
|
||||
}
|
||||
}
|
||||
|
||||
if(oldDrawable && oldCtx) {
|
||||
glXMakeCurrent(display, oldDrawable, oldCtx);
|
||||
|
|
|
@ -1315,9 +1315,6 @@ static void state_lastpixel(DWORD state, IWineD3DStateBlockImpl *stateblock, Win
|
|||
}
|
||||
|
||||
static void state_pointsprite(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
|
||||
unsigned int i;
|
||||
int val;
|
||||
|
||||
/* TODO: NV_POINT_SPRITE */
|
||||
if (!GL_SUPPORT(ARB_POINT_SPRITE)) {
|
||||
TRACE("Point sprites not supported\n");
|
||||
|
@ -1325,26 +1322,11 @@ static void state_pointsprite(DWORD state, IWineD3DStateBlockImpl *stateblock, W
|
|||
}
|
||||
|
||||
if (stateblock->renderState[WINED3DRS_POINTSPRITEENABLE]) {
|
||||
val = GL_TRUE;
|
||||
glEnable(GL_POINT_SPRITE_ARB);
|
||||
checkGLcall("glEnable(GL_POINT_SPRITE_ARB)\n");
|
||||
} else {
|
||||
val = GL_FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < GL_LIMITS(textures); i++) {
|
||||
/* Note the WINED3DRS value applies to all textures, but GL has one
|
||||
* per texture, so apply it now ready to be used!
|
||||
*/
|
||||
if (GL_SUPPORT(ARB_MULTITEXTURE)) {
|
||||
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i));
|
||||
checkGLcall("glActiveTextureARB");
|
||||
} else if (i==1) {
|
||||
FIXME("Program using multiple concurrent textures which this opengl implementation doesn't support\n");
|
||||
break;
|
||||
}
|
||||
|
||||
glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, val);
|
||||
checkGLcall((val?"glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE)":
|
||||
"glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_FALSE)"));
|
||||
glDisable(GL_POINT_SPRITE_ARB);
|
||||
checkGLcall("glDisable(GL_POINT_SPRITE_ARB)\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue