Comments (4)
i received same error.
from apitrace.
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.
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.
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)
- Replacement of shader via glDetachShader + glAttachShader leads to link error HOT 2
- eglretrace crashes on rayman2_gl trace
- Can Apitrace support retrace through EGL on Windows HOT 2
- loop option doesn't work for specific trace HOT 1
- retrace --loop crashes when VAO is created in setup frame and deleted in loop frame HOT 1
- Tellusim Upscaler (Star Wars) 20230513 trace doesn't work properly
- Failed to capture trace of wgf11filter HOT 1
- Build system complains about uncloned submodules for bundled dependencies even when using dependencies from system HOT 4
- Bug recording instanced draw calls with user arrays HOT 18
- [enhancement] replace zlib HOT 1
- Feature Request: Attach apitrace to Already Running Processes HOT 4
- During tracing gl-500-texture-cube-arb.exe, missing cube map HOT 2
- Wolfenstein: The Old Blood tracing broken due to abuse of GL_MAP_PERSISTENT_BIT mappings HOT 19
- trimming broken for some traces HOT 7
- capture/replay broken for indirect draws HOT 15
- Commit cff22f0 Introduces Segfault HOT 3
- eglQueryDevicesEXT egl spec definition wrong HOT 1
- undefined symbol: __libc_dlopen_mode, version GLIBC_PRIVATE HOT 5
- [OpenGL] Replay issue with glUniformHandleui64ARB HOT 2
- Possibility for a new stable release?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apitrace.