win: add viewport_color
parent
d1b5c2b4e9
commit
5a4e56f63c
|
@ -1392,6 +1392,7 @@ typedef struct skybox_t {
|
||||||
void skybox_sh_add_light(skybox_t *sky, vec3 light, vec3 dir, float strength);
|
void skybox_sh_add_light(skybox_t *sky, vec3 light, vec3 dir, float strength);
|
||||||
int skybox_push_state(skybox_t *sky, mat44 proj, mat44 view);
|
int skybox_push_state(skybox_t *sky, mat44 proj, mat44 view);
|
||||||
int skybox_pop_state();
|
int skybox_pop_state();
|
||||||
|
void viewport_color(unsigned color);
|
||||||
void viewport_clear(bool color, bool depth);
|
void viewport_clear(bool color, bool depth);
|
||||||
void viewport_clip(vec2 from, vec2 to);
|
void viewport_clip(vec2 from, vec2 to);
|
||||||
int fx_load(const char *file);
|
int fx_load(const char *file);
|
||||||
|
|
|
@ -17653,6 +17653,7 @@ API int skybox_pop_state(); // @to deprecate
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// post-fxs
|
// post-fxs
|
||||||
|
|
||||||
|
API void viewport_color(unsigned color);
|
||||||
API void viewport_clear(bool color, bool depth);
|
API void viewport_clear(bool color, bool depth);
|
||||||
API void viewport_clip(vec2 from, vec2 to);
|
API void viewport_clip(vec2 from, vec2 to);
|
||||||
|
|
||||||
|
@ -372047,6 +372048,14 @@ void* screenshot_async( int n ) { // 3 RGB, 4 RGBA, -3 BGR, -4 BGRA
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// viewports
|
// viewports
|
||||||
|
|
||||||
|
void viewport_color(unsigned color) {
|
||||||
|
unsigned r = (color >> 0) & 255;
|
||||||
|
unsigned g = (color >> 8) & 255;
|
||||||
|
unsigned b = (color >> 16) & 255;
|
||||||
|
unsigned a = (color >> 24) & 255;
|
||||||
|
glClearColor(r, g, b, a);
|
||||||
|
}
|
||||||
|
|
||||||
void viewport_clear(bool color, bool depth) {
|
void viewport_clear(bool color, bool depth) {
|
||||||
glClearDepthf(1);
|
glClearDepthf(1);
|
||||||
glClearStencil(0);
|
glClearStencil(0);
|
||||||
|
|
|
@ -2010,6 +2010,14 @@ void* screenshot_async( int n ) { // 3 RGB, 4 RGBA, -3 BGR, -4 BGRA
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// viewports
|
// viewports
|
||||||
|
|
||||||
|
void viewport_color(unsigned color) {
|
||||||
|
unsigned r = (color >> 0) & 255;
|
||||||
|
unsigned g = (color >> 8) & 255;
|
||||||
|
unsigned b = (color >> 16) & 255;
|
||||||
|
unsigned a = (color >> 24) & 255;
|
||||||
|
glClearColor(r, g, b, a);
|
||||||
|
}
|
||||||
|
|
||||||
void viewport_clear(bool color, bool depth) {
|
void viewport_clear(bool color, bool depth) {
|
||||||
glClearDepthf(1);
|
glClearDepthf(1);
|
||||||
glClearStencil(0);
|
glClearStencil(0);
|
||||||
|
|
|
@ -631,6 +631,7 @@ API int skybox_pop_state(); // @to deprecate
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// post-fxs
|
// post-fxs
|
||||||
|
|
||||||
|
API void viewport_color(unsigned color);
|
||||||
API void viewport_clear(bool color, bool depth);
|
API void viewport_clear(bool color, bool depth);
|
||||||
API void viewport_clip(vec2 from, vec2 to);
|
API void viewport_clip(vec2 from, vec2 to);
|
||||||
|
|
||||||
|
|
|
@ -19184,6 +19184,14 @@ void* screenshot_async( int n ) { // 3 RGB, 4 RGBA, -3 BGR, -4 BGRA
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// viewports
|
// viewports
|
||||||
|
|
||||||
|
void viewport_color(unsigned color) {
|
||||||
|
unsigned r = (color >> 0) & 255;
|
||||||
|
unsigned g = (color >> 8) & 255;
|
||||||
|
unsigned b = (color >> 16) & 255;
|
||||||
|
unsigned a = (color >> 24) & 255;
|
||||||
|
glClearColor(r, g, b, a);
|
||||||
|
}
|
||||||
|
|
||||||
void viewport_clear(bool color, bool depth) {
|
void viewport_clear(bool color, bool depth) {
|
||||||
glClearDepthf(1);
|
glClearDepthf(1);
|
||||||
glClearStencil(0);
|
glClearStencil(0);
|
||||||
|
|
|
@ -3720,6 +3720,7 @@ API int skybox_pop_state(); // @to deprecate
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// post-fxs
|
// post-fxs
|
||||||
|
|
||||||
|
API void viewport_color(unsigned color);
|
||||||
API void viewport_clear(bool color, bool depth);
|
API void viewport_clear(bool color, bool depth);
|
||||||
API void viewport_clip(vec2 from, vec2 to);
|
API void viewport_clip(vec2 from, vec2 to);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue