Bläddra i källkod

Fix compiler issues on Windows

rdb 8 år sedan
förälder
incheckning
72262ea15a
2 ändrade filer med 9 tillägg och 5 borttagningar
  1. 1 2
      panda/src/dxgsg9/dxIndexBufferContext9.cxx
  2. 8 3
      panda/src/gobj/geomVertexArrayData.I

+ 1 - 2
panda/src/dxgsg9/dxIndexBufferContext9.cxx

@@ -132,8 +132,7 @@ allocate_ibuffer(DXScreenData &scrn,
       dxgsg9_cat.debug()
         << "creating index buffer " << _ibuffer << ": "
         << reader->get_num_vertices() << " indices ("
-        << reader->get_vertices_reader()->get_array_format()->get_column(0)->get_numeric_type()
-        << ")\n";
+        << reader->get_index_type() << ")\n";
     }
   }
 }

+ 8 - 3
panda/src/gobj/geomVertexArrayData.I

@@ -131,10 +131,10 @@ get_modified() const {
  */
 INLINE bool GeomVertexArrayData::
 request_resident(Thread *current_thread) const {
-#ifdef DO_PIPELINING
-  CPT(GeomVertexArrayData::CData) cdata = _cycler.read_unlocked(current_thread);
-#else
   const GeomVertexArrayData::CData *cdata = _cycler.read_unlocked(current_thread);
+
+#ifdef DO_PIPELINING
+  cdata->ref();
 #endif
 
   cdata->_rw_lock.acquire();
@@ -143,6 +143,11 @@ request_resident(Thread *current_thread) const {
   bool is_resident = (cdata->_buffer.get_read_pointer(false) != nullptr);
 
   cdata->_rw_lock.release();
+
+#ifdef DO_PIPELINING
+  unref_delete((CycleData *)cdata);
+#endif
+
   return is_resident;
 }