Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
dcee8501
T
three.js
项目概览
Ablesons
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
dcee8501
编写于
8月 26, 2011
作者:
A
alteredq
浏览文件
操作
浏览文件
下载
差异文件
Merged with rectalogic's texture update fix.
上级
4336d757
ce76a740
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
34 deletion
+7
-34
build/Three.js
build/Three.js
+1
-1
build/custom/ThreeWebGL.js
build/custom/ThreeWebGL.js
+2
-2
src/renderers/WebGLRenderer.js
src/renderers/WebGLRenderer.js
+4
-31
未找到文件。
build/Three.js
浏览文件 @
dcee8501
...
...
@@ -255,7 +255,7 @@ h.length;b<e;b++)if(f=h[b],f.attributes)for(c in f.attributes)f.attributes[c].ne
n
=
t
[
m
].
hash
+
"
_
"
+
t
[
m
].
counter
,
b
.
geometryGroups
[
n
]
==
void
0
&&
(
b
.
geometryGroups
[
n
]
=
{
faces
:[],
materials
:
k
,
vertices
:
0
,
numMorphTargets
:
u
}),
j
=
j
instanceof
THREE
.
Face3
?
3
:
4
,
b
.
geometryGroups
[
n
].
vertices
+
j
>
65535
&&
(
t
[
m
].
counter
+=
1
,
n
=
t
[
m
].
hash
+
"
_
"
+
t
[
m
].
counter
,
b
.
geometryGroups
[
n
]
==
void
0
&&
(
b
.
geometryGroups
[
n
]
=
{
faces
:[],
materials
:
k
,
vertices
:
0
,
numMorphTargets
:
u
})),
b
.
geometryGroups
[
n
].
faces
.
push
(
h
),
b
.
geometryGroups
[
n
].
vertices
+=
j
}
function
J
(
b
,
c
,
e
){
b
.
push
({
buffer
:
c
,
object
:
e
,
opaque
:{
list
:[],
count
:
0
},
transparent
:{
list
:[],
count
:
0
}})}
function
C
(
b
){
if
(
b
!=
fa
){
switch
(
b
){
case
THREE
.
AdditiveBlending
:
m
.
blendEquation
(
m
.
FUNC_ADD
);
m
.
blendFunc
(
m
.
SRC_ALPHA
,
m
.
ONE
);
break
;
case
THREE
.
SubtractiveBlending
:
m
.
blendEquation
(
m
.
FUNC_ADD
);
m
.
blendFunc
(
m
.
ZERO
,
m
.
ONE_MINUS_SRC_COLOR
);
break
;
case
THREE
.
MultiplyBlending
:
m
.
blendEquation
(
m
.
FUNC_ADD
);
m
.
blendFunc
(
m
.
ZERO
,
m
.
SRC_COLOR
);
break
;
default
:
m
.
blendEquationSeparate
(
m
.
FUNC_ADD
,
m
.
FUNC_ADD
),
m
.
blendFuncSeparate
(
m
.
SRC_ALPHA
,
m
.
ONE_MINUS_SRC_ALPHA
,
m
.
ONE
,
m
.
ONE_MINUS_SRC_ALPHA
)}
fa
=
b
}}
function
B
(
b
,
c
,
e
){(
e
.
width
&
e
.
width
-
1
)
==
0
&&
(
e
.
height
&
e
.
height
-
1
)
==
0
?(
m
.
texParameteri
(
b
,
m
.
TEXTURE_WRAP_S
,
K
(
c
.
wrapS
)),
m
.
texParameteri
(
b
,
m
.
TEXTURE_WRAP_T
,
K
(
c
.
wrapT
)),
m
.
texParameteri
(
b
,
m
.
TEXTURE_MAG_FILTER
,
K
(
c
.
magFilter
)),
m
.
texParameteri
(
b
,
m
.
TEXTURE_MIN_FILTER
,
K
(
c
.
minFilter
)),
m
.
generateMipmap
(
b
)):(
m
.
texParameteri
(
b
,
m
.
TEXTURE_WRAP_S
,
m
.
CLAMP_TO_EDGE
),
m
.
texParameteri
(
b
,
m
.
TEXTURE_WRAP_T
,
m
.
CLAMP_TO_EDGE
),
m
.
texParameteri
(
b
,
m
.
TEXTURE_MAG_FILTER
,
S
(
c
.
magFilter
)),
m
.
texParameteri
(
b
,
m
.
TEXTURE_MIN_FILTER
,
S
(
c
.
minFilter
)))}
function
L
(
b
,
c
){
if
(
b
.
needsUpdate
){
if
(
!
b
.
__webglInit
)
b
.
__webglTexture
=
m
.
createTexture
(),
b
.
__webglInit
=!
0
;
m
.
bindTexture
(
m
.
TEXTURE_2D
,
b
.
__webglTexture
);
b
instanceof
THREE
.
DataTexture
?
m
.
texImage2D
(
m
.
TEXTURE_2D
,
0
,
K
(
b
.
format
),
b
.
image
.
width
,
b
.
image
.
height
,
0
,
K
(
b
.
format
),
m
.
UNSIGNED_BYTE
,
b
.
image
.
data
):
m
.
texImage2D
(
m
.
TEXTURE_2D
,
0
,
m
.
RGBA
,
m
.
RGBA
,
m
.
UNSIGNED_BYTE
,
b
.
image
);
B
(
m
.
TEXTURE_2D
,
b
,
b
.
image
);
m
.
bindTexture
(
m
.
TEXTURE_2D
,
null
);
b
.
needsUpdate
=!
1
}
m
.
activeTexture
(
m
.
TEXTURE0
+
c
);
m
.
bindTexture
(
m
.
TEXTURE_2D
,
b
.
__webglTexture
)}
function
E
(
b
){
var
c
=
b
instanceof
THREE
.
WebGLRenderTargetCube
;
m
.
createTexture
(),
b
.
__webglInit
=!
0
;
m
.
activeTexture
(
m
.
TEXTURE0
+
c
);
m
.
bindTexture
(
m
.
TEXTURE_2D
,
b
.
__webglTexture
);
b
instanceof
THREE
.
DataTexture
?
m
.
texImage2D
(
m
.
TEXTURE_2D
,
0
,
K
(
b
.
format
),
b
.
image
.
width
,
b
.
image
.
height
,
0
,
K
(
b
.
format
),
m
.
UNSIGNED_BYTE
,
b
.
image
.
data
):
m
.
texImage2D
(
m
.
TEXTURE_2D
,
0
,
m
.
RGBA
,
m
.
RGBA
,
m
.
UNSIGNED_BYTE
,
b
.
image
);
B
(
m
.
TEXTURE_2D
,
b
,
b
.
image
);
b
.
needsUpdate
=!
1
}
else
m
.
activeTexture
(
m
.
TEXTURE0
+
c
),
m
.
bindTexture
(
m
.
TEXTURE_2D
,
b
.
__webglTexture
)}
function
E
(
b
){
var
c
=
b
instanceof
THREE
.
WebGLRenderTargetCube
;
if
(
b
&&!
b
.
__webglFramebuffer
){
if
(
b
.
depthBuffer
===
void
0
)
b
.
depthBuffer
=!
0
;
if
(
b
.
stencilBuffer
===
void
0
)
b
.
stencilBuffer
=!
0
;
b
.
__webglRenderbuffer
=
m
.
createRenderbuffer
();
b
.
__webglTexture
=
m
.
createTexture
();
if
(
c
){
m
.
bindTexture
(
m
.
TEXTURE_CUBE_MAP
,
b
.
__webglTexture
);
B
(
m
.
TEXTURE_CUBE_MAP
,
b
,
b
);
b
.
__webglFramebuffer
=
[];
for
(
var
e
=
0
;
e
<
6
;
e
++
)
b
.
__webglFramebuffer
[
e
]
=
m
.
createFramebuffer
(),
m
.
texImage2D
(
m
.
TEXTURE_CUBE_MAP_POSITIVE_X
+
e
,
0
,
K
(
b
.
format
),
b
.
width
,
b
.
height
,
0
,
K
(
b
.
format
),
K
(
b
.
type
),
null
)}
else
b
.
__webglFramebuffer
=
m
.
createFramebuffer
(),
m
.
bindTexture
(
m
.
TEXTURE_2D
,
b
.
__webglTexture
),
B
(
m
.
TEXTURE_2D
,
b
,
b
),
m
.
texImage2D
(
m
.
TEXTURE_2D
,
0
,
K
(
b
.
format
),
b
.
width
,
b
.
height
,
0
,
K
(
b
.
format
),
K
(
b
.
type
),
null
);
m
.
bindRenderbuffer
(
m
.
RENDERBUFFER
,
b
.
__webglRenderbuffer
);
if
(
c
)
for
(
e
=
0
;
e
<
6
;
++
e
)
m
.
bindFramebuffer
(
m
.
FRAMEBUFFER
,
b
.
__webglFramebuffer
[
e
]),
m
.
framebufferTexture2D
(
m
.
FRAMEBUFFER
,
m
.
COLOR_ATTACHMENT0
,
m
.
TEXTURE_CUBE_MAP_POSITIVE_X
+
e
,
b
.
__webglTexture
,
0
);
else
m
.
bindFramebuffer
(
m
.
FRAMEBUFFER
,
b
.
__webglFramebuffer
),
m
.
framebufferTexture2D
(
m
.
FRAMEBUFFER
,
m
.
COLOR_ATTACHMENT0
,
m
.
TEXTURE_2D
,
b
.
__webglTexture
,
0
);
b
.
depthBuffer
&&!
b
.
stencilBuffer
?(
m
.
renderbufferStorage
(
m
.
RENDERBUFFER
,
m
.
DEPTH_COMPONENT16
,
b
.
width
,
b
.
height
),
m
.
framebufferRenderbuffer
(
m
.
FRAMEBUFFER
,
m
.
DEPTH_ATTACHMENT
,
m
.
RENDERBUFFER
,
b
.
__webglRenderbuffer
)):
b
.
depthBuffer
&&
b
.
stencilBuffer
?(
m
.
renderbufferStorage
(
m
.
RENDERBUFFER
,
m
.
DEPTH_STENCIL
,
b
.
width
,
b
.
height
),
m
.
framebufferRenderbuffer
(
m
.
FRAMEBUFFER
,
m
.
DEPTH_STENCIL_ATTACHMENT
,
m
.
RENDERBUFFER
,
b
.
__webglRenderbuffer
)):
m
.
renderbufferStorage
(
m
.
RENDERBUFFER
,
...
...
build/custom/ThreeWebGL.js
浏览文件 @
dcee8501
...
...
@@ -212,8 +212,8 @@ return!1}function ya(b){var c,d,f,e;e=b.__materials;b=0;for(d=e.length;b<d;b++)i
j
=
h
.
materials
,
k
=
c
(
j
),
r
[
k
]
==
void
0
&&
(
r
[
k
]
=
{
hash
:
k
,
counter
:
0
}),
m
=
r
[
k
].
hash
+
"
_
"
+
r
[
k
].
counter
,
b
.
geometryGroups
[
m
]
==
void
0
&&
(
b
.
geometryGroups
[
m
]
=
{
faces
:[],
materials
:
j
,
vertices
:
0
,
numMorphTargets
:
D
}),
h
=
h
instanceof
THREE
.
Face3
?
3
:
4
,
b
.
geometryGroups
[
m
].
vertices
+
h
>
65535
&&
(
r
[
k
].
counter
+=
1
,
m
=
r
[
k
].
hash
+
"
_
"
+
r
[
k
].
counter
,
b
.
geometryGroups
[
m
]
==
void
0
&&
(
b
.
geometryGroups
[
m
]
=
{
faces
:[],
materials
:
j
,
vertices
:
0
,
numMorphTargets
:
D
})),
b
.
geometryGroups
[
m
].
faces
.
push
(
e
),
b
.
geometryGroups
[
m
].
vertices
+=
h
}
function
U
(
b
,
c
,
d
){
b
.
push
({
buffer
:
c
,
object
:
d
,
opaque
:{
list
:[],
count
:
0
},
transparent
:{
list
:[],
count
:
0
}})}
function
t
(
b
){
if
(
b
!=
V
){
switch
(
b
){
case
THREE
.
AdditiveBlending
:
f
.
blendEquation
(
f
.
FUNC_ADD
);
f
.
blendFunc
(
f
.
SRC_ALPHA
,
f
.
ONE
);
break
;
case
THREE
.
SubtractiveBlending
:
f
.
blendEquation
(
f
.
FUNC_ADD
);
f
.
blendFunc
(
f
.
ZERO
,
f
.
ONE_MINUS_SRC_COLOR
);
break
;
case
THREE
.
MultiplyBlending
:
f
.
blendEquation
(
f
.
FUNC_ADD
);
f
.
blendFunc
(
f
.
ZERO
,
f
.
SRC_COLOR
);
break
;
default
:
f
.
blendEquationSeparate
(
f
.
FUNC_ADD
,
f
.
FUNC_ADD
),
f
.
blendFuncSeparate
(
f
.
SRC_ALPHA
,
f
.
ONE_MINUS_SRC_ALPHA
,
f
.
ONE
,
f
.
ONE_MINUS_SRC_ALPHA
)}
V
=
b
}}
function
Y
(
b
,
c
,
d
){(
d
.
width
&
d
.
width
-
1
)
==
0
&&
(
d
.
height
&
d
.
height
-
1
)
==
0
?(
f
.
texParameteri
(
b
,
f
.
TEXTURE_WRAP_S
,
S
(
c
.
wrapS
)),
f
.
texParameteri
(
b
,
f
.
TEXTURE_WRAP_T
,
S
(
c
.
wrapT
)),
f
.
texParameteri
(
b
,
f
.
TEXTURE_MAG_FILTER
,
S
(
c
.
magFilter
)),
f
.
texParameteri
(
b
,
f
.
TEXTURE_MIN_FILTER
,
S
(
c
.
minFilter
)),
f
.
generateMipmap
(
b
)):(
f
.
texParameteri
(
b
,
f
.
TEXTURE_WRAP_S
,
f
.
CLAMP_TO_EDGE
),
f
.
texParameteri
(
b
,
f
.
TEXTURE_WRAP_T
,
f
.
CLAMP_TO_EDGE
),
f
.
texParameteri
(
b
,
f
.
TEXTURE_MAG_FILTER
,
qa
(
c
.
magFilter
)),
f
.
texParameteri
(
b
,
f
.
TEXTURE_MIN_FILTER
,
qa
(
c
.
minFilter
)))}
function
L
(
b
,
c
){
if
(
b
.
needsUpdate
){
if
(
!
b
.
__webglInit
)
b
.
__webglTexture
=
f
.
createTexture
(),
b
.
__webglInit
=!
0
;
f
.
bindTexture
(
f
.
TEXTURE_2D
,
b
.
__webglTexture
);
b
instanceof
THREE
.
DataTexture
?
f
.
texImage2D
(
f
.
TEXTURE_2D
,
0
,
S
(
b
.
format
),
b
.
image
.
width
,
b
.
image
.
height
,
0
,
S
(
b
.
format
),
f
.
UNSIGNED_BYTE
,
b
.
image
.
data
):
f
.
texImage2D
(
f
.
TEXTURE_2D
,
0
,
f
.
RGBA
,
f
.
RGBA
,
f
.
UNSIGNED_BYTE
,
b
.
image
);
Y
(
f
.
TEXTURE_2D
,
b
,
b
.
image
);
f
.
bindTexture
(
f
.
TEXTURE_2D
,
null
);
b
.
needsUpdate
=!
1
}
f
.
activeTexture
(
f
.
TEXTURE0
+
c
)
;
f
.
bindTexture
(
f
.
TEXTURE_2D
,
b
.
__webglTexture
)}
function
P
(
b
){
var
c
=
b
instanceof
THREE
.
WebGLRenderTargetCube
;
if
(
b
&&!
b
.
__webglFramebuffer
){
if
(
b
.
depthBuffer
===
void
0
)
b
.
depthBuffer
=!
0
;
if
(
b
.
stencilBuffer
===
void
0
)
b
.
stencilBuffer
=!
0
;
b
.
__webglRenderbuffer
=
f
.
createRenderbuffer
();
b
.
__webglTexture
=
f
.
createTexture
();
if
(
c
){
f
.
bindTexture
(
f
.
TEXTURE_CUBE_MAP
,
b
.
__webglTexture
);
Y
(
f
.
TEXTURE_CUBE_MAP
,
b
,
b
);
b
.
__webglFramebuffer
=
[];
for
(
var
d
=
0
;
d
<
6
;
d
++
)
b
.
__webglFramebuffer
[
d
]
=
f
.
createFramebuffer
(),
f
.
texImage2D
(
f
.
TEXTURE_CUBE_MAP_POSITIVE_X
+
f
.
TEXTURE_MIN_FILTER
,
qa
(
c
.
minFilter
)))}
function
L
(
b
,
c
){
if
(
b
.
needsUpdate
){
if
(
!
b
.
__webglInit
)
b
.
__webglTexture
=
f
.
createTexture
(),
b
.
__webglInit
=!
0
;
f
.
activeTexture
(
f
.
TEXTURE0
+
c
);
f
.
bindTexture
(
f
.
TEXTURE_2D
,
b
.
__webglTexture
);
b
instanceof
THREE
.
DataTexture
?
f
.
texImage2D
(
f
.
TEXTURE_2D
,
0
,
S
(
b
.
format
),
b
.
image
.
width
,
b
.
image
.
height
,
0
,
S
(
b
.
format
),
f
.
UNSIGNED_BYTE
,
b
.
image
.
data
):
f
.
texImage2D
(
f
.
TEXTURE_2D
,
0
,
f
.
RGBA
,
f
.
RGBA
,
f
.
UNSIGNED_BYTE
,
b
.
image
);
Y
(
f
.
TEXTURE_2D
,
b
,
b
.
image
);
b
.
needsUpdate
=!
1
}
else
f
.
activeTexture
(
f
.
TEXTURE0
+
c
)
,
f
.
bindTexture
(
f
.
TEXTURE_2D
,
b
.
__webglTexture
)}
function
P
(
b
){
var
c
=
b
instanceof
THREE
.
WebGLRenderTargetCube
;
if
(
b
&&!
b
.
__webglFramebuffer
){
if
(
b
.
depthBuffer
===
void
0
)
b
.
depthBuffer
=!
0
;
if
(
b
.
stencilBuffer
===
void
0
)
b
.
stencilBuffer
=!
0
;
b
.
__webglRenderbuffer
=
f
.
createRenderbuffer
();
b
.
__webglTexture
=
f
.
createTexture
();
if
(
c
){
f
.
bindTexture
(
f
.
TEXTURE_CUBE_MAP
,
b
.
__webglTexture
);
Y
(
f
.
TEXTURE_CUBE_MAP
,
b
,
b
);
b
.
__webglFramebuffer
=
[];
for
(
var
d
=
0
;
d
<
6
;
d
++
)
b
.
__webglFramebuffer
[
d
]
=
f
.
createFramebuffer
(),
f
.
texImage2D
(
f
.
TEXTURE_CUBE_MAP_POSITIVE_X
+
d
,
0
,
S
(
b
.
format
),
b
.
width
,
b
.
height
,
0
,
S
(
b
.
format
),
S
(
b
.
type
),
null
)}
else
b
.
__webglFramebuffer
=
f
.
createFramebuffer
(),
f
.
bindTexture
(
f
.
TEXTURE_2D
,
b
.
__webglTexture
),
Y
(
f
.
TEXTURE_2D
,
b
,
b
),
f
.
texImage2D
(
f
.
TEXTURE_2D
,
0
,
S
(
b
.
format
),
b
.
width
,
b
.
height
,
0
,
S
(
b
.
format
),
S
(
b
.
type
),
null
);
f
.
bindRenderbuffer
(
f
.
RENDERBUFFER
,
b
.
__webglRenderbuffer
);
if
(
c
)
for
(
d
=
0
;
d
<
6
;
++
d
)
f
.
bindFramebuffer
(
f
.
FRAMEBUFFER
,
b
.
__webglFramebuffer
[
d
]),
f
.
framebufferTexture2D
(
f
.
FRAMEBUFFER
,
f
.
COLOR_ATTACHMENT0
,
f
.
TEXTURE_CUBE_MAP_POSITIVE_X
+
d
,
b
.
__webglTexture
,
0
);
else
f
.
bindFramebuffer
(
f
.
FRAMEBUFFER
,
b
.
__webglFramebuffer
),
f
.
framebufferTexture2D
(
f
.
FRAMEBUFFER
,
f
.
COLOR_ATTACHMENT0
,
f
.
TEXTURE_2D
,
b
.
__webglTexture
,
0
);
b
.
depthBuffer
&&!
b
.
stencilBuffer
?(
f
.
renderbufferStorage
(
f
.
RENDERBUFFER
,
f
.
DEPTH_COMPONENT16
,
b
.
width
,
b
.
height
),
f
.
framebufferRenderbuffer
(
f
.
FRAMEBUFFER
,
f
.
DEPTH_ATTACHMENT
,
f
.
RENDERBUFFER
,
b
.
__webglRenderbuffer
)):
b
.
depthBuffer
&&
b
.
stencilBuffer
?(
f
.
renderbufferStorage
(
f
.
RENDERBUFFER
,
f
.
DEPTH_STENCIL
,
b
.
width
,
b
.
height
),
f
.
framebufferRenderbuffer
(
f
.
FRAMEBUFFER
,
f
.
DEPTH_STENCIL_ATTACHMENT
,
f
.
RENDERBUFFER
,
b
.
__webglRenderbuffer
)):
f
.
renderbufferStorage
(
f
.
RENDERBUFFER
,
f
.
RGBA4
,
b
.
width
,
b
.
height
);
c
?
f
.
bindTexture
(
f
.
TEXTURE_CUBE_MAP
,
null
):
f
.
bindTexture
(
f
.
TEXTURE_2D
,
null
);
f
.
bindRenderbuffer
(
f
.
RENDERBUFFER
,
null
);
f
.
bindFramebuffer
(
f
.
FRAMEBUFFER
,
null
)}
b
?(
c
=
c
?
b
.
__webglFramebuffer
[
b
.
activeCubeFace
]:
b
.
__webglFramebuffer
,
d
=
b
.
width
,
b
=
b
.
height
):(
c
=
null
,
d
=
Fa
,
b
=
xa
);
c
!=
va
&&
(
f
.
bindFramebuffer
(
f
.
FRAMEBUFFER
,
c
),
f
.
viewport
(
Aa
,
Ia
,
d
,
b
),
va
=
c
)}
function
Q
(
b
){
b
instanceof
THREE
.
WebGLRenderTargetCube
?
...
...
src/renderers/WebGLRenderer.js
浏览文件 @
dcee8501
...
...
@@ -4893,6 +4893,7 @@ THREE.WebGLRenderer = function ( parameters ) {
}
_gl
.
activeTexture
(
_gl
.
TEXTURE0
+
slot
);
_gl
.
bindTexture
(
_gl
.
TEXTURE_2D
,
texture
.
__webglTexture
);
if
(
texture
instanceof
THREE
.
DataTexture
)
{
...
...
@@ -4907,42 +4908,14 @@ THREE.WebGLRenderer = function ( parameters ) {
setTextureParameters
(
_gl
.
TEXTURE_2D
,
texture
,
texture
.
image
);
_gl
.
bindTexture
(
_gl
.
TEXTURE_2D
,
null
);
texture
.
needsUpdate
=
false
;
}
/*
if ( texture.needsUpdate ) {
if ( !texture.__webglInit ) {
texture.__webglTexture = _gl.createTexture();
_gl.bindTexture( _gl.TEXTURE_2D, texture.__webglTexture );
_gl.texImage2D( _gl.TEXTURE_2D, 0, _gl.RGBA, _gl.RGBA, _gl.UNSIGNED_BYTE, texture.image );
texture.__webglInit = true;
} else {
_gl.bindTexture( _gl.TEXTURE_2D, texture.__webglTexture );
_gl.texSubImage2D( _gl.TEXTURE_2D, 0, 0, 0, _gl.RGBA, _gl.UNSIGNED_BYTE, texture.image );
}
setTextureParameters( _gl.TEXTURE_2D, texture, texture.image );
_gl.bindTexture( _gl.TEXTURE_2D, null );
}
else
{
texture.needsUpdate = false;
_gl
.
activeTexture
(
_gl
.
TEXTURE0
+
slot
);
_gl
.
bindTexture
(
_gl
.
TEXTURE_2D
,
texture
.
__webglTexture
);
}
*/
_gl
.
activeTexture
(
_gl
.
TEXTURE0
+
slot
);
_gl
.
bindTexture
(
_gl
.
TEXTURE_2D
,
texture
.
__webglTexture
);
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录