DXGL r382 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r381
|
r382
|
r383
>
Date:
21:37, 9 June 2013
Author:
admin
Status:
new
Tags:
Comment:
Use EXT_direct_state_access to set texture filters.
Allow IDirectDraw7::EnumDisplayModes to omit lpDDSurfaceDesc2
Modified paths:
/ddraw/glDirectDraw.cpp
(modified) (
history
)
/ddraw/glDirectDrawSurface.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirectDraw.cpp
—
—
@@ -856,7 +856,6 @@
857
857
{
858
858
TRACE_ENTER(5,14,this,9,dwFlags,14,lpDDSurfaceDesc2,14,lpContext,14,lpEnumModesCallback);
859
859
if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
860
- if(!lpDDSurfaceDesc2) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
861
860
if(!lpEnumModesCallback) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
862
861
HRESULT ret = ::EnumDisplayModes(dwFlags,lpDDSurfaceDesc2,lpContext,lpEnumModesCallback);
863
862
TRACE_EXIT(23,ret);
Index: ddraw/glDirectDrawSurface.cpp
—
—
@@ -1409,18 +1409,19 @@
1410
1410
min = GL_LINEAR_MIPMAP_LINEAR;
1411
1411
break;
1412
1412
}
1413
- //if((magfilter != mag) || (minfilter != min))
1414
- ::SetTexture(level,texture);
1415
- //if(magfilter != mag)
1416
- //{
1413
+ if(GLEXT_EXT_direct_state_access)
1414
+ {
1415
+ glTextureParameteriEXT(texture->id,GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,mag);
1416
+ glTextureParameteriEXT(texture->id,GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,min);
1417
+ }
1418
+ else
1419
+ {
1420
+ ::SetTexture(level,texture);
1417
1421
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,mag);
1418
- magfilter = mag;
1419
- //}
1420
- //if(minfilter != min)
1421
- //{
1422
1422
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,min);
1423
- minfilter = min;
1424
- //}
1423
+ }
1424
+ magfilter = mag;
1425
+ minfilter = min;
1425
1426
TRACE_EXIT(0,0);
1426
1427
}
1427
1428
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version