Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
f81103a6
Commit
f81103a6
authored
Nov 09, 2011
by
daniel@transgaming.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
maxLevels is always 0.
TRAC #18714 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id:
https://angleproject.googlecode.com/svn/trunk@842
736b8ea6-26fd-11df-bfd4-992fa37f6226
parent
4163405e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
Texture.cpp
src/libGLESv2/Texture.cpp
+6
-6
Texture.h
src/libGLESv2/Texture.h
+2
-2
No files found.
src/libGLESv2/Texture.cpp
View file @
f81103a6
...
...
@@ -1480,11 +1480,11 @@ unsigned int Texture::getSerial() const
return
mSerial
;
}
GLint
Texture
::
creationLevels
(
GLsizei
width
,
GLsizei
height
,
GLint
maxlevel
)
const
GLint
Texture
::
creationLevels
(
GLsizei
width
,
GLsizei
height
)
const
{
if
((
isPow2
(
width
)
&&
isPow2
(
height
))
||
getContext
()
->
supportsNonPower2Texture
())
{
return
maxlevel
;
return
0
;
// Maximum number of levels
}
else
{
...
...
@@ -1493,9 +1493,9 @@ GLint Texture::creationLevels(GLsizei width, GLsizei height, GLint maxlevel) con
}
}
GLint
Texture
::
creationLevels
(
GLsizei
size
,
GLint
maxlevel
)
const
GLint
Texture
::
creationLevels
(
GLsizei
size
)
const
{
return
creationLevels
(
size
,
size
,
maxlevel
);
return
creationLevels
(
size
,
size
);
}
int
Texture
::
levelCount
()
const
...
...
@@ -1887,7 +1887,7 @@ void Texture2D::createTexture()
{
IDirect3DDevice9
*
device
=
getDevice
();
D3DFORMAT
format
=
mImageArray
[
0
].
getD3DFormat
();
GLint
levels
=
creationLevels
(
mImageArray
[
0
].
getWidth
(),
mImageArray
[
0
].
getHeight
()
,
0
);
GLint
levels
=
creationLevels
(
mImageArray
[
0
].
getWidth
(),
mImageArray
[
0
].
getHeight
());
IDirect3DTexture9
*
texture
=
NULL
;
HRESULT
result
=
device
->
CreateTexture
(
mImageArray
[
0
].
getWidth
(),
mImageArray
[
0
].
getHeight
(),
levels
,
0
,
format
,
D3DPOOL_DEFAULT
,
&
texture
,
NULL
);
...
...
@@ -1934,7 +1934,7 @@ void Texture2D::convertToRenderTarget()
egl
::
Display
*
display
=
getDisplay
();
IDirect3DDevice9
*
device
=
getDevice
();
D3DFORMAT
format
=
mImageArray
[
0
].
getD3DFormat
();
GLint
levels
=
creationLevels
(
mImageArray
[
0
].
getWidth
(),
mImageArray
[
0
].
getHeight
()
,
0
);
GLint
levels
=
creationLevels
(
mImageArray
[
0
].
getWidth
(),
mImageArray
[
0
].
getHeight
());
HRESULT
result
=
device
->
CreateTexture
(
mImageArray
[
0
].
getWidth
(),
mImageArray
[
0
].
getHeight
(),
levels
,
D3DUSAGE_RENDERTARGET
,
format
,
D3DPOOL_DEFAULT
,
&
texture
,
NULL
);
...
...
src/libGLESv2/Texture.h
View file @
f81103a6
...
...
@@ -184,8 +184,8 @@ class Texture : public RefCountObject
void
setCompressedImage
(
GLsizei
imageSize
,
const
void
*
pixels
,
Image
*
image
);
bool
subImageCompressed
(
GLint
xoffset
,
GLint
yoffset
,
GLsizei
width
,
GLsizei
height
,
GLenum
format
,
GLsizei
imageSize
,
const
void
*
pixels
,
Image
*
image
);
GLint
creationLevels
(
GLsizei
width
,
GLsizei
height
,
GLint
maxlevel
)
const
;
GLint
creationLevels
(
GLsizei
size
,
GLint
maxlevel
)
const
;
GLint
creationLevels
(
GLsizei
width
,
GLsizei
height
)
const
;
GLint
creationLevels
(
GLsizei
size
)
const
;
virtual
IDirect3DBaseTexture9
*
getBaseTexture
()
const
=
0
;
virtual
void
createTexture
()
=
0
;
...
...
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