سؤال

أنا استخدم مكتب العمليات الفيدراليةموجود في كود OpenGL الخاص بي وأرى أخطاء في الترجمة GL\_FRAMEBUFFER\_INCOMPLETE\_DUPLICATE\_ATTACHMENT\_EXT.ما هو سبب ذلك وكيف أصلحه؟

هل كانت مفيدة؟

المحلول

سبب هذا الخطأ هو إصدار أقدم من NVIDIA جليكست.ح, ، الذي لا يزال لديه هذا التعريف.حيث أن أحدث الإصدارات من توهج لا.يؤدي هذا إلى حدوث أخطاء في التجميع في التعليمات البرمجية التي كتبتها مسبقًا أو حصلت عليها من الويب.

ال GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT كان تعريف FBO موجودًا في المواصفات (وبالتالي في ملفات الرأس).ولكن، تمت إزالته لاحقًا.يمكن العثور على سبب ذلك في مواصفات امتداد FBO (انظر العدد 87):

(87) What happens if a single image is attached more than once to a
     framebuffer object?

     RESOLVED: The value written to the pixel is undefined.

     There used to be a rule in section 4.4.4.2 that resulted in
     FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT if a single
     image was attached more than once to a framebuffer object.

         FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT   0x8CD8

         * A single image is not attached more than once to the
           framebuffer object.

           { FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT }

     This rule was removed in version #117 of the
     EXT_framebuffer_object specification after discussion at the
     September 2005 ARB meeting.  The rule essentially required an
     O(n*lg(n)) search.  Some implementations would not need to do that
     search if the completeness rules did not require it.  Instead,
     language was added to section 4.10 which says the values
     written to the framebuffer are undefined when this rule is
     violated.

لإصلاح هذا الخطأ، قم بإزالة كافة استخدامات GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT من الكود الخاص بك.

إذا لم يكن هذا ممكنًا في الإعداد الخاص بك، فقم بإضافة تعريف وهمي إلى ملفك جليكست.ح أو توهج. ح ملف مثل هذا:

#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top