New examples from @chriscamacho (#23)

* complete fog example
as both fog and basic lighting need the light system it made sense
to seperate it out, there are a few functions from raymath
int rlmath.py

* added shaders custom uniform

* added shaders_texture_waves.py

* added shaders_texture_drawing.py

* bug fix - unwanted transparent effect!

* complete fog example
as both fog and basic lighting need the light system it made sense
to seperate it out, there are a few functions from raymath
int rlmath.py

* added shaders custom uniform

* added shaders_texture_waves.py

* initial commit still WIP

* updated raylib

* undo all changes in this branch except for the example updates

* remove local raylib-c

Co-authored-by: codifies <nospam@antispam.com>
This commit is contained in:
Richard Smith 2020-11-15 20:07:05 +00:00 committed by GitHub
parent 16aec6a0e3
commit 8824449bc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 120 additions and 912 deletions

View file

@ -27,7 +27,19 @@
# *
# ********************************************************************************************/
#<<<<<<< HEAD
#<<<<<<< HEAD
#<<<<<<< HEAD
from raylib.static import rl, ffi
#=======
#from raylib.dynamic import raylib as rl, ffi
#>>>>>>> ffe4403 (complete fog example)
#=======
#from raylib.static import rl, ffi
#>>>>>>> 10b63b9 (added shaders_texture_waves.py)
#=======
#from raylib.static import rl, ffi
#>>>>>>> 1775ffc4b093c881ee44a8027b4143add066d738
from raylib.colors import *
from dataclasses import dataclass
from enum import Enum
@ -42,8 +54,8 @@ from light_system import *
#// Initialization
#//--------------------------------------------------------------------------------------
screenWidth = 800;
screenHeight = 450;
screenWidth = 1200;
screenHeight = 720;
rl.SetConfigFlags(rl.FLAG_MSAA_4X_HINT| rl.FLAG_WINDOW_RESIZABLE); # Enable Multi Sampling Anti Aliasing 4x (if available)
rl.InitWindow(screenWidth, screenHeight, b"raylib [shaders] example - basic lighting")
@ -116,9 +128,19 @@ while not rl.WindowShouldClose(): #// Detect window close button or E
lightSystem.update(camera.position)
# ffi.cast('wchar_t', x)
# modelA.transform = ffi.cast('Matrix *', MatrixRotateY(angle*1.7))[0]
# modelA.transform = MatrixRotateY(angle*1.7)
#// Rotate the torus
modelA.transform = MatrixMultiply(modelA.transform, MatrixRotateX(-0.025))[0]
modelA.transform = MatrixMultiply(modelA.transform, MatrixRotateZ(0.012))[0]
# modelA.transform = MatrixMultiply(modelA.transform, MatrixRotateX(-0.025)[0])[0]
# modelA.transform = MatrixMultiply(modelA.transform, MatrixRotateZ(0.012)[0])[0]
modelA.transform = ffi.cast('Matrix *', MatrixMultiply(modelA.transform, MatrixRotateX(-0.025)))[0]
modelA.transform = ffi.cast('Matrix *', MatrixMultiply(modelA.transform, MatrixRotateZ(0.012)))[0]
if (rl.IsKeyPressed(rl.KEY_F)):
rl.ToggleFullscreen()
#//----------------------------------------------------------------------------------