Giter Site home page Giter Site logo

Comments (2)

jrfonseca avatar jrfonseca commented on May 24, 2024

Ah.... perhaps the !retrace::dumpingState condition should be replaced with not dumping state and not replacing?

Or perhaps shader replacing should ensure all shader sources are deleted before adding (at least when dumping state)?

from apitrace.

10110111 avatar 10110111 commented on May 24, 2024

The problem here is not in deletion, but rather in detaching. If you try to attach a shader with main() to a program that already has such a shader attached, you get multiple definition error. So I guess glDetachShader should be left alone.

My current workaround looks as follows, and I don't know of any reason how it could break (maybe you do?).

diff --git a/retrace/glretrace.py b/retrace/glretrace.py
index 19e994d3..4a891355 100644
--- a/retrace/glretrace.py
+++ b/retrace/glretrace.py
@@ -421,10 +421,6 @@ class GlRetracer(Retracer):
             print(r'    } else {')
             Retracer.invokeFunction(self, function)
             print(r'    }')
-        elif function.name in ('glDetachShader', 'glDetachObjectARB'):
-            print(r'    if (!retrace::dumpingState) {')
-            Retracer.invokeFunction(self, function)
-            print(r'    }')
         elif function.name == 'glClientWaitSync':
             print(r'    _result = glretrace::clientWaitSync(call, sync, flags, timeout);')
             print(r'    (void)_result;')

from apitrace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.