This repository has been archived on 2025-06-21. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
raylib-python-cffi/tests/test_float_pointers.py
2024-04-05 12:47:38 +01:00

11 lines
No EOL
362 B
Python

import pyray as pr
import pytest
pr.init_window(1280, 720, "any")
shader = pr.load_shader("", "shader.fs")
time = pr.ffi.new("float *", 0.0)
timeLoc = pr.get_shader_location(shader, "uTime")
pr.set_shader_value(shader, timeLoc, time, pr.SHADER_UNIFORM_FLOAT)
with pytest.raises(TypeError):
pr.set_shader_value(shader, timeLoc, 0.0, pr.SHADER_UNIFORM_FLOAT)