aboutsummaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-09-25 21:55:01 +0200
committerAdrian Kummerlaender2019-09-25 21:55:01 +0200
commit95142dbc573d2792f021eb0eb7ae1c7cb96641b0 (patch)
tree9b7336d1dc790aff25c895cc1a44187761078699 /utility
parent191c425e06c040afc0e24fec9c854090fa032461 (diff)
downloadsymlbm_playground-95142dbc573d2792f021eb0eb7ae1c7cb96641b0.tar
symlbm_playground-95142dbc573d2792f021eb0eb7ae1c7cb96641b0.tar.gz
symlbm_playground-95142dbc573d2792f021eb0eb7ae1c7cb96641b0.tar.bz2
symlbm_playground-95142dbc573d2792f021eb0eb7ae1c7cb96641b0.tar.lz
symlbm_playground-95142dbc573d2792f021eb0eb7ae1c7cb96641b0.tar.xz
symlbm_playground-95142dbc573d2792f021eb0eb7ae1c7cb96641b0.tar.zst
symlbm_playground-95142dbc573d2792f021eb0eb7ae1c7cb96641b0.zip
Use floats for texture storage, test curl visualization
Using `GL_RGBA32F` as the texture storage format instead of packing values into the unit interval.
Diffstat (limited to 'utility')
-rw-r--r--utility/opengl.py4
1 files changed, 2 insertions, 2 deletions
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)