remove depreciated stuff, tidy build a bit for 4.0

This commit is contained in:
richard 2021-10-13 16:35:35 +01:00
parent c818fae902
commit 775d2da32d
17 changed files with 63 additions and 201 deletions

View file

@ -30,7 +30,7 @@ model = LoadModelFromMesh(mesh)
# NOTE: By default each cube is mapped to one part of texture atlas
texture = LoadTexture(b"resources/cubicmap_atlas.png") # Load map texture
model.materials[0].maps[MATERIAL_MAP_DIFFUSE ].texture = texture # Set map diffuse texture
model.materials[0].maps[MATERIAL_MAP_ALBEDO ].texture = texture # Set map diffuse texture
mapPosition = [ -16.0, 0.0, -8.0 ] # Set model position

View file

@ -27,7 +27,7 @@ texture = LoadTextureFromImage(image) # Convert image to texture
mesh = GenMeshHeightmap(image, ( 16, 8, 16 )) # Generate heightmap mesh (RAM and VRAM)
model = LoadModelFromMesh(mesh) # Load model from generated mesh
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture # Set map diffuse texture
model.materials[0].maps[MATERIAL_MAP_ALBEDO].texture = texture # Set map diffuse texture
mapPosition = ( -8.0, 0.0, -8.0 ) # Define model position
UnloadImage(image) # Unload heightmap image from RAM, already uploaded to VRAM

View file

@ -30,7 +30,7 @@ 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[MATERIAL_MAP_DIFFUSE].texture = texture # Set map diffuse texture
model.materials.maps[MATERIAL_MAP_ALBEDO].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