add startup branding
parent
8eabaa22f0
commit
ab422135b6
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
41
engine/v4k.c
41
engine/v4k.c
|
@ -26748,6 +26748,11 @@ bool window_create_from_handle(void *handle, float scale, unsigned flags) {
|
||||||
int gl_version = gladLoadGL(glfwGetProcAddress);
|
int gl_version = gladLoadGL(glfwGetProcAddress);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// set black screen
|
||||||
|
glClearColor(0,0,0,1);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
glfwSwapBuffers(window);
|
||||||
|
|
||||||
glDebugEnable();
|
glDebugEnable();
|
||||||
|
|
||||||
// setup nuklear ui
|
// setup nuklear ui
|
||||||
|
@ -29800,6 +29805,42 @@ static void v4k_post_init(float refresh_rate) {
|
||||||
|
|
||||||
// display window
|
// display window
|
||||||
glfwShowWindow(window);
|
glfwShowWindow(window);
|
||||||
|
|
||||||
|
// set black screen
|
||||||
|
glClearColor(0,0,0,1);
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
|
glfwSwapBuffers(window);
|
||||||
|
|
||||||
|
texture_t logo_bg = texture("v4_logo_background.png", 0);
|
||||||
|
if (logo_bg.id != texture_checker().id) {
|
||||||
|
texture_t logo_mask = texture("v4_logo_mask.png", 0);
|
||||||
|
font_face(FONT_FACE3, "fonts/Montserrat-Regular.ttf", 48.0f, FONT_EU | FONT_4096 | FONT_OVERSAMPLE_X | FONT_OVERSAMPLE_Y);
|
||||||
|
sprite(logo_bg, vec3(w/2.f, h/2.f, 0).array, 0.0f, 0xFFFFFFFF, SPRITE_CENTERED|SPRITE_RESOLUTION_INDEPENDANT);
|
||||||
|
sprite(logo_mask, vec3(w/2.f, h/2.f, 1).array, 0.0f, 0xFFFFFFFF, SPRITE_CENTERED|SPRITE_RESOLUTION_INDEPENDANT);
|
||||||
|
sprite_flush();
|
||||||
|
font_print(
|
||||||
|
FONT_BOTTOM FONT_CENTER FONT_FACE3 FONT_H3
|
||||||
|
"Powered by V4K engine\n\n\n\n\n\n\n\n\n\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
int year = 2024;
|
||||||
|
{
|
||||||
|
time_t now;
|
||||||
|
time(&now);
|
||||||
|
struct tm *local_time = localtime(&now);
|
||||||
|
year = local_time->tm_year + 1900;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *legalese = va(FONT_CENTER FONT_FACE3 FONT_H4
|
||||||
|
"© %d v4.games. All rights reserved.\nAll other trademarks and copyrights\n" \
|
||||||
|
"are properties of their owners.\n\n\n\n", year);
|
||||||
|
vec2 dims = font_rect(legalese);
|
||||||
|
font_goto(0, window_height()-dims.y);
|
||||||
|
font_print(legalese);
|
||||||
|
|
||||||
|
glfwSwapBuffers(window);
|
||||||
|
}
|
||||||
|
|
||||||
glfwGetFramebufferSize(window, &w, &h); //glfwGetWindowSize(window, &w, &h);
|
glfwGetFramebufferSize(window, &w, &h); //glfwGetWindowSize(window, &w, &h);
|
||||||
|
|
||||||
randset(time_ns() * !tests_captureframes());
|
randset(time_ns() * !tests_captureframes());
|
||||||
|
|
Loading…
Reference in New Issue