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:
parent
16aec6a0e3
commit
8824449bc1
27 changed files with 120 additions and 912 deletions
|
@ -20,15 +20,17 @@ InitWindow(screenWidth, screenHeight, b"raylib [models] example - obj model load
|
|||
|
||||
# Define the camera to look into our 3d world
|
||||
camera = ffi.new("struct Camera3D *")
|
||||
camera.position = [ 50.0, 50.0, 50.0 ] # Camera position
|
||||
camera.position = [ 5.0, 5.0, 5.0 ] # Camera position
|
||||
camera.target = [ 0.0, 2.5, 0.0 ] # Camera looking at point
|
||||
camera.up = [ 0.0, 1.0, 0.0 ] # Camera up vector (rotation towards target)
|
||||
camera.fovy = 45.0 # Camera field-of-view Y
|
||||
camera.type = CAMERA_PERSPECTIVE # Camera mode type
|
||||
|
||||
model = LoadModel(b"resources/models/monkey/monkey4.gltf") # Load OBJ model
|
||||
texture = LoadTexture(b"resources/models/castle_diffuse.png") # Load model texture
|
||||
#model.materials.maps[MAP_DIFFUSE].texture = texture # Set map diffuse texture
|
||||
rl.SetCameraMode(camera[0], rl.CAMERA_ORBITAL)
|
||||
|
||||
model = LoadModel(b"resources/models/house.obj") # Load OBJ model
|
||||
texture = LoadTexture(b"resources/models/house_diffuse.png") # Load model texture
|
||||
model.materials.maps[MAP_DIFFUSE].texture = texture # Set map diffuse texture
|
||||
position = [ 0.0, 0.0, 0.0 ] # Set model position
|
||||
|
||||
SetTargetFPS(60) # Set our game to run at 60 frames-per-second
|
||||
|
@ -40,7 +42,7 @@ while not WindowShouldClose(): # Detect window close button or ESC key
|
|||
#----------------------------------------------------------------------------------
|
||||
#...
|
||||
#----------------------------------------------------------------------------------
|
||||
|
||||
rl.UpdateCamera(camera);
|
||||
# Draw
|
||||
#----------------------------------------------------------------------------------
|
||||
BeginDrawing()
|
||||
|
|
Reference in a new issue