mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
general: fix a few more compiler warnings
This commit is contained in:
parent
c03a75d755
commit
94cbdc563b
@ -525,7 +525,7 @@ issue_parameters(int altered) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if the size of the shader input and ptr_data match
|
// 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_
|
// dimension is negative only if the parameter had the (deprecated)k_
|
||||||
// prefix.
|
// prefix.
|
||||||
|
@ -11610,17 +11610,18 @@ do_issue_tex_gen() {
|
|||||||
// effectively define an identity matrix that maps the spatial coordinates
|
// 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
|
// one-for-one to UV's. If you want a mapping other than identity, use a
|
||||||
// TexMatrixAttrib (or a TexProjectorEffect).
|
// TexMatrixAttrib (or a TexProjectorEffect).
|
||||||
|
#ifndef OPENGLES
|
||||||
static const PN_stdfloat s_data[4] = { 1, 0, 0, 0 };
|
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 t_data[4] = { 0, 1, 0, 0 };
|
||||||
static const PN_stdfloat r_data[4] = { 0, 0, 1, 0 };
|
static const PN_stdfloat r_data[4] = { 0, 0, 1, 0 };
|
||||||
static const PN_stdfloat q_data[4] = { 0, 0, 0, 1 };
|
static const PN_stdfloat q_data[4] = { 0, 0, 0, 1 };
|
||||||
|
#endif
|
||||||
|
|
||||||
_tex_gen_modifies_mat = false;
|
_tex_gen_modifies_mat = false;
|
||||||
|
|
||||||
bool got_point_sprites = false;
|
bool got_point_sprites = false;
|
||||||
|
|
||||||
for (int i = 0; i < _num_active_texture_stages; i++) {
|
for (int i = 0; i < _num_active_texture_stages; i++) {
|
||||||
TextureStage *stage = _target_texture->get_on_ff_stage(i);
|
|
||||||
set_active_texture_stage(i);
|
set_active_texture_stage(i);
|
||||||
if (_supports_point_sprite) {
|
if (_supports_point_sprite) {
|
||||||
#ifdef OPENGLES
|
#ifdef OPENGLES
|
||||||
@ -11636,6 +11637,7 @@ do_issue_tex_gen() {
|
|||||||
glDisable(GL_TEXTURE_GEN_R);
|
glDisable(GL_TEXTURE_GEN_R);
|
||||||
glDisable(GL_TEXTURE_GEN_Q);
|
glDisable(GL_TEXTURE_GEN_Q);
|
||||||
|
|
||||||
|
TextureStage *stage = _target_texture->get_on_ff_stage(i);
|
||||||
TexGenAttrib::Mode mode = _target_tex_gen->get_mode(stage);
|
TexGenAttrib::Mode mode = _target_tex_gen->get_mode(stage);
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case TexGenAttrib::M_off:
|
case TexGenAttrib::M_off:
|
||||||
|
@ -1382,9 +1382,7 @@ open_raw_mice() {
|
|||||||
void x11GraphicsWindow::
|
void x11GraphicsWindow::
|
||||||
poll_raw_mice() {
|
poll_raw_mice() {
|
||||||
#ifdef PHAVE_LINUX_INPUT_H
|
#ifdef PHAVE_LINUX_INPUT_H
|
||||||
for (int di = 0; di < _mouse_device_info.size(); ++di) {
|
for (MouseDeviceInfo &inf : _mouse_device_info) {
|
||||||
MouseDeviceInfo &inf = _mouse_device_info[di];
|
|
||||||
|
|
||||||
// Read all bytes into buffer.
|
// Read all bytes into buffer.
|
||||||
if (inf._fd >= 0) {
|
if (inf._fd >= 0) {
|
||||||
while (1) {
|
while (1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user