Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Testicular Slingshot
Alchemy Viewer
Commits
c3d263ec
Commit
c3d263ec
authored
Feb 12, 2020
by
Rye Mutt
🍞
Browse files
Enable npo2 textures for opensim var-region compat sadness
parent
88ad185d
Changes
1
Hide whitespace changes
Inline
Side-by-side
indra/llrender/llimagegl.cpp
View file @
c3d263ec
...
...
@@ -494,12 +494,14 @@ bool LLImageGL::setSize(S32 width, S32 height, S32 ncomponents, S32 discard_leve
{
if
(
width
!=
mWidth
||
height
!=
mHeight
||
ncomponents
!=
mComponents
)
{
#ifdef NO_STUPID
// Check if dimensions are a power of two!
if
(
!
checkSize
(
width
,
height
))
{
LL_WARNS
()
<<
llformat
(
"Texture has non power of two dimension: %dx%d"
,
width
,
height
)
<<
LL_ENDL
;
return
false
;
}
#endif
if
(
mTexName
)
{
...
...
@@ -1248,11 +1250,15 @@ BOOL LLImageGL::createGLTexture(S32 discard_level, const LLImageRaw* imageraw, S
S32
h
=
raw_h
<<
discard_level
;
// setSize may call destroyGLTexture if the size does not match
#ifdef NO_STUPID
if
(
!
setSize
(
w
,
h
,
imageraw
->
getComponents
(),
discard_level
))
{
LL_WARNS
()
<<
"Trying to create a texture with incorrect dimensions!"
<<
LL_ENDL
;
return
FALSE
;
}
#else
setSize
(
w
,
h
,
imageraw
->
getComponents
(),
discard_level
);
#endif
if
(
!
mHasExplicitFormat
)
{
...
...
Write
Preview
Supports
Markdown
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