Skip to content

Commit 10cfa74

Browse files
committed
Allow specifying RenderSurface type
1 parent be56469 commit 10cfa74

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/quad.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ mutable struct RenderSurface
1010
va::VertexArray
1111
end
1212

13-
function RenderSurface(; width::Integer, height::Integer)
14-
texture = Texture(width, height; internal_format=GL_RGB32F, type=GL_FLOAT)
13+
function RenderSurface(;
14+
width::Integer, height::Integer,
15+
internal_format = GL_RGB32F, data_type = GL_FLOAT,
16+
)
17+
texture = Texture(width, height; internal_format, type=data_type)
1518
program = get_program(RenderSurface)
1619
bind(program)
1720
upload_uniform(program, "u_Texture", 0)

0 commit comments

Comments
 (0)