working on glvisualize
This commit is contained in:
parent
1ba0d198a7
commit
10d218089f
@ -51,12 +51,14 @@ immutable GLScreenWrapper
|
|||||||
window
|
window
|
||||||
end
|
end
|
||||||
|
|
||||||
function gl_display(plt::Plot{GLVisualizeBackend})
|
function _create_backend_figure(plt::Plot{GLVisualizeBackend})
|
||||||
# init a window
|
# init a window
|
||||||
w=GLVisualize.glscreen()
|
window = GLVisualize.glscreen()
|
||||||
@async GLVisualize.renderloop(w)
|
@async GLVisualize.renderloop(window)
|
||||||
GLScreenWrapper(w)
|
window
|
||||||
|
end
|
||||||
|
|
||||||
|
function gl_display(plt::Plot{GLVisualizeBackend})
|
||||||
for sp in plt.subplots
|
for sp in plt.subplots
|
||||||
# TODO: setup subplot
|
# TODO: setup subplot
|
||||||
|
|
||||||
@ -64,13 +66,20 @@ function gl_display(plt::Plot{GLVisualizeBackend})
|
|||||||
# TODO: setup series
|
# TODO: setup series
|
||||||
d = series.d
|
d = series.d
|
||||||
st = d[:seriestype]
|
st = d[:seriestype]
|
||||||
|
x, y, z = map(Float32, d[:x]), map(Float32, d[:y]), d[:z]
|
||||||
|
|
||||||
if st == :surface
|
if st == :surface
|
||||||
x, y, z = map(Float32, series.d[:x]), map(Float32, series.d[:y]), map(Float32, series.d[:z].surf)
|
ismatrix(x) || (x = repmat(x', length(y), 1))
|
||||||
GLVisualize.view(GLVisualize.visualize((x*ones(y)', ones(x)*y', z), :surface), plt.o.window)
|
ismatrix(y) || (y = repmat(y, 1, length(x)))
|
||||||
|
z = transpose_z(d, map(Float32, z.surf), false)
|
||||||
|
viz = GLVisualize.visualize((x, y, z), :surface)
|
||||||
|
GLVisualize.view(viz, plt.o)
|
||||||
|
return
|
||||||
|
|
||||||
else
|
else
|
||||||
error("Series type $st not supported by GLVisualize")
|
error("Series type $st not supported by GLVisualize")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user