big rendering overhaul (cleaning and api abstraction)
This commit is contained in:
@ -23,6 +23,10 @@ typedef struct Context {
|
||||
/* TODO: actually set it */
|
||||
float frame_duration;
|
||||
|
||||
/* it is disabled by having fog_density approximately equal to zero */
|
||||
float fog_start, fog_end, fog_density;
|
||||
Color fog_color;
|
||||
|
||||
/* resolution is set from config and dictates both logical and drawing space, as they're related */
|
||||
/* even if scaling is done, game logic should never change over that */
|
||||
Vec2 resolution;
|
||||
|
@ -88,12 +88,6 @@ TWN_API DrawCameraFromPrincipalAxesResult draw_camera_from_principal_axes(Vec3 p
|
||||
/* expects '*' masks that will be expanded to 6 names: 'up', 'down', 'east', 'west', 'north' and 'south' */
|
||||
TWN_API void draw_skybox(const char *textures);
|
||||
|
||||
/* only one for setting is supported for a frame, any call overwrites previous */
|
||||
TWN_API void draw_fog(float start, /* optional, default: 0.0 */
|
||||
float end, /* optional, default: 1.0 */
|
||||
float density, /* optional, default: 0.0 */
|
||||
Color color); /* optional, default: all 255 */
|
||||
|
||||
|
||||
#ifndef TWN_NOT_C
|
||||
|
||||
|
@ -9,6 +9,7 @@ typedef enum TextureMode {
|
||||
TEXTURE_MODE_OPAQUE, /* all pixels are solid */
|
||||
TEXTURE_MODE_SEETHROUGH, /* some pixels are alpha zero */
|
||||
TEXTURE_MODE_GHOSTLY, /* arbitrary alpha values */
|
||||
TEXTURE_MODE_COUNT,
|
||||
TEXTURE_MODE_UNKNOWN = -1, /* a sentinel */
|
||||
} TextureMode;
|
||||
|
||||
|
Reference in New Issue
Block a user