diff --git a/direct/src/actor/Actor.py b/direct/src/actor/Actor.py index 8a7ef093b0..b9ba299aaa 100644 --- a/direct/src/actor/Actor.py +++ b/direct/src/actor/Actor.py @@ -1103,8 +1103,8 @@ class Actor(DirectObject, NodePath): # Get a handle to the joint. joint = bundle.findChild(jointName) - if node == None: - node = self.attachNewNode(jointName) + if node is None: + node = partDef.partBundleNP.attachNewNode(jointName) if (joint): if localTransform: diff --git a/direct/src/filter/CommonFilters.py b/direct/src/filter/CommonFilters.py index 493f2d9794..894b57c321 100644 --- a/direct/src/filter/CommonFilters.py +++ b/direct/src/filter/CommonFilters.py @@ -131,6 +131,9 @@ class CommonFilters: if (len(configuration) == 0): return + if not self.manager.win.gsg.getSupportsBasicShaders(): + return False + auxbits = 0 needtex = set(["color"]) needtexcoord = set(["color"]) @@ -338,7 +341,10 @@ class CommonFilters: text += " o_color = float4(1, 1, 1, 1) - o_color;\n" text += "}\n" - self.finalQuad.setShader(Shader.make(text, Shader.SL_Cg)) + shader = Shader.make(text, Shader.SL_Cg) + if not shader: + return False + self.finalQuad.setShader(shader) for tex in self.textures: self.finalQuad.setShaderInput("tx"+tex, self.textures[tex]) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 23588cb978..3f94601af5 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -1279,8 +1279,7 @@ class ShowBase(DirectObject.DirectObject): if win == None: win = self.win - if win != None and win.getSideBySideStereo() and \ - win.hasSize() and win.getSbsLeftYSize() != 0: + if win != None and win.hasSize() and win.getSbsLeftYSize() != 0: aspectRatio = float(win.getSbsLeftXSize()) / float(win.getSbsLeftYSize()) else: if win == None or not hasattr(win, "getRequestedProperties"): @@ -2823,9 +2822,10 @@ class ShowBase(DirectObject.DirectObject): # changed and update the camera lenses and aspect2d parameters self.adjustWindowAspectRatio(self.getAspectRatio()) - if win.getSideBySideStereo() and win.hasSize() and win.getSbsLeftYSize() != 0: + if win.hasSize() and win.getSbsLeftYSize() != 0: self.pixel2d.setScale(2.0 / win.getSbsLeftXSize(), 1.0, 2.0 / win.getSbsLeftYSize()) - self.pixel2dp.setScale(2.0 / win.getSbsLeftXSize(), 1.0, 2.0 / win.getSbsLeftYSize()) + if self.wantRender2dp: + self.pixel2dp.setScale(2.0 / win.getSbsLeftXSize(), 1.0, 2.0 / win.getSbsLeftYSize()) else: xsize, ysize = self.getSize() if xsize > 0 and ysize > 0: diff --git a/panda/src/audiotraits/openalAudioSound.cxx b/panda/src/audiotraits/openalAudioSound.cxx index da379bfd5c..9abaf24036 100644 --- a/panda/src/audiotraits/openalAudioSound.cxx +++ b/panda/src/audiotraits/openalAudioSound.cxx @@ -435,7 +435,11 @@ pull_used_buffers() { ReMutexHolder holder(OpenALAudioManager::_lock); while (_stream_queued.size()) { ALuint buffer = 0; - alGetError(); + ALint num_buffers = 0; + alGetSourcei(_source, AL_BUFFERS_PROCESSED, &num_buffers); + if (num_buffers <= 0) { + break; + } alSourceUnqueueBuffers(_source, 1, &buffer); int err = alGetError(); if (err == AL_NO_ERROR) { diff --git a/panda/src/glesgsg/glesgsg.h b/panda/src/glesgsg/glesgsg.h index c0afb58b56..64d64db216 100644 --- a/panda/src/glesgsg/glesgsg.h +++ b/panda/src/glesgsg/glesgsg.h @@ -62,6 +62,9 @@ // #include #endif +// Some implementations (Arch Linux) set this in glext.h +typedef char GLchar; + #include "panda_esglext.h" // This helps to keep the source clean of hundreds of ifdefs. diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index ec9d1d603f..af84e2bafd 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -7585,7 +7585,7 @@ make_shadow_buffer(LightLensNode *light, Texture *tex, GraphicsOutput *host) { flags |= GraphicsPipe::BF_size_square; } - CLP(GraphicsBuffer) *sbuffer = new GLGraphicsBuffer(get_engine(), get_pipe(), light->get_name(), fbp, props, flags, this, host); + CLP(GraphicsBuffer) *sbuffer = new CLP(GraphicsBuffer)(get_engine(), get_pipe(), light->get_name(), fbp, props, flags, this, host); sbuffer->add_render_texture(tex, GraphicsOutput::RTM_bind_or_copy, GraphicsOutput::RTP_depth); get_engine()->add_window(sbuffer, light->get_shadow_buffer_sort()); return sbuffer; diff --git a/panda/src/ode/odeTriMeshData.cxx b/panda/src/ode/odeTriMeshData.cxx index 5f02cefa56..a87853c4bb 100644 --- a/panda/src/ode/odeTriMeshData.cxx +++ b/panda/src/ode/odeTriMeshData.cxx @@ -99,6 +99,7 @@ OdeTriMeshData(const NodePath& model, bool use_normals) : write_faces(odetrimeshdata_cat.debug()); +#ifdef dSINGLE if (!use_normals) { build_single(_vertices, sizeof(StridedVertex), _num_vertices, _faces, _num_faces * 3, sizeof(StridedTri)); @@ -107,6 +108,16 @@ OdeTriMeshData(const NodePath& model, bool use_normals) : _faces, _num_faces * 3, sizeof(StridedTri), _normals); } +#else + if (!use_normals) { + build_double(_vertices, sizeof(StridedVertex), _num_vertices, + _faces, _num_faces * 3, sizeof(StridedTri)); + } else { + build_double1(_vertices, sizeof(StridedVertex), _num_vertices, + _faces, _num_faces * 3, sizeof(StridedTri), + _normals); + } +#endif preprocess(); }