Skip to content

Commit 03fd24b

Browse files
Suriya Dakshina MurthySuriya Dakshina Murthy
authored andcommitted
emscripten build fix: remove glfw functions
1 parent 0844a59 commit 03fd24b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/shader.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,11 @@ void Shader::begin()
378378
CHK(glUseProgram(m_shader_handle));
379379

380380
// debug: setting uniforms here
381-
float timeValue = glfwGetTime();
382-
float greenValue = (sin(timeValue)/2.0f) + 0.5f;
383-
int vertexColorLocation = glGetUniformLocation(m_shader_handle, "our_color");
384-
glUseProgram(m_shader_handle);
385-
glUniform4f(vertexColorLocation, 0.0f, greenValue, 0.0f, 1.0f);
381+
// float timeValue = glfwGetTime();
382+
// float greenValue = (sin(timeValue)/2.0f) + 0.5f;
383+
// int vertexColorLocation = glGetUniformLocation(m_shader_handle, "our_color");
384+
// glUseProgram(m_shader_handle);
385+
// glUniform4f(vertexColorLocation, 0.0f, greenValue, 0.0f, 1.0f);
386386

387387
#if defined(HELLOIMGUI_USE_GLAD)
388388
CHK(glBindVertexArray(m_vertex_array_handle));

src/webrenderer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ void WebRenderer::draw_background() {
105105
}
106106
//viewport_size = int2{800, 600};
107107

108+
//
109+
// clear the framebuffer and set up the viewport
110+
//
108111
m_render_pass.resize(fbsize);
109112
m_render_pass.set_viewport(viewport_offset * fbscale, viewport_size * fbscale);
110113
m_render_pass.set_clear_color(float4{m_bg_color, 1.f});

0 commit comments

Comments
 (0)