Skip to main content
Jordonwillcock's user avatar
Jordonwillcock's user avatar
Jordonwillcock's user avatar
Jordonwillcock
  • Member for 9 months
  • Last seen more than a month ago

Stats

1
reputation
0
reached
0
answers
0
questions

About

version 440

layout(location = 1) in vec2 texCoord; layout(location = 1) in vec2 fragCoord; layout(location = 1) out vec4 fragColor;

layout(std140, binding = 1) uniform buf { mat4 qt_Matrix; float qt_Opacity; vec4 color; vec3 iResolution;layout(location = 1) in vec2 texCoord; layout(location = 1) in vec2 fragCoord; layout(location = 1) out vec4 fragColor;

layout(std140, binding = 1) uniform buf { mat4 qt_Matrix; float qt_Opacity; vec4 color; vec3 iResolution; vec2 rectSize; float radius; float blur; };

float roundedBox(vec2 centerPos, vec2 size, float radii) { return length(max(abs(centerPos) - size + radii, 0.0)) - radii; }

void main() { float box = roundedBox(fragCoord - iResolution.xy * 0.5, rectSize, radius); float a = 1.0 - smoothstep(0.0, blur, box); fragColor = color * qt_Opacity * a * a; }Import Statement: import QtQuick.EffectsMultiEffect { anchors.fill: item source: item shadowEnabled: true shadowColor: "#9B9B9B" shadowBlur: 1.0 shadowHorizontalOffset: 8 shadowVerticalOffset: 8 }cython caller.pyx $ gcc -g -Wall -I/usr/include/python3.12 -c caller.c $ gcc -g -Wall -I/usr/include/python3.12 -c main.c $ gcc -g -Wall -I/usr/include/python3.12 -o main *.o -lpython3.12 $ ./main Segmentation fault (core dumped) Here is a backtrace:from helloworld import hw

cdef public void call_hw(): hw() And here is the contents of my main.c file:

#include <Python.h> #include "caller.h"

int main() { Py_Initialize(); call_hw(); Py_Finalize(); } vec2 rectSize; float radius; float blur; };

float roundedBox(vec2 centerPos, vec2 size, float radii) { return length(max(abs(centerPos) - size + radii, 0.0)) - radii; }

void main() { float box = roundedBox(fragCoord - iResolution.xy * 0.5, rectSize, radius); float a = 1.0 - smoothstep(0.0, blur, box); fragColor = color * qt_Opacity * a * a; }Import Statement: import QtQuick.EffectsMultiEffect { anchors.fill: item source: item shadowEnabled: true shadowColor: "#9B9B9B" shadowBlur: 1.0 shadowHorizontalOffset: 8 shadowVerticalOffset: 8 }cython caller.pyx $ gcc -g -Wall -I/usr/include/python3.12 -c caller.c $ gcc -g -Wall -I/usr/include/python3.12 -c main.c $ gcc -g -Wall -I/usr/include/python3.12 -o main *.o -lpython3.12 $ ./main Segmentation fault (core dumped) Here is a backtrace:from helloworld import hw

cdef public void call_hw(): hw() And here is the contents of my main.c file:

#include <Python.h> #include "caller.h"

int main() { Py_Initialize(); call_hw(); Py_Finalize(); }

Badges

This user doesn’t have any gold badges yet.
This user doesn’t have any silver badges yet.
1
bronze badge

Posts

This user hasn’t posted yet.