Skip to content
This repository was archived by the owner on Apr 28, 2021. It is now read-only.

Commit 7af0399

Browse files
authored
Merge pull request #41 from JuliaGL/sd/images
changes for new images
2 parents 2586162 + 1c5fc5b commit 7af0399

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

src/GLWindow.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ using FixedSizeArrays
1313
using Compat
1414
using FileIO
1515

16-
import GLFW.Window
17-
import GLFW.Monitor
16+
import GLFW: Window, Monitor
1817
import GLAbstraction.render
1918
import GeometryTypes.widths
2019

20+
if isdefined(FixedPointNumbers, :N0f8)
21+
import FixedPointNumbers: N0f8
22+
else
23+
const N0f8 = FixedPointNumbers.UFixed8
24+
end
25+
2126
include("types.jl")
2227

2328
include("core.jl")

src/screen.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,10 @@ function Base.delete!(screen::Screen, robj::RenderObject)
454454
deleted, i = delete_robj!(renderlist, robj)
455455
deleted && return true
456456
end
457+
for renderlist in screen.renderlist_fxaa
458+
deleted, i = delete_robj!(renderlist, robj)
459+
deleted && return true
460+
end
457461
false
458462
end
459463

src/types.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ end
1919
typealias PostProcessROBJ RenderObject{PostprocessPrerender}
2020
type GLFramebuffer
2121
id ::NTuple{2, GLuint}
22-
color ::Texture{RGBA{UFixed8}, 2}
22+
color ::Texture{RGBA{N0f8}, 2}
2323
objectid ::Texture{Vec{2, GLushort}, 2}
2424
depth ::GLuint
25-
color_luma ::Texture{RGBA{UFixed8}, 2}
25+
color_luma ::Texture{RGBA{N0f8}, 2}
2626
postprocess::NTuple{3, PostProcessROBJ}
2727
end
2828
Base.size(fb::GLFramebuffer) = size(fb.color) # it's guaranteed, that they all have the same size
@@ -85,7 +85,7 @@ function GLFramebuffer(fb_size)
8585
glBindFramebuffer(GL_FRAMEBUFFER, render_framebuffer)
8686

8787
buffersize = tuple(value(fb_size)...)
88-
color_buffer = Texture(RGBA{UFixed8}, buffersize, minfilter=:nearest, x_repeat=:clamp_to_edge)
88+
color_buffer = Texture(RGBA{N0f8}, buffersize, minfilter=:nearest, x_repeat=:clamp_to_edge)
8989
objectid_buffer = Texture(Vec{2, GLushort}, buffersize, minfilter=:nearest, x_repeat=:clamp_to_edge)
9090
depth_stencil_rb = Ref{GLuint}()
9191
glGenRenderbuffers(1, depth_stencil_rb)
@@ -100,7 +100,7 @@ function GLFramebuffer(fb_size)
100100
status = glCheckFramebufferStatus(GL_FRAMEBUFFER)
101101
@assert status == GL_FRAMEBUFFER_COMPLETE
102102

103-
color_luma = Texture(RGBA{UFixed8}, buffersize, minfilter=:linear, x_repeat=:clamp_to_edge)
103+
color_luma = Texture(RGBA{N0f8}, buffersize, minfilter=:linear, x_repeat=:clamp_to_edge)
104104
color_luma_framebuffer = glGenFramebuffers()
105105
glBindFramebuffer(GL_FRAMEBUFFER, color_luma_framebuffer)
106106
attach_framebuffer(color_luma, GL_COLOR_ATTACHMENT0)

0 commit comments

Comments
 (0)