浏览代码

Merge branch 'release/1.9.x'

rdb 9 年之前
父节点
当前提交
5a2a9a3020
共有 3 个文件被更改,包括 11 次插入9 次删除
  1. 2 2
      makepanda/makepanda.py
  2. 4 4
      panda/src/glstuff/glGraphicsBuffer_src.cxx
  3. 5 3
      panda/src/gobj/shader.cxx

+ 2 - 2
makepanda/makepanda.py

@@ -6885,8 +6885,8 @@ def MakeInstallerOSX():
         oscmd("cp -R %s/pandac                dstroot/pythoncode/Developer/Panda3D/pandac" % GetOutputDir())
         oscmd("cp -R %s/pandac                dstroot/pythoncode/Developer/Panda3D/pandac" % GetOutputDir())
         oscmd("cp -R %s/direct                dstroot/pythoncode/Developer/Panda3D/direct" % GetOutputDir())
         oscmd("cp -R %s/direct                dstroot/pythoncode/Developer/Panda3D/direct" % GetOutputDir())
         oscmd("ln -s %s                       dstroot/pythoncode/usr/local/bin/ppython" % SDK["PYTHONEXEC"])
         oscmd("ln -s %s                       dstroot/pythoncode/usr/local/bin/ppython" % SDK["PYTHONEXEC"])
-        oscmd("cp -R %s/*.so                  dstroot/pythoncode/Developer/Panda3D/" % GetOutputDir())
-        oscmd("cp -R %s/*.py                  dstroot/pythoncode/Developer/Panda3D/" % GetOutputDir())
+        oscmd("cp -R %s/*.so                  dstroot/pythoncode/Developer/Panda3D/" % GetOutputDir(), True)
+        oscmd("cp -R %s/*.py                  dstroot/pythoncode/Developer/Panda3D/" % GetOutputDir(), True)
         if os.path.isdir(GetOutputDir()+"/Pmw"):
         if os.path.isdir(GetOutputDir()+"/Pmw"):
             oscmd("cp -R %s/Pmw               dstroot/pythoncode/Developer/Panda3D/Pmw" % GetOutputDir())
             oscmd("cp -R %s/Pmw               dstroot/pythoncode/Developer/Panda3D/Pmw" % GetOutputDir())
             compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/Pmw")
             compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/Pmw")

+ 4 - 4
panda/src/glstuff/glGraphicsBuffer_src.cxx

@@ -902,7 +902,7 @@ bind_slot(int layer, bool rb_resize, Texture **attach, RenderTexturePlane slot,
             }
             }
           } else {
           } else {
             if (_fb_properties.get_color_bits() > 16 * 3) {
             if (_fb_properties.get_color_bits() > 16 * 3) {
-              gl_format = GL_RGBA32F_ARB;
+              gl_format = GL_RGB32F_ARB;
             } else if (_fb_properties.get_color_bits() > 8 * 3) {
             } else if (_fb_properties.get_color_bits() > 8 * 3) {
               gl_format = GL_RGB16_EXT;
               gl_format = GL_RGB16_EXT;
             } else {
             } else {
@@ -920,11 +920,11 @@ bind_slot(int layer, bool rb_resize, Texture **attach, RenderTexturePlane slot,
             }
             }
           } else {
           } else {
             if (_fb_properties.get_color_bits() > 16 * 3) {
             if (_fb_properties.get_color_bits() > 16 * 3) {
-              gl_format = GL_RGB32F_ARB;
+              gl_format = GL_RGBA32F_ARB;
             } else if (_fb_properties.get_color_bits() > 8 * 3) {
             } else if (_fb_properties.get_color_bits() > 8 * 3) {
-              gl_format = GL_RGB16_EXT;
+              gl_format = GL_RGBA16_EXT;
             } else {
             } else {
-              gl_format = GL_RGB;
+              gl_format = GL_RGBA;
             }
             }
           }
           }
         }
         }

+ 5 - 3
panda/src/gobj/shader.cxx

@@ -2362,15 +2362,14 @@ r_preprocess_source(ostream &out, const Filename &fn,
   bool had_include = false;
   bool had_include = false;
   int lineno = 0;
   int lineno = 0;
   while (getline(*source, line)) {
   while (getline(*source, line)) {
-    // We always forward the actual line - the GLSL compiler will silently
-    // ignore #pragma lines anyway.
     ++lineno;
     ++lineno;
-    out << line << "\n";
 
 
     // Check if this line contains a #pragma.
     // Check if this line contains a #pragma.
     char pragma[64];
     char pragma[64];
     if (line.size() < 8 ||
     if (line.size() < 8 ||
         sscanf(line.c_str(), " # pragma %63s", pragma) != 1) {
         sscanf(line.c_str(), " # pragma %63s", pragma) != 1) {
+      // Just pass the line through unmodified.
+      out << line << "\n";
 
 
       // One exception: check for an #endif after an include.  We have to
       // One exception: check for an #endif after an include.  We have to
       // restore the line number in case the include happened under an #if
       // restore the line number in case the include happened under an #if
@@ -2435,8 +2434,11 @@ r_preprocess_source(ostream &out, const Filename &fn,
 
 
     } else if (strcmp(pragma, "optionNV") == 0) {
     } else if (strcmp(pragma, "optionNV") == 0) {
       // This is processed by NVIDIA drivers.  Don't touch it.
       // This is processed by NVIDIA drivers.  Don't touch it.
+      out << line << "\n";
 
 
     } else {
     } else {
+      // Forward it, the driver will ignore it if it doesn't know it.
+      out << line << "\n";
       shader_cat.warning()
       shader_cat.warning()
         << "Ignoring unknown pragma directive \"" << pragma << "\" at line "
         << "Ignoring unknown pragma directive \"" << pragma << "\" at line "
         << lineno << " of file " << fn << ":\n  " << line << "\n";
         << lineno << " of file " << fn << ":\n  " << line << "\n";