From 95142dbc573d2792f021eb0eb7ae1c7cb96641b0 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 25 Sep 2019 21:55:01 +0200 Subject: Use floats for texture storage, test curl visualization Using `GL_RGBA32F` as the texture storage format instead of packing values into the unit interval. --- utility/opengl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'utility') diff --git a/utility/opengl.py b/utility/opengl.py index afbfa00..ff88b17 100644 --- a/utility/opengl.py +++ b/utility/opengl.py @@ -75,7 +75,7 @@ class MomentsTexture: glBindTexture(self.gl_texture_type, self.gl_moments) if self.gl_texture_type == GL_TEXTURE_3D: - glTexImage3D(self.gl_texture_type, 0, GL_RGBA, self.lattice.memory.size_x, self.lattice.memory.size_y, self.lattice.memory.size_z, 0, GL_RGBA, GL_FLOAT, self.gl_texture_buffer) + glTexImage3D(self.gl_texture_type, 0, GL_RGBA32F, self.lattice.memory.size_x, self.lattice.memory.size_y, self.lattice.memory.size_z, 0, GL_RGBA, GL_FLOAT, self.gl_texture_buffer) glTexParameteri(self.gl_texture_type, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(self.gl_texture_type, GL_TEXTURE_MAG_FILTER, GL_NEAREST) glTexParameteri(self.gl_texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) @@ -83,7 +83,7 @@ class MomentsTexture: glTexParameteri(self.gl_texture_type, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE) self.cl_gl_moments = cl.GLTexture(self.lattice.context, mf.READ_WRITE, self.gl_texture_type, 0, self.gl_moments, 3) elif self.gl_texture_type == GL_TEXTURE_2D: - glTexImage2D(self.gl_texture_type, 0, GL_RGBA, self.lattice.memory.size_x, self.lattice.memory.size_y, 0, GL_RGBA, GL_FLOAT, self.gl_texture_buffer) + glTexImage2D(self.gl_texture_type, 0, GL_RGBA32F, self.lattice.memory.size_x, self.lattice.memory.size_y, 0, GL_RGBA, GL_FLOAT, self.gl_texture_buffer) glTexParameteri(self.gl_texture_type, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(self.gl_texture_type, GL_TEXTURE_MAG_FILTER, GL_NEAREST) glTexParameteri(self.gl_texture_type, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE) -- cgit v1.2.3