aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2022-09-21 22:03:22 +0200
committerAdrian Kummerlaender2022-09-21 22:03:22 +0200
commita49886ba29d0f28d3d4fe562a935defdaeb7a738 (patch)
tree188eecfd696a2a3113e8e5a20f47d9374beb48bc
parent8c207f1424f8865d7e9af990326000b3dc733db4 (diff)
downloadsymlbm_playground-a49886ba29d0f28d3d4fe562a935defdaeb7a738.tar
symlbm_playground-a49886ba29d0f28d3d4fe562a935defdaeb7a738.tar.gz
symlbm_playground-a49886ba29d0f28d3d4fe562a935defdaeb7a738.tar.bz2
symlbm_playground-a49886ba29d0f28d3d4fe562a935defdaeb7a738.tar.lz
symlbm_playground-a49886ba29d0f28d3d4fe562a935defdaeb7a738.tar.xz
symlbm_playground-a49886ba29d0f28d3d4fe562a935defdaeb7a738.tar.zst
symlbm_playground-a49886ba29d0f28d3d4fe562a935defdaeb7a738.zip
Replace deprecated gl_FragColorHEADmaster
-rw-r--r--channel_2d_gl_interop.py4
-rw-r--r--channel_3d_gl_interop.py4
-rw-r--r--channel_3d_sdf_grid_fin_volumetric_rendering_gl_interop.py4
-rw-r--r--channel_3d_volumetric_rendering_gl_interop.py6
-rw-r--r--ldc_3d_gl_interop.py5
-rw-r--r--trugfeuer_2d_gl_interop.py4
6 files changed, 19 insertions, 8 deletions
diff --git a/channel_2d_gl_interop.py b/channel_2d_gl_interop.py
index eaf2c46..8e52d78 100644
--- a/channel_2d_gl_interop.py
+++ b/channel_2d_gl_interop.py
@@ -140,8 +140,10 @@ particle_fragment_shader = shaders.compileShader("""
in vec3 color;
+layout(location = 0) out vec4 frag_color;
+
void main(){
- gl_FragColor = vec4(color.xyz, 0.0);
+ frag_color = vec4(color.xyz, 0.0);
}""", GL_FRAGMENT_SHADER)
particle_vertex_shader = shaders.compileShader(Template("""
diff --git a/channel_3d_gl_interop.py b/channel_3d_gl_interop.py
index 376276c..3b93f86 100644
--- a/channel_3d_gl_interop.py
+++ b/channel_3d_gl_interop.py
@@ -134,8 +134,10 @@ fragment_shader = shaders.compileShader("""
in vec3 color;
+layout(location = 0) out vec4 frag_color;
+
void main(){
- gl_FragColor = vec4(color.xyz, 0.0);
+ frag_color = vec4(color.xyz, 0.0);
}""", GL_FRAGMENT_SHADER)
lighting_vertex_shader = shaders.compileShader("""
diff --git a/channel_3d_sdf_grid_fin_volumetric_rendering_gl_interop.py b/channel_3d_sdf_grid_fin_volumetric_rendering_gl_interop.py
index 41d2958..13896a8 100644
--- a/channel_3d_sdf_grid_fin_volumetric_rendering_gl_interop.py
+++ b/channel_3d_sdf_grid_fin_volumetric_rendering_gl_interop.py
@@ -147,8 +147,10 @@ fragment_shader = shaders.compileShader("""
in vec3 color;
+layout(location = 0) out vec4 frag_color;
+
void main(){
- gl_FragColor = vec4(vec3(0.5), 1.0);
+ frag_color = vec4(vec3(0.5), 1.0);
}""", GL_FRAGMENT_SHADER)
raycast_vertex_shader = shaders.compileShader("""
diff --git a/channel_3d_volumetric_rendering_gl_interop.py b/channel_3d_volumetric_rendering_gl_interop.py
index 28ed003..38d8f54 100644
--- a/channel_3d_volumetric_rendering_gl_interop.py
+++ b/channel_3d_volumetric_rendering_gl_interop.py
@@ -25,7 +25,7 @@ lattice_x = 200
lattice_y = 64
lattice_z = 64
-updates_per_frame = 6
+updates_per_frame = 50
inflow = 0.01
relaxation_time = 0.51
@@ -126,8 +126,10 @@ fragment_shader = shaders.compileShader("""
in vec3 color;
+layout(location = 0) out vec4 frag_color;
+
void main(){
- gl_FragColor = vec4(vec3(0.5), 1.0);
+ frag_color = vec4(vec3(0.5), 1.0);
}""", GL_FRAGMENT_SHADER)
raycast_vertex_shader = shaders.compileShader("""
diff --git a/ldc_3d_gl_interop.py b/ldc_3d_gl_interop.py
index 130d8ec..575dc72 100644
--- a/ldc_3d_gl_interop.py
+++ b/ldc_3d_gl_interop.py
@@ -13,7 +13,6 @@ from OpenGL.GLUT import *
from OpenGL.GL import shaders
from utility.projection import Projection, Rotation
-from utility.opengl import MomentsVertexBuffer
from utility.mouse import MouseDragMonitor, MouseScrollMonitor
lattice_x = 64
@@ -117,8 +116,10 @@ fragment_shader = shaders.compileShader("""
in vec3 color;
+layout(location = 0) out vec4 frag_color;
+
void main(){
- gl_FragColor = vec4(color.xyz, 0.0);
+ frag_color = vec4(color.xyz, 0.0);
}""", GL_FRAGMENT_SHADER)
particle_program = shaders.compileProgram(particle_shader, fragment_shader)
diff --git a/trugfeuer_2d_gl_interop.py b/trugfeuer_2d_gl_interop.py
index b2ec534..0ae7bde 100644
--- a/trugfeuer_2d_gl_interop.py
+++ b/trugfeuer_2d_gl_interop.py
@@ -90,8 +90,10 @@ fragment_shader = shaders.compileShader("""
in vec3 color;
+layout(location = 0) out vec4 frag_color;
+
void main(){
- gl_FragColor = vec4(color.xyz, 0.0);
+ frag_color = vec4(color.xyz, 0.0);
}""", GL_FRAGMENT_SHADER)
particle_shader = shaders.compileShader(Template("""