mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
fix: address unused parameter warnings and missing port assignment
This commit is contained in:
@@ -246,8 +246,7 @@ void App::window_focus_callback(GLFWwindow* window, int focused) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void App::window_reshape_callback(GLFWwindow* window, int new_width,
|
void App::window_reshape_callback(GLFWwindow* window, int, int) {
|
||||||
int new_height) {
|
|
||||||
|
|
||||||
App* app = static_cast<App*>(glfwGetWindowUserPointer(window));
|
App* app = static_cast<App*>(glfwGetWindowUserPointer(window));
|
||||||
ASSERT_MSG(app, "nullptr");
|
ASSERT_MSG(app, "nullptr");
|
||||||
|
|||||||
@@ -697,8 +697,9 @@ void DevPanel::show_shader_tab_item() {
|
|||||||
ImGui::Checkbox("Flip Y", &m_app.renderer().flip_y());
|
ImGui::Checkbox("Flip Y", &m_app.renderer().flip_y());
|
||||||
if (ImGui::SliderFloat("AmbientStrength",
|
if (ImGui::SliderFloat("AmbientStrength",
|
||||||
&m_app.renderer().ambient_strength(), 0.0f,
|
&m_app.renderer().ambient_strength(), 0.0f,
|
||||||
0.35f))
|
0.35f)) {
|
||||||
;
|
}
|
||||||
|
|
||||||
ImGui::SliderFloat("SpecularStrength",
|
ImGui::SliderFloat("SpecularStrength",
|
||||||
&m_app.renderer().specular_strength(), 0.0f, 2.0f);
|
&m_app.renderer().specular_strength(), 0.0f, 2.0f);
|
||||||
ImGui::Checkbox("Discard Transparent",
|
ImGui::Checkbox("Discard Transparent",
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ void NetworkServer::net_run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NetworkServer::start_server(int port) {
|
void NetworkServer::start_server(int port) {
|
||||||
|
m_port = port;
|
||||||
m_world.init_world();
|
m_world.init_world();
|
||||||
net_run();
|
net_run();
|
||||||
m_started = true;
|
m_started = true;
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ void Renderer::init() {
|
|||||||
#ifdef DEBUG_MODE
|
#ifdef DEBUG_MODE
|
||||||
glEnable(GL_DEBUG_OUTPUT);
|
glEnable(GL_DEBUG_OUTPUT);
|
||||||
glDebugMessageCallback(
|
glDebugMessageCallback(
|
||||||
[](GLenum source, GLenum type, GLuint id, GLenum severity,
|
[](GLenum, GLenum, GLuint, GLenum, GLsizei, const GLchar* message,
|
||||||
GLsizei length, const GLchar* message, const void* user_param) {
|
const void*) {
|
||||||
Logger::log(Logger::Level::L_DEBUG, std::source_location::current(),
|
Logger::log(Logger::Level::L_DEBUG, std::source_location::current(),
|
||||||
"GL Debug: {}", reinterpret_cast<const char*>(message));
|
"GL Debug: {}", reinterpret_cast<const char*>(message));
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user