Skip to content

Instantly share code, notes, and snippets.

Created February 27, 2016 04:49
Show Gist options
  • Save anonymous/321de67dfcda9d6b9d3e to your computer and use it in GitHub Desktop.
Save anonymous/321de67dfcda9d6b9d3e to your computer and use it in GitHub Desktop.
julia> Pkg.test("GLVisualize")
INFO: Computing test dependencies for GLVisualize...
INFO: Installing ImageMagick v0.1.2
INFO: Installing QuartzImageIO v0.1.0
INFO: Building Homebrew
HEAD is now at 3e7530c commandbox 3.0.1
HEAD is now at 4a13095 Merge pull request #85 from staticfloat/staging
INFO: Building ImageMagick
INFO: Testing GLVisualize
1 : #version 410
2 :
3 : #extension GL_ARB_conservative_depth: enable
4 :
5 : #define CIRCLE 0
6 : #define RECTANGLE 1
7 : #define ROUNDED_RECTANGLE 2
8 : #define DISTANCEFIELD 3
9 :
10 : in vec4 f_color;
11 : in vec2 f_uv;
12 : flat in uvec2 f_id;
13 : uniform int shape;
14 : uniform bool dotted;
15 :
16 : const float ALIASING_CONST = 0.7710678118654757;
17 :
18 : float aastep(float threshold1, float value) {
19 : float afwidth = length(vec2(dFdx(value), dFdy(value))) * ALIASING_CONST;
20 : return smoothstep(threshold1-afwidth, threshold1+afwidth, value);
21 : }
22 : float aastep(float threshold1, float threshold2, float value) {
23 : float afwidth = length(vec2(dFdx(value), dFdy(value))) * ALIASING_CONST;
24 : return smoothstep(threshold1-afwidth, threshold1+afwidth, value)-smoothstep(threshold2-afwidth, threshold2+afwidth, value);
25 : }
26 : float rectangle(vec2 uv)
27 : {
28 : vec2 d = max(-uv, uv-vec2(1));
29 : return -((length(max(vec2(0.0), d)) + min(0.0, max(d.x, d.y))));
30 : }
31 : float circle(vec2 uv){
32 : return (1-length(uv-0.5))-0.5;
33 : }
34 : float rounded_rectangle(vec2 uv, vec2 tl, vec2 br)
35 : {
36 : vec2 d = max(tl-uv, uv-br);
37 : return -((length(max(vec2(0.0), d)) + min(0.0, max(d.x, d.y)))-tl.x);
38 : }
39 :
40 : layout (depth_greater) out float gl_FragDepth;
41 : out vec4 fragment_color;
42 : out uvec2 fragment_groupid;
43 : void write2framebuffer(vec4 color, uvec2 id){
44 : fragment_color = color;
45 : fragment_groupid = id;
46 : if (color.a > 0.5){
47 : gl_FragDepth = gl_FragCoord.z;
48 : }else{
49 : gl_FragDepth = 1.0;
50 : }
51 : }
52 :
53 : void main(){
54 : vec4 color;
55 : if(dotted){
56 : vec2 uv = vec2(fract(f_uv.x), f_uv.y);
57 : float signed_distance;
58 : if(shape == CIRCLE)
59 : signed_distance = circle(uv);
60 : else if(shape == ROUNDED_RECTANGLE)
61 : signed_distance = rounded_rectangle(uv, vec2(0.2), vec2(0.8));
62 : else if(shape == RECTANGLE)
63 : signed_distance = rectangle(uv);
64 : float inside = aastep(0.0, 120.0, signed_distance);
65 : color = vec4(f_color.rgb, f_color.a*inside);
66 : }else{
67 : color = vec4(f_color.rgb, f_color.a*aastep(0.2, 0.8, f_uv.y));
68 : }
69 : write2framebuffer(color, f_id);
70 : }
71 :
WARNING: shader /Users/dpsanders/.julia/v0.4/GLVisualize/src/../assets/shader/lines.frag didn't compile.
WARNING: 0:3: extension 'GL_ARB_conservative_depth' is not supported
ERROR: 0:40: Unknown identifier 'depth_greater' in layout
WARNING: program 19 not linked. Error in:
/Users/dpsanders/.julia/v0.4/GLVisualize/src/../assets/shader/util.vert or
/Users/dpsanders/.julia/v0.4/GLVisualize/src/../assets/shader/line_segment.vert or
/Users/dpsanders/.julia/v0.4/GLVisualize/src/../assets/shader/line_segment.geom or
/Users/dpsanders/.julia/v0.4/GLVisualize/src/../assets/shader/lines.frag
ERROR: One or more attached shaders not successfully compiled
ERROR: LoadError: Named attribute (:vertex) is not an active attribute in the specified program object or
the name starts with the reserved prefix gl_
in get_attribute_location at /Users/dpsanders/.julia/v0.4/GLAbstraction/src/GLExtendedFunctions.jl:30
in call at /Users/dpsanders/.julia/v0.4/GLAbstraction/src/GLTypes.jl:166
in call at /Users/dpsanders/.julia/v0.4/GLAbstraction/src/GLTypes.jl:246
in assemble_shader at /Users/dpsanders/.julia/v0.4/GLVisualize/src/utils.jl:28
in view_boundingboxes at /Users/dpsanders/.julia/v0.4/GLVisualize/test/runtests.jl:22
in include at /Applications/Julia-0.4.2.app/Contents/Resources/julia/lib/julia/sys.dylib
in include_from_node1 at /Applications/Julia-0.4.2.app/Contents/Resources/julia/lib/julia/sys.dylib
in process_options at /Applications/Julia-0.4.2.app/Contents/Resources/julia/lib/julia/sys.dylib
in _start at /Applications/Julia-0.4.2.app/Contents/Resources/julia/lib/julia/sys.dylib
while loading /Users/dpsanders/.julia/v0.4/GLVisualize/test/runtests.jl, in expression starting on line 80
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: conn 0x14d03 token 0x1ffffffffffe85
Feb 26 23:48:32 julia[9108] <Warning>: Backtrace (at 2541.95):
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 0 CoreGraphics 0x00007fff88c2ce71 CGSDisableUpdateToken + 210
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 1 AppKit 0x00007fff8fbd44c3 ___disable_updates_sync_block_invoke_2 + 17
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 2 libdispatch.dylib 0x00007fff871b3453 _dispatch_client_callout + 8
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 3 libdispatch.dylib 0x00007fff871b4a3a _dispatch_barrier_sync_f_invoke + 74
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 4 AppKit 0x00007fff8fbd4391 NSCGSDisableUpdates + 1162
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 5 AppKit 0x00007fff8fbd3e12 NSCGSTransactionRunPreCommitActionsForOrder_ + 156
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 6 AppKit 0x00007fff8fbd3d59 NSCGSTransactionRunPreCommitActions_ + 21
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 7 AppKit 0x00007fff9037c6de -[_NSCGSTransaction synchronize] + 42
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 8 AppKit 0x00007fff9037c851 NSCGSTransactionSynchronize + 76
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 9 AppKit 0x00007fff90168a19 -[NSSurface syncSurfaceWantsExtendedDynamicRange] + 150
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 10 AppKit 0x00007fff8fca6d59 -[NSSurface _createSurface] + 677
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 11 AppKit 0x00007fff8fca66b4 -[NSSurface setFrame:] + 785
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 12 AppKit 0x00007fff8fca5fbe -[NSSurface syncToViewUnconditionally] + 174
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 13 AppKit 0x00007fff8fca5c6c -[NSSurface orderSurface:relativeTo:] + 101
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 14 AppKit 0x00007fff8fd99d0a NSOpenGLContextAttachOnScreenViewSurface + 183
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 15 AppKit 0x00007fff900c077b __27-[NSOpenGLContext setView:]_block_invoke + 192
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 16 AppKit 0x00007fff8fbc30a9 NSPerformVisuallyAtomicChange + 147
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 17 AppKit 0x00007fff8fd86ad1 -[NSOpenGLContext setView:] + 119
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 18 libglfw3.dylib 0x000000031d42e89d _glfwPlatformCreateWindow + 849
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 19 libglfw3.dylib 0x000000031d42b4d0 glfwCreateWindow + 443
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 20 ??? 0x0000000313b41e0a 0x0 + 13215473162
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 21 ??? 0x0000000313b41b79 0x0 + 13215472505
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 22 ??? 0x0000000313b41761 0x0 + 13215471457
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 23 libjulia.dylib 0x000000010f3ae976 jl_apply_generic + 422
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 24 ??? 0x0000000313b41418 0x0 + 13215470616
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 25 ??? 0x0000000313b3ec8d 0x0 + 13215460493
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 26 ??? 0x0000000313b3e993 0x0 + 13215459731
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 27 libjulia.dylib 0x000000010f3ae976 jl_apply_generic + 422
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 28 ??? 0x0000000313b3a750 0x0 + 13215442768
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 29 ??? 0x0000000313b35a21 0x0 + 13215423009
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 30 ??? 0x0000000313b357c5 0x0 + 13215422405
Feb 26 23:48:32 julia[9108] <Warning>: void CGSUpdateManager::log() const: 31 ??? 0x0000000313b353fe 0x0 + 13215421438
=============================[ ERROR: GLVisualize ]=============================
failed process: Process(`/Applications/Julia-0.4.2.app/Contents/Resources/julia/bin/julia --check-bounds=yes --code-coverage=none --color=yes /Users/dpsanders/.julia/v0.4/GLVisualize/test/runtests.jl`, ProcessExited(1)) [1]
================================================================================
INFO: Removing ImageMagick v0.1.2
INFO: Removing QuartzImageIO v0.1.0
ERROR: GLVisualize had test errors
in error at /Applications/Julia-0.4.2.app/Contents/Resources/julia/lib/julia/sys.dylib
in test at pkg/entry.jl:803
in anonymous at pkg/dir.jl:31
in cd at file.jl:22
in cd at pkg/dir.jl:31
in test at pkg.jl:71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment