eliminate compiler warnings
This commit is contained in:
parent
384f9df938
commit
1b0f8bd324
|
|
@ -102,3 +102,96 @@ get_null_sound() {
|
|||
return _null_sound;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: AudioManager::audio_3d_update
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void AudioManager::
|
||||
audio_3d_update() {
|
||||
// intentionally blank.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: AudioManager::audio_3d_set_listener_attributes
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void AudioManager::
|
||||
audio_3d_set_listener_attributes(float px, float py, float pz, float vx, float vy, float vz, float fx, float fy, float fz, float ux, float uy, float uz) {
|
||||
// intentionally blank.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: AudioManager::audio_3d_get_listener_attributes
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void AudioManager::
|
||||
audio_3d_get_listener_attributes(float *px, float *py, float *pz, float *vx, float *vy, float *vz, float *fx, float *fy, float *fz, float *ux, float *uy, float *uz) {
|
||||
// intentionally blank.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: AudioManager::audio_3d_set_distance_factor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void AudioManager::
|
||||
audio_3d_set_distance_factor(float factor) {
|
||||
// intentionally blank.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: AudioManager::audio_3d_get_distance_factor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
float AudioManager::
|
||||
audio_3d_get_distance_factor() const {
|
||||
// intentionally blank.
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: AudioManager::audio_3d_set_doppler_factor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void AudioManager::
|
||||
audio_3d_set_doppler_factor(float factor) {
|
||||
// intentionally blank.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: AudioManager::audio_3d_get_doppler_factor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
float AudioManager::
|
||||
audio_3d_get_doppler_factor() const {
|
||||
// intentionally blank.
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: AudioManager::audio_3d_set_drop_off_factor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void AudioManager::
|
||||
audio_3d_set_drop_off_factor(float factor) {
|
||||
// intentionally blank.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: AudioManager::audio_3d_get_drop_off_factor
|
||||
// Access: Public
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
float AudioManager::
|
||||
audio_3d_get_drop_off_factor() const {
|
||||
// intentionally blank.
|
||||
return 0.0f;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,41 +108,40 @@ PUBLISHED:
|
|||
// Changes to the positions of 3D spacialized sounds and the listener
|
||||
// are all made at once when this method is called. It should be put
|
||||
// in the main program loop.
|
||||
virtual void audio_3d_update() = 0;
|
||||
virtual void audio_3d_update();
|
||||
|
||||
// This controls the "set of ears" that listens to 3D spacialized sound
|
||||
// px, py, pz are position coordinates. Can be NULL to ignore.
|
||||
// vx, vy, vz are a velocity vector in UNITS PER SECOND (default: meters). Can be NULL to ignore.
|
||||
// px, py, pz are position coordinates.
|
||||
// vx, vy, vz are a velocity vector in UNITS PER SECOND (default: meters).
|
||||
// fx, fy and fz are the respective components of a unit forward-vector
|
||||
// ux, uy and uz are the respective components of a unit up-vector
|
||||
// These changes will NOT be invoked until audio_3d_update() is called.
|
||||
virtual void audio_3d_set_listener_attributes(float px, float py, float pz,
|
||||
float vx, float vy, float vz,
|
||||
float fx, float fy, float fz,
|
||||
float ux, float uy, float uz) = 0;
|
||||
// Values should all default to NULL, so you can just pass the one you want to get.
|
||||
virtual void audio_3d_get_listener_attributes(float px = NULL, float py = NULL, float pz = NULL,
|
||||
float vx = NULL, float vy = NULL, float vz = NULL,
|
||||
float fx = NULL, float fy = NULL, float fz = NULL,
|
||||
float ux = NULL, float uy = NULL, float uz = NULL) = 0;
|
||||
float ux, float uy, float uz);
|
||||
virtual void audio_3d_get_listener_attributes(float *px, float *py, float *pz,
|
||||
float *vx, float *vy, float *vz,
|
||||
float *fx, float *fy, float *fz,
|
||||
float *ux, float *uy, float *uz);
|
||||
|
||||
// Control the "relative distance factor" for 3D spacialized audio. Default is 1.0
|
||||
// Fmod uses meters internally, so give a float in Units-per meter
|
||||
// Don't know what Miles uses.
|
||||
virtual void audio_3d_set_distance_factor(float factor) = 0;
|
||||
virtual float audio_3d_get_distance_factor() const = 0;
|
||||
virtual void audio_3d_set_distance_factor(float factor);
|
||||
virtual float audio_3d_get_distance_factor() const;
|
||||
|
||||
// Control the presence of the Doppler effect. Default is 1.0
|
||||
// Exaggerated Doppler, use >1.0
|
||||
// Diminshed Doppler, use <1.0
|
||||
virtual void audio_3d_set_doppler_factor(float factor) = 0;
|
||||
virtual float audio_3d_get_doppler_factor() const = 0;
|
||||
virtual void audio_3d_set_doppler_factor(float factor);
|
||||
virtual float audio_3d_get_doppler_factor() const;
|
||||
|
||||
// Exaggerate or diminish the effect of distance on sound. Default is 1.0
|
||||
// Faster drop off, use >1.0
|
||||
// Slower drop off, use <1.0
|
||||
virtual void audio_3d_set_drop_off_factor(float factor) = 0;
|
||||
virtual float audio_3d_get_drop_off_factor() const = 0;
|
||||
virtual void audio_3d_set_drop_off_factor(float factor);
|
||||
virtual float audio_3d_get_drop_off_factor() const;
|
||||
|
||||
public:
|
||||
static void register_AudioManager_creator(Create_AudioManager_proc* proc);
|
||||
|
|
|
|||
|
|
@ -98,12 +98,12 @@ PUBLISHED:
|
|||
// Controls the position of this sound's emitter.
|
||||
// px, py and pz are the emitter's position.
|
||||
// vx, vy and vz are the emitter's velocity in UNITS PER SECOND (default: meters).
|
||||
// You can pass NULL to either value for either function to ignore that value
|
||||
// You can pass 0.0 to either value for either function to ignore that value
|
||||
// if you only want to set/get one of them for some reason.
|
||||
virtual void set_3d_attributes(float px = NULL, float py = NULL, float pz = NULL,
|
||||
float vx = NULL, float vy = NULL, float vz = NULL) = 0;
|
||||
virtual void get_3d_attributes(float px = NULL, float py = NULL, float pz = NULL,
|
||||
float vx = NULL, float vy = NULL, float vz = NULL) = 0;
|
||||
virtual void set_3d_attributes(float px = 0.0f, float py = 0.0f, float pz = 0.0f,
|
||||
float vx = 0.0f, float vy = 0.0f, float vz = 0.0f) = 0;
|
||||
virtual void get_3d_attributes(float px = 0.0f, float py = 0.0f, float pz = 0.0f,
|
||||
float vx = 0.0f, float vy = 0.0f, float vz = 0.0f) = 0;
|
||||
|
||||
enum SoundStatus { BAD, READY, PLAYING };
|
||||
virtual SoundStatus status() const = 0;
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ audio_3d_set_listener_attributes(float px, float py, float pz, float vx, float v
|
|||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void NullAudioManager::
|
||||
audio_3d_get_listener_attributes(float px, float py, float pz, float vx, float vy, float vz, float fx, float fy, float fz, float ux, float uy, float uz) {
|
||||
audio_3d_get_listener_attributes(float *px, float *py, float *pz, float *vx, float *vy, float *vz, float *fx, float *fy, float *fz, float *ux, float *uy, float *uz) {
|
||||
// intentionally blank.
|
||||
}
|
||||
|
||||
|
|
@ -276,4 +276,4 @@ float NullAudioManager::
|
|||
audio_3d_get_drop_off_factor() const {
|
||||
// intentionally blank.
|
||||
return 0.0f;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@ public:
|
|||
float vx, float vy, float vz,
|
||||
float fx, float fy, float fz,
|
||||
float ux, float uy, float uz);
|
||||
virtual void audio_3d_get_listener_attributes(float px = NULL, float py = NULL, float pz = NULL,
|
||||
float vx = NULL, float vy = NULL, float vz = NULL,
|
||||
float fx = NULL, float fy = NULL, float fz = NULL,
|
||||
float ux = NULL, float uy = NULL, float uz = NULL);
|
||||
virtual void audio_3d_get_listener_attributes(float *px, float *py, float *pz,
|
||||
float *vx, float *vy, float *vz,
|
||||
float *fx, float *fy, float *fz,
|
||||
float *ux, float *uy, float *uz);
|
||||
|
||||
virtual void audio_3d_set_distance_factor(float factor);
|
||||
virtual float audio_3d_get_distance_factor() const;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
namespace {
|
||||
static const string blank="";
|
||||
static float no_attributes [] = {0.0f,0.0f,0.0f, 0.0f,0.0f,0.0f};
|
||||
// static float no_attributes [] = {0.0f,0.0f,0.0f, 0.0f,0.0f,0.0f};
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -608,7 +608,7 @@ audio_3d_set_listener_attributes(float px, float py, float pz, float vx, float v
|
|||
// Description: Get position of the "ear" that picks up 3d sounds
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void FmodAudioManager::
|
||||
audio_3d_get_listener_attributes(float px, float py, float pz, float vx, float vy, float vz, float fx, float fy, float fz, float ux, float uy, float uz) {
|
||||
audio_3d_get_listener_attributes(float *px, float *py, float *pz, float *vx, float *vy, float *vz, float *fx, float *fy, float *fz, float *ux, float *uy, float *uz) {
|
||||
audio_error("audio3dGetListenerAttributes: currently unimplemented. Get the attributes of the attached object");
|
||||
//audio_debug("FmodAudioManager::audio_3d_get_listener_attributes()");
|
||||
// NOTE: swap the +y with the +z axis to convert between FMOD
|
||||
|
|
|
|||
|
|
@ -76,8 +76,8 @@ public:
|
|||
virtual void audio_3d_update();
|
||||
|
||||
// This controls the "set of ears" that listens to 3D spacialized sound
|
||||
// px, py, pz are position coordinates. Can be NULL to ignore.
|
||||
// vx, vy, vz are a velocity vector in UNITS PER SECOND (default: meters). Can be NULL to ignore.
|
||||
// px, py, pz are position coordinates. Can be 0.0f to ignore.
|
||||
// vx, vy, vz are a velocity vector in UNITS PER SECOND (default: meters).
|
||||
// fx, fy and fz are the respective components of a unit forward-vector
|
||||
// ux, uy and uz are the respective components of a unit up-vector
|
||||
// These changes will NOT be invoked until audio_3d_update() is called.
|
||||
|
|
@ -85,11 +85,10 @@ public:
|
|||
float vx, float xy, float xz,
|
||||
float fx, float fy, float fz,
|
||||
float ux, float uy, float uz);
|
||||
// Values should all default to NULL, so you can just pass the one you want to get.
|
||||
virtual void audio_3d_get_listener_attributes(float px = NULL, float py = NULL, float pz = NULL,
|
||||
float vx = NULL, float vy = NULL, float vz = NULL,
|
||||
float fx = NULL, float fy = NULL, float fz = NULL,
|
||||
float ux = NULL, float uy = NULL, float uz = NULL);
|
||||
virtual void audio_3d_get_listener_attributes(float *px, float *py, float *pz,
|
||||
float *vx, float *vy, float *vz,
|
||||
float *fx, float *fy, float *fz,
|
||||
float *ux, float *uy, float *uz);
|
||||
|
||||
// Control the "relative distance factor" for 3D spacialized audio. Default is 1.0
|
||||
// Fmod uses meters internally, so give a float in Units-per meter
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ set_3d_attributes(float px, float py, float pz, float vx, float vy, float vz) {
|
|||
// Description: Get position and velocity of this sound
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void FmodAudioSound::
|
||||
get_3d_attributes(float px, float py, float pz, float vx, float vy, float vz) {
|
||||
get_3d_attributes(float *px, float *py, float *pz, float *vx, float *vy, float *vz) {
|
||||
audio_error("get3dAttributes: Currently unimplemented. Get the attributes of the attached object.");
|
||||
// NOTE: swap the +y with the +z axis to convert between FMOD
|
||||
// coordinates and Panda3D coordinates
|
||||
|
|
|
|||
|
|
@ -81,12 +81,10 @@ public:
|
|||
// Controls the position of this sound's emitter.
|
||||
// pos is a pointer to an xyz triplet of the emitter's position.
|
||||
// vel is a pointer to an xyz triplet of the emitter's velocity.
|
||||
// You can pass NULL to either value for either function to ignore that value
|
||||
// if you only want to set/get one of them for some reason.
|
||||
void set_3d_attributes(float px = NULL, float py = NULL, float pz = NULL,
|
||||
float vx = NULL, float vy = NULL, float vz = NULL);
|
||||
void get_3d_attributes(float px = NULL, float py = NULL, float pz = NULL,
|
||||
float vx = NULL, float vy = NULL, float vz = NULL);
|
||||
void set_3d_attributes(float px, float py, float pz,
|
||||
float vx, float vy, float vz);
|
||||
void get_3d_attributes(float *px, float *py, float *pz,
|
||||
float *vx, float *vy, float *vz);
|
||||
|
||||
AudioSound::SoundStatus status() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ CgShader(const string &name, const string &vertex_shader,
|
|||
_name = name;
|
||||
_vertex_shader = vertex_shader;
|
||||
_fragment_shader = fragment_shader;
|
||||
bool res = init_cg();
|
||||
init_cg();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
INLINE CLP(CgShaderContext)::
|
||||
CLP(CgShaderContext)(PT(CgShader) cg_shader) :
|
||||
CgShaderContext(cg_shader) {
|
||||
bool res = init_cg_shader_context();
|
||||
init_cg_shader_context();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -2365,7 +2365,7 @@ issue_cg_shader_bind(const CgShaderAttrib *attrib) {
|
|||
(*csci).second->bind(this); // Bind the current shader
|
||||
} else {// First time CgShader object...need to make a new GLCgShaderContext
|
||||
PT(CLP(CgShaderContext)) csc = new CLP(CgShaderContext)(_cg_shader);
|
||||
bool result = _cg_shader->load_shaders(); // Profiles created lets load from HD
|
||||
_cg_shader->load_shaders(); // Profiles created lets load from HD
|
||||
csc->load_shaders(); // Programs loaded, compile and download to GPU
|
||||
CGSHADERCONTEXTS::value_type shader_and_context(_cg_shader, csc);
|
||||
_gl_cg_shader_contexts.insert(shader_and_context);
|
||||
|
|
|
|||
Loading…
Reference in New Issue