Skip to content

Breaking release #1393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 119 commits into from
Oct 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
5d051f8
clean up scene
SimonDanisch Aug 3, 2021
b6c8749
clean up constructor
SimonDanisch Aug 3, 2021
bf849c2
clean up
SimonDanisch Aug 3, 2021
ee2dc55
remove unused attributes
SimonDanisch Aug 3, 2021
6eb7bea
clean up constructors
SimonDanisch Aug 4, 2021
9f4d2aa
clean up + fix constructor
SimonDanisch Aug 4, 2021
4889874
some more fixes
SimonDanisch Aug 6, 2021
e847914
add logical expressions for `ispressed`
ffreyer Aug 15, 2021
4387f14
fix typo
ffreyer Aug 15, 2021
23472d0
simplify plotting barplot by group
piever Aug 16, 2021
02b6efa
add x_distance example for barplot
piever Aug 16, 2021
19bde68
remove outdated precompile
SimonDanisch Aug 19, 2021
977ceee
merge master
SimonDanisch Aug 19, 2021
3b5e509
fix lscene
SimonDanisch Aug 21, 2021
a418481
fix cairomakie
SimonDanisch Aug 21, 2021
c109ad2
bring axis to pos 1
SimonDanisch Aug 22, 2021
349c16b
merge master
SimonDanisch Aug 22, 2021
6810808
revert unecessary name change
SimonDanisch Aug 22, 2021
4523aab
fix old axis example
SimonDanisch Aug 22, 2021
3be3932
mostly fix tests
SimonDanisch Aug 22, 2021
f14b37b
center and update limits
SimonDanisch Aug 22, 2021
06e2bcf
add point iterator API
SimonDanisch Aug 22, 2021
2ce835d
merge master
SimonDanisch Aug 23, 2021
3516339
use new aliases
SimonDanisch Aug 23, 2021
6753720
deprecate correctly
SimonDanisch Aug 23, 2021
6984004
Merge branch 'master' into pv/barwidth
SimonDanisch Aug 24, 2021
103384f
replace macro with &, |, ! overloads
ffreyer Aug 24, 2021
d5cac7d
add docstring
ffreyer Aug 24, 2021
e5b4cfd
remove old code
ffreyer Aug 24, 2021
f69787d
cleanup
ffreyer Aug 24, 2021
7e8efb9
refactor bbs
SimonDanisch Aug 25, 2021
be14736
switch to width gap API
piever Aug 26, 2021
c639b71
helper function rename
piever Aug 26, 2021
3e57db9
update docs
piever Aug 26, 2021
7037fc2
fix boxplot
piever Aug 26, 2021
feebe2e
Merge branch 'master' into sd/scenegraph
SimonDanisch Aug 26, 2021
8295cf0
clean up data_limits
SimonDanisch Aug 26, 2021
897ac6c
add Exclusively
ffreyer Aug 28, 2021
ad523b1
add tests
ffreyer Aug 28, 2021
c11b5ba
add docs for ispressed
ffreyer Aug 28, 2021
900a2b1
Merge branch 'master' into events
ffreyer Aug 28, 2021
6f03129
cleanup
ffreyer Aug 29, 2021
9d0b2d0
fix most bbs
SimonDanisch Sep 2, 2021
26600d3
fix limits
SimonDanisch Sep 2, 2021
ba1b10b
change Node to Observable, link video
Datseris Sep 9, 2021
fe0d0c5
remvoe node from Animation page
Datseris Sep 9, 2021
fb6e528
node -> observable in camera docstring
Datseris Sep 9, 2021
9333935
fix bbs
SimonDanisch Sep 11, 2021
eceb509
fix more stuff I guess
SimonDanisch Sep 11, 2021
e3f498b
correctly calculate scene bb
SimonDanisch Sep 28, 2021
f8d0ad5
merge master
SimonDanisch Sep 28, 2021
f492067
clean up
SimonDanisch Sep 28, 2021
c3c991a
correctly empty screen
SimonDanisch Sep 28, 2021
9384c28
fix empty
SimonDanisch Sep 29, 2021
0e2abdc
fix padding
SimonDanisch Sep 29, 2021
3bf3694
default to cam3d
SimonDanisch Sep 29, 2021
78f0979
don't show axis
SimonDanisch Sep 29, 2021
59eee5c
update keyword in gantt example
piever Sep 29, 2021
5b64d3c
Merge branch 'master' into events
ffreyer Sep 29, 2021
39c6967
add note about ispressed in camera docs
ffreyer Sep 29, 2021
5522964
start implementing rpr backend
SimonDanisch Oct 4, 2021
cf90b09
fix surface
SimonDanisch Oct 5, 2021
6e1e8c0
more fixes and examples
SimonDanisch Oct 6, 2021
62ba0af
fix for 1.3
SimonDanisch Oct 7, 2021
09450d9
fixes for regular surface
SimonDanisch Oct 7, 2021
1dc5ea0
hand through materials, replace scene
SimonDanisch Oct 11, 2021
725ed5a
add better material demo
SimonDanisch Oct 11, 2021
045d7ce
add depth_shift
ffreyer Oct 13, 2021
0fe9e48
remove print
ffreyer Oct 13, 2021
6aaba7c
fix typo
ffreyer Oct 13, 2021
045d6c6
add missing depth shifts
ffreyer Oct 13, 2021
1be9aaa
add depth_shift to WGLMakie
ffreyer Oct 13, 2021
47bd16e
make depth_shift a default attribute
ffreyer Oct 14, 2021
a96811c
Merge branch 'master' into depth_shift
SimonDanisch Oct 15, 2021
8ae3f74
fix passing of depth_shift uniform
ffreyer Oct 15, 2021
79a5af7
fix typos
ffreyer Oct 15, 2021
5d37e30
fix crash on image!
ffreyer Oct 15, 2021
1acd096
add refimage test
ffreyer Oct 15, 2021
0fe3790
use stable RNG
ffreyer Oct 15, 2021
dfa2548
push lines forward
ffreyer Oct 15, 2021
eed1c22
clean up materials
SimonDanisch Oct 16, 2021
817bccd
fix #805
ffreyer Oct 16, 2021
bbc3ec8
add some notes on scene attributes
ffreyer Oct 16, 2021
6dfb558
keep clear = false
ffreyer Oct 16, 2021
d0bb703
Merge remote-tracking branch 'origin/pv/barwidth' into breaking-release
SimonDanisch Oct 16, 2021
7282e01
Merge remote-tracking branch 'origin/sd/scenegraph' into breaking-rel…
SimonDanisch Oct 16, 2021
3a65a85
merge events
SimonDanisch Oct 16, 2021
a5af563
merge #1222
SimonDanisch Oct 16, 2021
ba5e092
Merge branch 'observable' of https://github.com/Datseris/Makie.jl int…
SimonDanisch Oct 16, 2021
1f8e920
Merge branch 'Datseris-observable' into breaking-release
SimonDanisch Oct 16, 2021
70042ca
replace Node for real
SimonDanisch Oct 16, 2021
67a24e6
fix raw html
SimonDanisch Oct 16, 2021
c21e28a
fix obs
SimonDanisch Oct 16, 2021
92492d2
Merge remote-tracking branch 'origin/sd/rpr' into sd/scene-rpr
SimonDanisch Oct 16, 2021
2656e5b
Merge remote-tracking branch 'origin/breaking-release' into sd/scene-rpr
SimonDanisch Oct 16, 2021
d42d3e9
restrict keyboard controls to selected scene
ffreyer Oct 17, 2021
a1e0a54
add depth to 3d contours and isosurfaces
ffreyer Oct 17, 2021
6c87c07
fixes for scene changes
SimonDanisch Oct 17, 2021
2ca6b8f
add test
ffreyer Oct 17, 2021
538cb7c
refactor
SimonDanisch Oct 17, 2021
22c2416
formatting
SimonDanisch Oct 17, 2021
ccc17cc
fix tests
SimonDanisch Oct 17, 2021
afb9cd0
remove duplicated overload
SimonDanisch Oct 19, 2021
06439be
fix image conversion
SimonDanisch Oct 19, 2021
eb48952
fix unit tests
SimonDanisch Oct 19, 2021
81fe13e
fix xyz_bb dep
SimonDanisch Oct 19, 2021
1ae2aa0
fix tests
SimonDanisch Oct 19, 2021
4d26bc9
Merge remote-tracking branch 'origin/ff/volume' into breaking-release
SimonDanisch Oct 19, 2021
8338ff7
fix merge conflict
SimonDanisch Oct 19, 2021
d7ae31e
fix merge conflict
SimonDanisch Oct 19, 2021
ab55c9b
Merge branch 'depth_shift' of https://github.com/ffreyer/Makie.jl int…
SimonDanisch Oct 19, 2021
47f2aaa
merge examples
SimonDanisch Oct 19, 2021
9edf5cd
cleanup test
SimonDanisch Oct 19, 2021
e0170dc
add linearalgebra
SimonDanisch Oct 19, 2021
2608dcd
remove remaining f0
SimonDanisch Oct 19, 2021
15c9a2d
fix poly example
SimonDanisch Oct 19, 2021
5ce56a3
clean up remnants of old times
SimonDanisch Oct 19, 2021
ec8a327
Point3f0 -> Point3f, bump WGLMakie threshold
SimonDanisch Oct 19, 2021
f501f1f
tweak threshold :'(
SimonDanisch Oct 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CairoMakie/src/infrastructure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ to_mime(x::CairoBackend) = to_mime(x.typ)

# The main entry point into the drawing pipeline
function cairo_draw(screen::CairoScreen, scene::Scene)
Makie.update!(scene)
draw_background(screen, scene)

allplots = get_all_plots(scene)
Expand Down
18 changes: 7 additions & 11 deletions CairoMakie/src/primitives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ end
function draw_atomic(scene::Scene, screen::CairoScreen, primitive::Text{<:Tuple{<:G}}) where G <: Union{AbstractArray{<:Makie.GlyphCollection}, Makie.GlyphCollection}
ctx = screen.context
@get_attribute(primitive, (rotation, model, space, offset))
position = primitive.attributes[:position][]
position = primitive.position[]
# use cached glyph info
glyph_collection = to_value(primitive[1])

Expand Down Expand Up @@ -607,11 +607,11 @@ end


function draw_atomic(scene::Scene, screen::CairoScreen, primitive::Makie.Mesh)
if scene.camera_controls[] isa Union{Camera2D, Makie.PixelCamera}
if Makie.cameracontrols(scene) isa Union{Camera2D, Makie.PixelCamera}
draw_mesh2D(scene, screen, primitive)
else
if !haskey(primitive, :faceculling)
primitive[:faceculling] = Node(-10)
primitive[:faceculling] = Observable(-10)
end
draw_mesh3D(scene, screen, primitive)
end
Expand Down Expand Up @@ -679,12 +679,8 @@ function draw_mesh3D(
model = primitive.model[]
view = scene.camera.view[]
projection = scene.camera.projection[]
normalmatrix = get(
scene.attributes, :normalmatrix, let
i = SOneTo(3)
transpose(inv(view[i, i] * model[i, i]))
end
)
i = SOneTo(3)
normalmatrix = transpose(inv(view[i, i] * model[i, i]))

# Mesh data
# transform to view/camera space
Expand Down Expand Up @@ -722,7 +718,7 @@ function draw_mesh3D(
p_0_to_1 = (p_yflip .+ 1f0) / 2f0
end
p = p_0_to_1 .* scene.camera.resolution[]
Vec3f(p[1], p[2], clip[3])
return Vec3f(p[1], p[2], clip[3])
end

# Approximate zorder
Expand Down Expand Up @@ -789,7 +785,7 @@ function draw_atomic(scene::Scene, screen::CairoScreen, primitive::Makie.Surface
primitive[:color] = primitive[3]
end
if !haskey(primitive, :faceculling)
primitive[:faceculling] = Node(-10)
primitive[:faceculling] = Observable(-10)
end
draw_mesh3D(scene, screen, primitive, mesh=mesh)
primitive[:color] = old
Expand Down
1 change: 1 addition & 0 deletions CairoMakie/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ excludes = Set([
"Connected Sphere",
# markers too big, close otherwise, needs to be assimilated with glmakie
"Unicode Marker",
"Depth Shift"
])
excludes2 = Set(["short_tests_90", "short_tests_111", "short_tests_35", "short_tests_13", "short_tests_3"])

Expand Down
2 changes: 2 additions & 0 deletions GLMakie/assets/shader/dots.vert
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ struct Nothing{ //Nothing type, to encode if some variable doesn't contain any d
{{color_norm_type}} color_norm;
{{color_map_type}} color_map;
uniform uint objectid;
uniform float depth_shift;

flat out vec4 o_color;
flat out uvec2 o_objectid;
Expand Down Expand Up @@ -37,4 +38,5 @@ void main(){
colorize(color_map, color, color_norm);
o_objectid = uvec2(objectid, gl_VertexID+1);
gl_Position = projectionview * model * _position(vertex);
gl_Position.z += gl_Position.w * depth_shift;
}
2 changes: 2 additions & 0 deletions GLMakie/assets/shader/heatmap.vert
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ in vec2 vertices;

uniform mat4 projection, view, model;
uniform uint objectid;
uniform float depth_shift;

out vec2 o_uv;
flat out uvec2 o_objectid;
Expand Down Expand Up @@ -38,4 +39,5 @@ void main(){
float y = texelFetch(position_y, index2D.y, 0).x;

gl_Position = projection * view * model * vec4(x, y, 0, 1);
gl_Position.z += gl_Position.w * depth_shift;
}
2 changes: 2 additions & 0 deletions GLMakie/assets/shader/image.vert
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ in vec2 texturecoordinates;

uniform mat4 projection, view, model;
uniform uint objectid;
uniform float depth_shift;

out vec2 o_uv;
flat out uvec2 o_objectid;
Expand All @@ -23,4 +24,5 @@ void main(){
o_uv = texturecoordinates;
o_objectid = uvec2(objectid, gl_VertexID+1);
gl_Position = projection * view * model * _position(vertices);
gl_Position.z += gl_Position.w * depth_shift;
}
3 changes: 3 additions & 0 deletions GLMakie/assets/shader/line_segment.vert
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ vec4 to_color(float color, sampler1D color_map, vec2 color_norm, int index){
return color_lookup(color, color_map, color_norm);
}

uniform float depth_shift;

void main()
{
int index = gl_VertexID;
g_id = uvec2(objectid, index+1);
g_color = to_color(color, color_map, color_norm, index);
g_thickness = thickness;
gl_Position = projectionview * model * to_vec4(vertex);
gl_Position.z += gl_Position.w * depth_shift;
}
3 changes: 3 additions & 0 deletions GLMakie/assets/shader/lines.vert
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ vec4 to_vec4(vec2 v){return vec4(v, 0, 1);}
int get_valid_vertex(float se){return int(se);}
int get_valid_vertex(Nothing se){return 1;}

uniform float depth_shift;

void main()
{
g_lastlen = lastlen;
int index = gl_VertexID;
g_id = uvec2(objectid, index+1);
g_valid_vertex = get_valid_vertex(valid_vertex);

g_color = _color(color, intensity, color_map, color_norm, index, total_length);
gl_Position = projection*view*model*to_vec4(vertex);
gl_Position.z += gl_Position.w * depth_shift;
}
2 changes: 2 additions & 0 deletions GLMakie/assets/shader/parametric.vert
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ out vec2 aa_scale;
uniform vec2 resolution;
uniform float AntiAliasScale = 0.75;
uniform float Zoom = 1.;
uniform float depth_shift;

uniform mat4 projection, projectionview, model;
void main(){
o_uv = texturecoordinates;
aa_scale = vec2(projection[0][0],projection[1][1])*(1.0/resolution)*AntiAliasScale/Zoom;
gl_Position = projectionview * model * vec4(vertices, 0, 1);
gl_Position.z += gl_Position.w * depth_shift;
}
2 changes: 2 additions & 0 deletions GLMakie/assets/shader/sprites.geom
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ uniform float stroke_width;
uniform float glow_width;
uniform int shape; // for RECTANGLE hack below
uniform vec2 resolution;
uniform float depth_shift;

in int g_primitive_index[];
in vec4 g_uv_texture_bbox[];
Expand Down Expand Up @@ -79,6 +80,7 @@ float get_distancefield_scale(Nothing distancefield){
void emit_vertex(vec4 vertex, vec2 uv)
{
gl_Position = vertex;
gl_Position.z += gl_Position.w * depth_shift;
f_uv = uv;
f_uv_texture_bbox = g_uv_texture_bbox[0];
f_primitive_index = g_primitive_index[0];
Expand Down
2 changes: 2 additions & 0 deletions GLMakie/assets/shader/util.vert
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ out vec3 o_camdir;
uniform mat3 normalmatrix;
uniform vec3 lightposition;
uniform vec3 eyeposition;
uniform float depth_shift;


void render(vec4 position_world, vec3 normal, mat4 view, mat4 projection, vec3 lightposition)
Expand All @@ -244,6 +245,7 @@ void render(vec4 position_world, vec3 normal, mat4 view, mat4 projection, vec3 l
o_view_pos = view * position_world;
// position in clip space (w/ depth)
gl_Position = projection * o_view_pos;
gl_Position.z += gl_Position.w * depth_shift;
// direction to light
o_lightdir = normalize(view*vec4(lightposition, 1.0) - o_view_pos).xyz;
// direction to camera
Expand Down
20 changes: 20 additions & 0 deletions GLMakie/assets/shader/volume.frag
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ uniform int algorithm;
uniform float isovalue;
uniform float isorange;

uniform mat4 model, projectionview;

const float max_distance = 1.3;

const int num_samples = 200;
Expand Down Expand Up @@ -206,11 +208,17 @@ vec4 contours(vec3 front, vec3 dir)
vec3 Lo = vec3(0.0);
int i = 0;
vec3 camdir = normalize(-dir);
{{depth_init}}
// may write: float depth = 100000.0;
for (i; i < num_samples; ++i) {
float intensity = texture(volumedata, pos).x;
vec4 density = color_lookup(intensity, color_map, color_norm, color);
float opacity = density.a;
if(opacity > 0.0){
{{depth_main}}
// may write
// vec4 frag_coord = projectionview * model * vec4(pos, 1);
// depth = min(depth, frag_coord.z / frag_coord.w);
vec3 N = gennormal(pos, step_size);
vec3 L = normalize(o_light_dir - pos);
vec3 opaque = blinnphong(N, camdir, L, density.rgb);
Expand All @@ -221,6 +229,9 @@ vec4 contours(vec3 front, vec3 dir)
}
pos += dir;
}
{{depth_write}}
// may write:
// gl_FragDepth = depth == 100000.0 ? gl_FragDepth : 0.5 * depth + 0.5;
return vec4(Lo, 1-T);
}

Expand All @@ -231,9 +242,15 @@ vec4 isosurface(vec3 front, vec3 dir)
int i = 0;
vec4 diffuse_color = color_lookup(isovalue, color_map, color_norm, color);
vec3 camdir = normalize(-dir);
{{depth_init}}
// may write: float depth = 100000.0;
for (i; i < num_samples; ++i){
float density = texture(volumedata, pos).x;
if(abs(density - isovalue) < isorange){
{{depth_main}}
// may write:
// vec4 frag_coord = projectionview * model * vec4(pos, 1);
// depth = min(depth, frag_coord.z / frag_coord.w);
vec3 N = gennormal(pos, step_size);
vec3 L = normalize(o_light_dir - pos);
// back & frontface...
Expand All @@ -244,6 +261,9 @@ vec4 isosurface(vec3 front, vec3 dir)
}
pos += dir;
}
{{depth_write}}
// may write:
// gl_FragDepth = depth == 100000.0 ? gl_FragDepth : 0.5 * depth + 0.5;
return c;
}

Expand Down
2 changes: 2 additions & 0 deletions GLMakie/assets/shader/volume.vert
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ out vec3 o_light_dir;
uniform mat4 projectionview, model;
uniform vec3 lightposition;
uniform mat4 modelinv;
uniform float depth_shift;

out vec4 o_view_pos;
out vec3 o_normal;
Expand All @@ -21,4 +22,5 @@ void main()
frag_vert = world_vert.xyz;
o_light_dir = vec3(modelinv * vec4(lightposition, 1));
gl_Position = projectionview * world_vert;
gl_Position.z += gl_Position.w * depth_shift;
}
2 changes: 1 addition & 1 deletion GLMakie/src/GLAbstraction/AbstractGPUArray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ gpu_setindex!(t) = error("gpu_setindex! not implemented for: $(typeof(t)). This
max_dim(t) = error("max_dim not implemented for: $(typeof(t)). This happens, when you call setindex! on an array, without implementing the GPUArray interface")


function (::Type{T})(x::Node; kw...) where T <: GPUArray
function (::Type{T})(x::Observable; kw...) where T <: GPUArray
gpu_mem = T(x[]; kw...)
on(x-> update!(gpu_mem, x), x)
gpu_mem
Expand Down
2 changes: 0 additions & 2 deletions GLMakie/src/GLAbstraction/GLAbstraction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ using ShaderAbstractions: current_context, is_context_active, context_alive

import FixedPointNumbers: N0f8, N0f16, N0f8, Normed

import Makie: update!

import Base: merge, resize!, similar, length, getindex, setindex!

include("AbstractGPUArray.jl")
Expand Down
13 changes: 6 additions & 7 deletions GLMakie/src/GLAbstraction/GLRenderObject.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function RenderObject(
data::Dict{Symbol}, program, pre,
bbs=Node(Rect3f(Vec3f(0), Vec3f(1))),
bbs=Observable(Rect3f(Vec3f(0), Vec3f(1))),
main=nothing
)
RenderObject(convert(Dict{Symbol,Any}, data), program, pre, bbs, main)
Expand All @@ -22,16 +22,16 @@ Base.setindex!(obj::RenderObject, value, symbol::Symbol, x::Function) = seti
Base.setindex!(obj::RenderObject, value, ::Val{:prerender}, x::Function) = obj.prerenderfunctions[x] = value
Base.setindex!(obj::RenderObject, value, ::Val{:postrender}, x::Function) = obj.postrenderfunctions[x] = value

const empty_signal = Node(false)
const empty_signal = Observable(false)
post_empty() = push!(empty_signal, false)


"""
Represents standard sets of function applied before rendering
"""
struct StandardPrerender
transparency::Node{Bool}
overdraw::Node{Bool}
transparency::Observable{Bool}
overdraw::Observable{Bool}
end

function (sp::StandardPrerender)()
Expand Down Expand Up @@ -73,14 +73,14 @@ end
export EmptyPrerender
export prerendertype

function instanced_renderobject(data, program, bb=Node(Rect3f(Vec3f(0), Vec3f(1))), primitive::GLenum=GL_TRIANGLES, main=nothing)
function instanced_renderobject(data, program, bb=Observable(Rect3f(Vec3f(0), Vec3f(1))), primitive::GLenum=GL_TRIANGLES, main=nothing)
pre = StandardPrerender()
robj = RenderObject(convert(Dict{Symbol,Any}, data), program, pre, nothing, bb, main)
robj.postrenderfunction = StandardPostrenderInstanced(main, robj.vertexarray, primitive)
robj
end

function std_renderobject(data, program, bb=Node(Rect3f(Vec3f(0), Vec3f(1))), primitive=GL_TRIANGLES, main=nothing)
function std_renderobject(data, program, bb=Observable(Rect3f(Vec3f(0), Vec3f(1))), primitive=GL_TRIANGLES, main=nothing)
pre = StandardPrerender()
robj = RenderObject(convert(Dict{Symbol,Any}, data), program, pre, nothing, bb, main)
robj.postrenderfunction = StandardPostrender(robj.vertexarray, primitive)
Expand All @@ -89,4 +89,3 @@ end

prerendertype(::Type{RenderObject{Pre}}) where {Pre} = Pre
prerendertype(::RenderObject{Pre}) where {Pre} = Pre

6 changes: 3 additions & 3 deletions GLMakie/src/GLAbstraction/GLTypes.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
const TOrSignal{T} = Union{Node{T},T}
const TOrSignal{T} = Union{Observable{T},T}

const ArrayOrSignal{T,N} = TOrSignal{X} where X <: AbstractArray{T,N}
const VecOrSignal{T} = ArrayOrSignal{T,1}
Expand Down Expand Up @@ -109,7 +109,7 @@ struct FrameBuffer{T}
id::GLuint
attachments::Vector{Any}
context::GLContext
function FrameBuffer{T}(dimensions::Node) where T
function FrameBuffer{T}(dimensions::Observable) where T
fb = glGenFramebuffers()
glBindFramebuffer(GL_FRAMEBUFFER, fb)
new(id, attachments, current_context())
Expand Down Expand Up @@ -303,7 +303,7 @@ end
function RenderObject(
data::Dict{Symbol,Any}, program,
pre::Pre, post,
bbs=Node(Rect3f(Vec3f(0), Vec3f(1))),
bbs=Observable(Rect3f(Vec3f(0), Vec3f(1))),
main=nothing
) where Pre
targets = get(data, :gl_convert_targets, Dict())
Expand Down
Loading