mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Merge branch 'master' into input-overhaul
This commit is contained in:
commit
27bd7ae4ac
@ -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:
|
||||
|
@ -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])
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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) {
|
||||
|
@ -62,6 +62,9 @@
|
||||
// #include <GLESglext.h>
|
||||
#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.
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user