Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d09cbcec
Commit
d09cbcec
authored
Nov 28, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Activate GL_ARB_texture_rectangle.
parent
8964336b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
+24
-5
device.c
dlls/wined3d/device.c
+14
-4
surface.c
dlls/wined3d/surface.c
+8
-0
texture.c
dlls/wined3d/texture.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/device.c
View file @
d09cbcec
...
...
@@ -891,10 +891,20 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateTexture(IWineD3DDevice *iface, U
/** FIXME: add support for real non-power-two if it's provided by the video card **/
/* Precalculated scaling for 'faked' non power of two texture coords */
object
->
baseTexture
.
pow2Matrix
[
0
]
=
(((
float
)
Width
)
/
((
float
)
pow2Width
));
object
->
baseTexture
.
pow2Matrix
[
5
]
=
(((
float
)
Height
)
/
((
float
)
pow2Height
));
object
->
baseTexture
.
pow2Matrix
[
10
]
=
1
.
0
;
object
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
;
if
(
GL_SUPPORT
(
ARB_TEXTURE_RECTANGLE
)
&&
(
Width
!=
pow2Width
||
Height
!=
pow2Height
))
{
object
->
baseTexture
.
pow2Matrix
[
0
]
=
(
float
)
Width
;
object
->
baseTexture
.
pow2Matrix
[
5
]
=
(
float
)
Height
;
object
->
baseTexture
.
pow2Matrix
[
10
]
=
1
.
0
;
object
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
;
object
->
target
=
GL_TEXTURE_RECTANGLE_ARB
;
}
else
{
object
->
baseTexture
.
pow2Matrix
[
0
]
=
(((
float
)
Width
)
/
((
float
)
pow2Width
));
object
->
baseTexture
.
pow2Matrix
[
5
]
=
(((
float
)
Height
)
/
((
float
)
pow2Height
));
object
->
baseTexture
.
pow2Matrix
[
10
]
=
1
.
0
;
object
->
baseTexture
.
pow2Matrix
[
15
]
=
1
.
0
;
object
->
target
=
GL_TEXTURE_2D
;
}
TRACE
(
" xf(%f) yf(%f)
\n
"
,
object
->
baseTexture
.
pow2Matrix
[
0
],
object
->
baseTexture
.
pow2Matrix
[
5
]);
/* Calculate levels for mip mapping */
...
...
dlls/wined3d/surface.c
View file @
d09cbcec
...
...
@@ -3505,6 +3505,14 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
This
->
glRect
.
right
=
0
;
This
->
glRect
.
bottom
=
0
;
}
else
{
/* Check this after the oversize check - do not make an oversized surface a texture_rectangle one */
if
(
This
->
Flags
&
SFLAG_NONPOW2
&&
GL_SUPPORT
(
ARB_TEXTURE_RECTANGLE
))
{
This
->
glDescription
.
target
=
GL_TEXTURE_RECTANGLE_ARB
;
This
->
pow2Width
=
This
->
currentDesc
.
Width
;
This
->
pow2Height
=
This
->
currentDesc
.
Height
;
This
->
Flags
&=
~
SFLAG_NONPOW2
;
}
/* No oversize, gl rect is the full texture size */
This
->
Flags
&=
~
SFLAG_OVERSIZE
;
This
->
glRect
.
left
=
0
;
...
...
dlls/wined3d/texture.c
View file @
d09cbcec
...
...
@@ -207,7 +207,7 @@ static UINT WINAPI IWineD3DTextureImpl_GetTextureDimensions(IWineD3DTexture *ifa
IWineD3DTextureImpl
*
This
=
(
IWineD3DTextureImpl
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
This
);
return
GL_TEXTURE_2D
;
return
This
->
target
;
}
static
void
WINAPI
IWineD3DTextureImpl_ApplyStateChanges
(
IWineD3DTexture
*
iface
,
...
...
dlls/wined3d/wined3d_private.h
View file @
d09cbcec
...
...
@@ -948,6 +948,7 @@ typedef struct IWineD3DTextureImpl
UINT
width
;
UINT
height
;
UINT
target
;
}
IWineD3DTextureImpl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment