jcteng / python-opengl-tutorial Goto Github PK
View Code? Open in Web Editor NEWPython opengl-tutorial base on PyOpenGL.
Python opengl-tutorial base on PyOpenGL.
Hello,
Thanks for your work, it's great effort! Btw, i've a issue when trying to execute the Shading program i get to see error as below
"AttributeError: 'module' object has no attribute 'vec3'"
I'm on Ubuntu 18.04 with Python 2.7. And also most sample tut's are not executing on GLES 3.3. is there any way to fix it up? Please do look into this issue. and help me asap.
Regards,
@jcteng Do you have any idea what the problem is?
Traceback (most recent call last):
File "tu_10_normal_mapping.py", line 258, in <module>
textureName=["resources/tu10/diffuse.DDS", "resources/tu10/normal.bmp", "resources/tu10/specular.DDS"]))
File "/data/wanggu/PoseEst/python-opengl-tutorial/utils/meshViewer.py", line 19, in add_mesh
self.meshes.append(meshWithRender.makeContext())
File "/data/wanggu/PoseEst/python-opengl-tutorial/utils/meshViewer.py", line 79, in makeContext
self.loadTexture()
File "tu_10_normal_mapping.py", line 168, in loadTexture
DiffuseTexture = textureLoader(self.textureName[0])
File "/data/wanggu/PoseEst/python-opengl-tutorial/utils/textureLoader.py", line 94, in __init__
self.loadDDS(fname)
File "/data/wanggu/PoseEst/python-opengl-tutorial/utils/textureLoader.py", line 61, in loadDDS
ddsbuffer[offset:offset + size])
File "latebind.pyx", line 32, in OpenGL_accelerate.latebind.LateBind.__call__ (src/latebind.c:989)
File "wrapper.pyx", line 303, in OpenGL_accelerate.wrapper.Wrapper.__call__ (src/wrapper.c:6338)
File "wrapper.pyx", line 88, in OpenGL_accelerate.wrapper.CArgCalculator.c_call (src/wrapper.c:2984)
File "wrapper.pyx", line 69, in OpenGL_accelerate.wrapper.CArgCalculatorElement.c_call (src/wrapper.c:2536)
File "wrapper.pyx", line 66, in OpenGL_accelerate.wrapper.CArgCalculatorElement.c_call (src/wrapper.c:2463)
File "/data/wanggu/anaconda3/envs/py27/lib/python2.7/site-packages/OpenGL/GL/images.py", line 500, in __call__
return arrays.ArrayType.arrayByteCount( arg )
AttributeError: ("'module' object has no attribute 'ArrayType'", 6, <OpenGL.platform.baseplatform.glCompressedTexImage2D object at 0x7f4a5e83b8c0>)
Describe the bug
On my macbook pro running mac os 13.6.3 (m1 chip) I ran the first tutorial file tu_00....py
I had an error related to glfw that I fixed by adding these two limnes that apparently are common for mac os:
glfw.window_hint(glfw.OPENGL_PROFILE,glfw.OPENGL_CORE_PROFILE)
glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, GL_TRUE);
After these lines teh code ran, but no window was open and at the same time the window generated by glfw seem correct
(I did not catch any error in glfw calls)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The glfw window is not created, but no error is reported
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
thank you
Tiberiu
Describe the bug
When I run those demos , only tu1 and tu2 could work. the left demo report error .
Expected behavior
here is my error report
Traceback (most recent call last):
File "src\wrapper.pyx", line 66, in OpenGL_accelerate.wrapper.CArgCalculatorElement.c_call
File "D:\Anaconda3\lib\site-packages\OpenGL\GL\images.py", line 499, in __call__
return arraydatatype.ArrayDatatype.arrayByteCount(arg)
File "src\arraydatatype.pyx", line 257, in OpenGL_accelerate.arraydatatype.ArrayDatatype.arrayByteCount
AttributeError: ("'NumberHandler' object has no attribute 'arrayByteCount'", 6, <OpenGL.platform.baseplatform.glCompressedTexImage2D object at 0x000000000BD590D8>)
Desktop (please complete the following information):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.