britzl
September 21, 2021, 1:09pm
24
The first thing they would point out is that we use an old version of GLFW
But you have a point, I’m pretty sure there’s something we can do to use the clear color set in game.project immediately when we start (I thought we did this already)
Color is read here on engine init:
dmStrlCat(tmp, "/game.dmanifest", sizeof(tmp));
}
else
{
dmStrlCat(tmp, "game.dmanifest", sizeof(tmp));
}
if (dmSys::ResourceExists(tmp))
{
dmStrlCpy(project_file_uri, "archive:", sizeof(project_file_uri));
But we open the window earlier:
engine_info.m_IsDebug = dLib::IsDebugMode();
dmSys::SetEngineInfo(engine_info);
char* qoe_s = dmSys::GetEnv("DM_QUIT_ON_ESC");
engine->m_QuitOnEsc = ((qoe_s != 0x0) && (qoe_s[0] == '1'));
char project_file[DMPATH_MAX_PATH] = "";
char project_file_uri[DMPATH_MAX_PATH] = "";
char project_file_folder[DMPATH_MAX_PATH] = ".";
bool loaded_ok = false;
char resources_path[DMPATH_MAX_PATH];
dmSys::GetResourcesPath(argc, argv, resources_path, sizeof(resources_path));
if (GetProjectFile(argc, argv, resources_path, project_file, sizeof(project_file)))
{
dmConfigFile::Result cr = dmConfigFile::Load(project_file, argc, (const char**) argv, &engine->m_Config);
if (cr != dmConfigFile::RESULT_OK)
{
if (!engine->m_ConnectionAppMode)
{
Perhaps we can pass in a clear color when the window is opened?
3 Likes
Which part of the engine should I paste these codes into? Thanks! Btw I want to ask if other users using the engine on Windows have ever experienced this behavior too…
britzl
September 21, 2021, 5:03pm
26
What I shared was some of the engine source code. It’s not something to put in your game. But it is the place where one might find a solution.
Pkeod
September 21, 2021, 8:37pm
27
For OpenGL, Vulkan has one too.
if(memcmp(data, gpu_data, sizeof(data))!=0)
{
dmLogDebug("ValidateAsyncJobProcessing cpu<->gpu data check failed. Unable to verify async texture access integrity.");
return false;
}
}
return true;
}
static WindowResult OpenGLOpenWindow(HContext context, WindowParams *params)
{
assert(context);
assert(params);
if (context->m_WindowOpened) return WINDOW_RESULT_ALREADY_OPENED;
if (params->m_HighDPI) {
glfwOpenWindowHint(GLFW_WINDOW_HIGH_DPI, 1);
}
https://www.glfw.org/GLFWUsersGuide273.pdf Newer but still lists the function.
Doesn’t look like a clear function is called right after opening the window for OpenGL or Vulkan, but I think it could be?
glClearColor(0, 0, 0, 1); – color from game.project ?
glClear( GL_COLOR_BUFFER_BIT );
glfwSwapBuffers();
builtin clear
glfwSetWindowSize((int)width, (int)height);
}
}
static void OpenGLGetDefaultTextureFilters(HContext context, TextureFilter& out_min_filter, TextureFilter& out_mag_filter)
{
out_min_filter = context->m_DefaultTextureMinFilter;
out_mag_filter = context->m_DefaultTextureMagFilter;
}
static void OpenGLClear(HContext context, uint32_t flags, uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha, float depth, uint32_t stencil)
{
assert(context);
DM_PROFILE(Graphics, "Clear");
float r = ((float)red)/255.0f;
float g = ((float)green)/255.0f;
float b = ((float)blue)/255.0f;
float a = ((float)alpha)/255.0f;
glClearColor(r, g, b, a);
CHECK_GL_ERROR;
1 Like
I wasn’t going to use it, but should I use an extension? I’ve never seen this kind of behavior on other programs. Or should I just ignore it?
britzl
September 22, 2021, 8:30pm
29
No it needs to be fixed in the engine!
Is there a ticket for this or do you need one?
britzl
September 23, 2021, 9:22am
31
1 Like
I think you’ve already told me the solution, but I don’t think I understood it. Sorry, but can you please explain it to me one more time?
britzl
October 24, 2021, 8:46pm
33
To solve this issue we need to make a change to the engine on when it starts to ensure that the color is set earlier than it is done today.
2 Likes
Is there anyone who solved the same problem?
Of course, the color is also a problem, but the problem is the window that turns off and opens again.
I don’t know if it’ll help, but I’m attaching a video. It glistens and runs in startup like this. Also at the moment of glitter, I can’t see the engine logo on the task bar.
1 Like
These are the logs I got from building…
I just wanted to ignore these, but it’s so annoying…
britzl
November 2, 2021, 3:05pm
41
The logs look just fine.
You’ll have to wait until someone fixes the problem in the Win32 build of the engine.
1 Like
In fact, this appears not only in Windows build but also in Android build.
I don’t think this will be solved quickly. But I’ll wait for someone and continue working.
Thanks to the kind people in the forum, I could still remain. I hope this problem will be resolved soon. Thanks for helping me again!
1 Like