draw: draw_distance for 3d spaces, proper positioning of skybox according to it, scenery demo on circle rasters
This commit is contained in:
@ -86,11 +86,12 @@ TWN_API void draw_camera_2d(Vec2 position, /* optional, default: (0, 0) */
|
||||
|
||||
/* sets a perspective 3d camera to be used for all 3d commands */
|
||||
/* fov = 0 corresponds to orthographic projection */
|
||||
TWN_API void draw_camera(Vec3 position,
|
||||
TWN_API void draw_camera(Vec3 position, /* optional, default: (0, 0, 0) */
|
||||
Vec3 direction, /* optional, default: (0, 0, -1) */
|
||||
Vec3 up, /* optional, default: (0, 1, 0) */
|
||||
float fov, /* optional, default: PI / 6 * 3 (90 degrees) */
|
||||
float zoom); /* optional, default: 1 */
|
||||
float zoom, /* optional, default: 1 */
|
||||
float draw_distance); /* optional, default: 100 */
|
||||
|
||||
/* same as draw_camera(), but with first person controller in mind */
|
||||
/* direction and up vectors are inferred from roll, pitch and yaw parameters (in radians) */
|
||||
@ -100,12 +101,13 @@ typedef struct DrawCameraFromPrincipalAxesResult {
|
||||
Vec3 up;
|
||||
} DrawCameraFromPrincipalAxesResult;
|
||||
TWN_API DrawCameraFromPrincipalAxesResult
|
||||
draw_camera_from_principal_axes(Vec3 position,
|
||||
float roll, /* optional, default: 0 */
|
||||
float pitch, /* optional, default: 0 */
|
||||
float yaw, /* optional, default: 0 */
|
||||
float fov, /* optional, default: PI / 6 * 3 (90 degrees) */
|
||||
float zoom); /* optional, default: 1 */
|
||||
draw_camera_from_principal_axes(Vec3 position, /* optional, default: (0, 0, 0) */
|
||||
float roll, /* optional, default: 0 */
|
||||
float pitch, /* optional, default: 0 */
|
||||
float yaw, /* optional, default: 0 */
|
||||
float fov, /* optional, default: PI / 6 * 3 (90 degrees) */
|
||||
float zoom, /* optional, default: 1 */
|
||||
float draw_distance); /* optional, default: 100 */
|
||||
|
||||
/* expects '*' masks that will be expanded to 6 names: 'up', 'down', 'east', 'west', 'north' and 'south' */
|
||||
TWN_API void draw_skybox(const char *textures);
|
||||
|
Reference in New Issue
Block a user