Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Dalai Felinto
virtual_reality_viewport
Commits
d0941dad
Commit
d0941dad
authored
Oct 09, 2015
by
Dalai Felinto
Browse files
Use the new gpu/offscreen API
parent
867cd000
Changes
2
Show whitespace changes
Inline
Side-by-side
space_view3d_virtual_reality/hmd/__init__.py
View file @
d0941dad
...
...
@@ -130,7 +130,7 @@ class HMD_Base:
"""
try
:
for
i
in
range
(
2
):
self
.
_offscreen_object
[
i
]
=
gpu
.
offscreen
_object_create
(
self
.
_width
[
i
],
self
.
_height
[
i
])
self
.
_offscreen_object
[
i
]
=
gpu
.
offscreen
.
new
(
self
.
_width
[
i
],
self
.
_height
[
i
])
self
.
_framebuffer_object
[
i
]
=
self
.
_offscreen_object
[
i
].
framebuffer_object
self
.
_color_object
[
i
]
=
self
.
_offscreen_object
[
i
].
color_object
...
...
@@ -162,8 +162,7 @@ class HMD_Base:
"""
try
:
for
i
in
range
(
2
):
if
self
.
_offscreen_object
[
i
]:
gpu
.
offscreen_object_free
(
self
.
_offscreen_object
[
i
])
self
.
_offscreen_object
[
i
]
=
None
except
Exception
as
E
:
print
(
E
)
...
...
space_view3d_virtual_reality/operator.py
View file @
d0941dad
...
...
@@ -170,7 +170,7 @@ class VirtualRealityDisplayOperator(bpy.types.Operator):
modelview_matrix
=
self
.
_hmd
.
modelview_matrix
# drawing
gpu
.
offscreen_object
_
draw
(
offscreen_object
,
projection_matrix
,
modelview_matrix
)
offscreen_object
.
draw
(
projection_matrix
,
modelview_matrix
)
self
.
_hmd
.
frameReady
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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