mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
93a75d8fe2
@ -366,6 +366,12 @@ if GetHost() == "darwin":
|
|||||||
if VERSION is None:
|
if VERSION is None:
|
||||||
# Take the value from the setup.cfg file.
|
# Take the value from the setup.cfg file.
|
||||||
VERSION = GetMetadataValue('version')
|
VERSION = GetMetadataValue('version')
|
||||||
|
match = re.match(r'^\d+\.\d+(\.\d+)+', VERSION)
|
||||||
|
if not match:
|
||||||
|
exit("Invalid version %s in setup.cfg, three digits are required" % (VERSION))
|
||||||
|
if WHLVERSION is None:
|
||||||
|
WHLVERSION = VERSION
|
||||||
|
VERSION = match.group()
|
||||||
|
|
||||||
if WHLVERSION is None:
|
if WHLVERSION is None:
|
||||||
WHLVERSION = VERSION
|
WHLVERSION = VERSION
|
||||||
@ -2684,11 +2690,18 @@ template class CheckPandaVersion<void>;
|
|||||||
|
|
||||||
|
|
||||||
def CreatePandaVersionFiles():
|
def CreatePandaVersionFiles():
|
||||||
version1=int(VERSION.split(".")[0])
|
parts = VERSION.split(".", 2)
|
||||||
version2=int(VERSION.split(".")[1])
|
version1 = int(parts[0])
|
||||||
version3=int(VERSION.split(".")[2])
|
version2 = int(parts[1])
|
||||||
nversion=version1*1000000+version2*1000+version3
|
version3 = 0
|
||||||
if (DISTRIBUTOR != "cmu"):
|
if len(parts) > 2:
|
||||||
|
for c in parts[2]:
|
||||||
|
if c.isdigit():
|
||||||
|
version3 = version3 * 10 + ord(c) - 48
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
nversion = version1 * 1000000 + version2 * 1000 + version3
|
||||||
|
if DISTRIBUTOR != "cmu":
|
||||||
# Subtract 1 if we are not an official version.
|
# Subtract 1 if we are not an official version.
|
||||||
nversion -= 1
|
nversion -= 1
|
||||||
|
|
||||||
|
@ -215,19 +215,24 @@ is_prepared(PreparedGraphicsObjects *prepared_objects) const {
|
|||||||
VertexBufferContext *GeomVertexArrayData::
|
VertexBufferContext *GeomVertexArrayData::
|
||||||
prepare_now(PreparedGraphicsObjects *prepared_objects,
|
prepare_now(PreparedGraphicsObjects *prepared_objects,
|
||||||
GraphicsStateGuardianBase *gsg) {
|
GraphicsStateGuardianBase *gsg) {
|
||||||
if (_contexts == nullptr) {
|
if (_contexts != nullptr) {
|
||||||
|
Contexts::const_iterator ci;
|
||||||
|
ci = _contexts->find(prepared_objects);
|
||||||
|
if (ci != _contexts->end()) {
|
||||||
|
return (*ci).second;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
_contexts = new Contexts;
|
_contexts = new Contexts;
|
||||||
}
|
}
|
||||||
Contexts::const_iterator ci;
|
|
||||||
ci = _contexts->find(prepared_objects);
|
|
||||||
if (ci != _contexts->end()) {
|
|
||||||
return (*ci).second;
|
|
||||||
}
|
|
||||||
|
|
||||||
VertexBufferContext *vbc = prepared_objects->prepare_vertex_buffer_now(this, gsg);
|
VertexBufferContext *vbc = prepared_objects->prepare_vertex_buffer_now(this, gsg);
|
||||||
if (vbc != nullptr) {
|
if (vbc != nullptr) {
|
||||||
(*_contexts)[prepared_objects] = vbc;
|
(*_contexts)[prepared_objects] = vbc;
|
||||||
}
|
}
|
||||||
|
else if (_contexts->empty()) {
|
||||||
|
delete _contexts;
|
||||||
|
_contexts = nullptr;
|
||||||
|
}
|
||||||
return vbc;
|
return vbc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,19 +76,24 @@ is_prepared(PreparedGraphicsObjects *prepared_objects) const {
|
|||||||
BufferContext *ShaderBuffer::
|
BufferContext *ShaderBuffer::
|
||||||
prepare_now(PreparedGraphicsObjects *prepared_objects,
|
prepare_now(PreparedGraphicsObjects *prepared_objects,
|
||||||
GraphicsStateGuardianBase *gsg) {
|
GraphicsStateGuardianBase *gsg) {
|
||||||
if (_contexts == nullptr) {
|
if (_contexts != nullptr) {
|
||||||
|
Contexts::const_iterator ci;
|
||||||
|
ci = _contexts->find(prepared_objects);
|
||||||
|
if (ci != _contexts->end()) {
|
||||||
|
return (*ci).second;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
_contexts = new Contexts;
|
_contexts = new Contexts;
|
||||||
}
|
}
|
||||||
Contexts::const_iterator ci;
|
|
||||||
ci = _contexts->find(prepared_objects);
|
|
||||||
if (ci != _contexts->end()) {
|
|
||||||
return (*ci).second;
|
|
||||||
}
|
|
||||||
|
|
||||||
BufferContext *vbc = prepared_objects->prepare_shader_buffer_now(this, gsg);
|
BufferContext *vbc = prepared_objects->prepare_shader_buffer_now(this, gsg);
|
||||||
if (vbc != nullptr) {
|
if (vbc != nullptr) {
|
||||||
(*_contexts)[prepared_objects] = vbc;
|
(*_contexts)[prepared_objects] = vbc;
|
||||||
}
|
}
|
||||||
|
else if (_contexts->empty()) {
|
||||||
|
delete _contexts;
|
||||||
|
_contexts = nullptr;
|
||||||
|
}
|
||||||
return vbc;
|
return vbc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user