Giter Site home page Giter Site logo

Comments (4)

orkunozbek avatar orkunozbek commented on May 14, 2024

i received same error.

from apitrace.

borisbat avatar borisbat commented on May 14, 2024

Modifying line 63, 64, and and 399 of glapi.py to match the API fixes the compilation issue.

However, images do not look like they trace correctly - Image data is not displayed, retrace looks buggy (with wrong images).
Looks like we need more help here.

// line 63
GlFunction(Void, "glTexImage1D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glTexImage1D_size(format, type, width)"), "pixels")]),

// line 64
GlFunction(Void, "glTexImage2D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glTexImage2D_size(format, type, width, height)"), "pixels")]),

// line 399
GlFunction(Void, "glTexImage3D", [(GLenum, "target"), (GLint, "level"), (GLint, "internalformat"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth"), (GLint, "border"), (GLenum, "format"), (GLenum, "type"), (Blob(Const(GLvoid), "__glTexImage3D_size(format, type, width, height, depth)"), "pixels")]),

from apitrace.

jrfonseca avatar jrfonseca commented on May 14, 2024

Could you please try this patch:

diff --git a/glimports.hpp b/glimports.hpp
index a24e20f..0ec1957 100644
--- a/glimports.hpp
+++ b/glimports.hpp
@@ -34,6 +34,15 @@
 // Prevent including system's glext.h
 #define __glext_h_

+// Some functions take GLenum disguised as GLint.  Apple noticed and fixed it
+// in the Mac OS X 10.6.x gl.h headers.  Regardless, C++ typechecking rules
+// force the wrappers to match the prototype precisely.
+#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_7)
+#define GLenum_int GLenum
+#else
+#define GLenum_int GLenum
+#endif
+

 #if defined(_WIN32)

diff --git a/specs/gltypes.py b/specs/gltypes.py
index e25cd7e..e187688 100644
--- a/specs/gltypes.py
+++ b/specs/gltypes.py
@@ -91,13 +91,12 @@ GLenum = Enum("GLenum", [
     # Parameters are added later from glparams.py's parameter table
 ])

-# Some functions take GLenum disguised as GLint.  Apple noticed and fixed it in
-# the gl.h header.  Regardless, C++ typechecking rules force the wrappers to
-# match the prototype precisely.
-if platform.system() == 'Darwin':
-    GLenum_int = GLenum
-else:
-    GLenum_int = Alias("GLint", GLenum)
+# Some functions take GLenum disguised as GLint, and need special treatment so
+# that symbolic names are traced correctly.  Apple noticed and fixed it in the
+# gl.h header, which further complicates things.  C++ typechecking rules force
+# the wrappers to match the prototype precisely, so the precise type is defined
+# in glimports.hpp
+GLenum_int = Alias("GLenum_int", GLenum)

 GLenum_mode = FakeEnum(GLenum, [
     "GL_POINTS",                         # 0x0000

This should hopefully work both for 10.7 and 10.6

Concerning the bad retracing, I haven't done extensive testing on Mac OS X 10.6, and I did no testing on 10.7 so far.

One thing I know is that 10.7 supports GL 3.2 on the core profile, and GL 2.1 on the compatibility profile, and apitrace doesn't take that in consideration, neither when recording or replaying.

from apitrace.

jrfonseca avatar jrfonseca commented on May 14, 2024

I've commited the fix.

borisbat, please open a new bug for the issues you're seeing, with the necessary info to reproduce them (see BUGS.markdown for details)

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.