diff --git a/panda/src/glstuff/glCgShaderContext_src.cxx b/panda/src/glstuff/glCgShaderContext_src.cxx index 353c68dc46..c7ba6ad3e7 100644 --- a/panda/src/glstuff/glCgShaderContext_src.cxx +++ b/panda/src/glstuff/glCgShaderContext_src.cxx @@ -525,7 +525,7 @@ issue_parameters(int altered) { } // Check if the size of the shader input and ptr_data match - int input_size = spec._dim[0] * spec._dim[1] * spec._dim[2]; + size_t input_size = spec._dim[0] * spec._dim[1] * spec._dim[2]; // dimension is negative only if the parameter had the (deprecated)k_ // prefix. diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 6958c4ff9a..cde43352bc 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -11610,17 +11610,18 @@ do_issue_tex_gen() { // effectively define an identity matrix that maps the spatial coordinates // one-for-one to UV's. If you want a mapping other than identity, use a // TexMatrixAttrib (or a TexProjectorEffect). +#ifndef OPENGLES static const PN_stdfloat s_data[4] = { 1, 0, 0, 0 }; static const PN_stdfloat t_data[4] = { 0, 1, 0, 0 }; static const PN_stdfloat r_data[4] = { 0, 0, 1, 0 }; static const PN_stdfloat q_data[4] = { 0, 0, 0, 1 }; +#endif _tex_gen_modifies_mat = false; bool got_point_sprites = false; for (int i = 0; i < _num_active_texture_stages; i++) { - TextureStage *stage = _target_texture->get_on_ff_stage(i); set_active_texture_stage(i); if (_supports_point_sprite) { #ifdef OPENGLES @@ -11636,6 +11637,7 @@ do_issue_tex_gen() { glDisable(GL_TEXTURE_GEN_R); glDisable(GL_TEXTURE_GEN_Q); + TextureStage *stage = _target_texture->get_on_ff_stage(i); TexGenAttrib::Mode mode = _target_tex_gen->get_mode(stage); switch (mode) { case TexGenAttrib::M_off: diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 41fa95571d..5eef6b2ea5 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -1382,9 +1382,7 @@ open_raw_mice() { void x11GraphicsWindow:: poll_raw_mice() { #ifdef PHAVE_LINUX_INPUT_H - for (int di = 0; di < _mouse_device_info.size(); ++di) { - MouseDeviceInfo &inf = _mouse_device_info[di]; - + for (MouseDeviceInfo &inf : _mouse_device_info) { // Read all bytes into buffer. if (inf._fd >= 0) { while (1) {