Skip to content

Commit

Permalink
pre-review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhonnyg committed May 14, 2024
1 parent fe80378 commit ef09784
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 232 deletions.
4 changes: 0 additions & 4 deletions engine/engine/src/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2040,7 +2040,6 @@ namespace dmEngine
fact_error = dmResource::Get(engine->m_Factory, gamepads, (void**)&gamepad_maps_ddf);
if (fact_error != dmResource::RESULT_OK)
{
dmLogError("failed at input.gamepads: %d", fact_error);
return false;
}
dmInput::RegisterGamepads(engine->m_InputContext, gamepad_maps_ddf);
Expand All @@ -2051,23 +2050,20 @@ namespace dmEngine
fact_error = dmResource::Get(engine->m_Factory, game_input_binding, (void**)&engine->m_GameInputBinding);
if (fact_error != dmResource::RESULT_OK)
{
dmLogError("failed at /input/game.input_bindingc: %d", fact_error);
return false;
}

const char* render_path = dmConfigFile::GetString(config, "bootstrap.render", "/builtins/render/default.renderc");
fact_error = dmResource::Get(engine->m_Factory, render_path, (void**)&engine->m_RenderScriptPrototype);
if (fact_error != dmResource::RESULT_OK)
{
dmLogError("failed at /builtins/render/default.renderc: %d", fact_error);
return false;
}

const char* display_profiles_path = dmConfigFile::GetString(config, "display.display_profiles", "/builtins/render/default.display_profilesc");
fact_error = dmResource::Get(engine->m_Factory, display_profiles_path, (void**)&engine->m_DisplayProfiles);
if (fact_error != dmResource::RESULT_OK)
{
dmLogError("failed at /builtins/render/default.display_profilesc: %d", fact_error);
return false;
}

Expand Down
1 change: 1 addition & 0 deletions engine/engine/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def configure(conf):
glfw_lib = "glfw3-vulkan"
platform_lib = "platform_vulkan"

# JG: for now, we only support validation layers on macos for x86_64 archs. I'll fix this later when/if needed.
if architecture == 'x86_64':
conf.env.append_value('LINKFLAGS', ['-framework', 'Metal', '-framework', 'Foundation', '-framework', 'IOSurface'])

Expand Down
2 changes: 0 additions & 2 deletions engine/graphics/src/graphics_glfw_wrappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

/*
#include <glfw/glfw.h>
#include <glfw/glfw_native.h>
#include "graphics_native.h"
Expand All @@ -35,4 +34,3 @@ namespace dmGraphics
Window GetNativeX11Window() { return glfwGetX11Window(); }
GLXContext GetNativeX11GLXContext() { return glfwGetX11GLXContext(); }
}
*/
2 changes: 0 additions & 2 deletions engine/graphics/src/test/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def build(bld):
use = 'TESTMAIN DDF DLIB SOCKET PROFILE_NULL PLATFORM_NULL graphics_null graphics_transcoder_null',
target = name)

"""
if not bld.env.PLATFORM in ('x86_64-linux','x86_64-ios'):

extra_libs = []
Expand All @@ -37,4 +36,3 @@ def build(bld):
source = 'test_app_graphics.cpp',
use = 'TESTMAIN APP DDF DLIB PROFILE GRAPHICS GRAPHICS_VULKAN graphics_transcoder_basisu'.split() + platform_lib + glfw_lib + extra_libs,
target = 'test_app_graphics')
"""
2 changes: 1 addition & 1 deletion engine/graphics/src/vulkan/graphics_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ namespace dmGraphics

delete[] device_list;

// GLFW3 handles window size changes differenrly, so we need to cater for that.
// GLFW3 handles window size changes differently, so we need to cater for that.
#ifndef __MACH__
if (created_width != context->m_Width || created_height != context->m_Height)
{
Expand Down
4 changes: 2 additions & 2 deletions engine/platform/src/platform_window_glfw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ namespace dmPlatform
return 0;
}

PlatformResult OpenWindowOpenGL(Window* wnd, const WindowParams& params)
static PlatformResult OpenWindowOpenGL(Window* wnd, const WindowParams& params)
{
if (params.m_HighDPI)
{
Expand Down Expand Up @@ -232,7 +232,7 @@ namespace dmPlatform
return PLATFORM_RESULT_OK;
}

PlatformResult OpenWindowVulkan(Window* wnd, const WindowParams& params)
static PlatformResult OpenWindowVulkan(Window* wnd, const WindowParams& params)
{
glfwOpenWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
glfwOpenWindowHint(GLFW_FSAA_SAMPLES, params.m_Samples);
Expand Down
9 changes: 5 additions & 4 deletions engine/platform/src/platform_window_glfw3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ namespace dmPlatform

HWindow NewWindow()
{
#ifdef __MACH__
glfwInitHint(GLFW_COCOA_CHDIR_RESOURCES, GLFW_FALSE);
#endif

if (glfwInit() == GL_FALSE)
{
dmLogError("Could not initialize glfw.");
Expand Down Expand Up @@ -152,7 +155,7 @@ namespace dmPlatform
return 0;
}

PlatformResult OpenWindowOpenGL(Window* wnd, const WindowParams& params)
static PlatformResult OpenWindowOpenGL(Window* wnd, const WindowParams& params)
{
// TODO: This is the setup required for OSX, when we implement the other desktop
// platforms we might want to do this according to platform.
Expand Down Expand Up @@ -183,7 +186,7 @@ namespace dmPlatform
return PLATFORM_RESULT_OK;
}

PlatformResult OpenWindowVulkan(Window* wnd, const WindowParams& params)
static PlatformResult OpenWindowVulkan(Window* wnd, const WindowParams& params)
{
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
glfwWindowHint(GLFW_SAMPLES, params.m_Samples);
Expand All @@ -205,8 +208,6 @@ namespace dmPlatform
return PLATFORM_RESULT_WINDOW_ALREADY_OPENED;
}

glfwWindowHint(GLFW_FOCUSED, GLFW_TRUE);

PlatformResult res = PLATFORM_RESULT_WINDOW_OPEN_ERROR;

switch(params.m_GraphicsApi)
Expand Down
216 changes: 0 additions & 216 deletions share/ext/glfw/patch_3.3.9_backup

This file was deleted.

2 changes: 1 addition & 1 deletion share/extender/build_input.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ context:
"ResourceTypeGameObject", "ResourceTypeCollection", "ResourceTypeScript", "ResourceTypeLua", "ResourceTypeAnim", "ResourceTypeAnimationSet", "ResourceTypeGui", "ResourceTypeGuiScript",
"ResourceProviderFile", "ResourceProviderArchive", "ResourceProviderArchiveMutable", "ResourceProviderZip", "ResourceProviderHttp",
"ComponentTypeScript", "ComponentTypeAnim", "ComponentTypeGui", "ComponentTypeMesh", "ScriptBox2DExt"]
allowedLibs: ["engine","engine_release","profile","profile_null","remotery","remotery_null","profilerext","profilerext_null","crashext","crashext_null","record","record_null","gameobject","ddf","resource","gamesys","graphics","graphics_null","graphics_transcoder_null","graphics_transcoder_basisu","basis_transcoder","physics_2d","physics_3d","physics_null", "platform", "platform_null", "BulletDynamics","BulletCollision","LinearMath","Box2D","render","script","luajit-5.1","extension","hid","hid_null","input","particle","rig","dlib","dmglfw","glfw3","glfw3-vulkan","gui","crashext","sound","sound_null","tremolo","vpx","liveupdate",
allowedLibs: ["engine","engine_release","profile","profile_null","remotery","remotery_null","profilerext","profilerext_null","crashext","crashext_null","record","record_null","gameobject","ddf","resource","gamesys","graphics","graphics_null","graphics_transcoder_null","graphics_transcoder_basisu","basis_transcoder","physics_2d","physics_3d","physics_null", "platform", "platform_vulkan", "platform_null", "BulletDynamics","BulletCollision","LinearMath","Box2D","render","script","luajit-5.1","extension","hid","hid_null","input","particle","rig","dlib","dmglfw","glfw3","glfw3-vulkan","gui","crashext","sound","sound_null","tremolo","vpx","liveupdate",
"libengine.lib","libengine_release.lib","libprofile.lib","libprofile_null.lib","libremotery.lib","libremotery_null.lib","libprofilerext.lib","libprofilerext_null.lib","libcrashext","libcrashext_null","librecord.lib","librecord_null.lib","libgameobject.lib","libddf.lib","libresource.lib","libgamesys.lib","libgraphics.lib","libgraphics_null.lib","libgraphics_transcoder_null.lib","libgraphics_transcoder_basisu.lib","libbasis_transcoder.lib","libphysics_2d.lib","libphysics_3d.lib","libphysics_null.lib","libBulletDynamics.lib","libBulletCollision.lib","libplatform.lib","libplatform_null.lib","libLinearMath.lib","libBox2D.lib","librender.lib",
"libscript.lib","libluajit.lib-5.1","libextension.lib","libhid.lib","libhid_null.lib","libinput.lib","libparticle.lib","librig.lib","libdlib.lib","libdmglfw.lib","libgui.lib","libcrashext.lib","libsound.lib","libsound_null.lib","libtremolo.lib","libvpx.lib","libliveupdate.lib",
"engine_service","engine_service_null","libengine_service.lib","libengine_service_null.lib",
Expand Down

0 comments on commit ef09784

Please sign in to comment.