TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua

标题: OpenGL particle systems - stuffs for TCAX particle system [打印本页]

作者: milkyjing    时间: 2012-6-25 15:43:31     标题: OpenGL particle systems - stuffs for TCAX particle system

http://pyopengl.sourceforge.net/

http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopengl

http://pyopengl.sourceforge.net/context/tutorials/nehe6.xhtml

http://pyopengl.sourceforge.net/documentation/

http://jestermon.weebly.com/nehe-pyglet-tutorials.html

http://pyopengl.sourceforge.net/ ... /glReadPixels.xhtml



作者: saiyaku    时间: 2012-6-25 18:35:42

終於要高科技了
作者: milkyjing    时间: 2012-6-27 07:25:07

http://docs.python.org/faq/windows.html

http://www.lighthouse3d.com/opengl/tutorials.shtml?&start=0

http://jestermon.weebly.com/nehe-pyglet-tutorials.html

http://bazaar.launchpad.net/~mcf ... penGL-Demo/GLUT/tom





作者: milkyjing    时间: 2012-6-28 00:20:55     标题: Build up the environment

(Install Python 3.2)

Install PyOpenGL http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopengl
          PyOpenGL-accelerate http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopengl-accelerate

Miscellaneous Numpy http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
                     PIL http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil

PyOpenGL-3.0.2a6.win32-py3.2.rar (1010.6 KB, 下载次数: 1665)
PyOpenGL-accelerate-3.0.2a1.win32-py3.2.rar (225.56 KB, 下载次数: 1620)
numpy-unoptimized-1.6.2.win32-py3.2.rar (2.14 MB, 下载次数: 1397)
PIL-1.1.7.win32-py3.2.rar (866.45 KB, 下载次数: 1796)




附件: PyOpenGL-accelerate-3.0.2a1.win32-py3.2.rar (2012-6-28 00:23:16, 225.56 KB) / 下载次数 1620
http://tcax.org/forum.php?mod=attachment&aid=NjUxfDVjMTdlODc5fDE3MTQ2MDkzOTZ8MHww

附件: PyOpenGL-3.0.2a6.win32-py3.2.rar (2012-6-28 00:23:09, 1010.6 KB) / 下载次数 1665
http://tcax.org/forum.php?mod=attachment&aid=NjUwfGVlMmJhZDNifDE3MTQ2MDkzOTZ8MHww

附件: PIL-1.1.7.win32-py3.2.rar (2012-6-28 00:26:46, 866.45 KB) / 下载次数 1796
http://tcax.org/forum.php?mod=attachment&aid=NjUyfGYzM2QwN2Q5fDE3MTQ2MDkzOTZ8MHww

附件: numpy-unoptimized-1.6.2.win32-py3.2.rar (2012-6-28 00:22:22, 2.14 MB) / 下载次数 1397
http://tcax.org/forum.php?mod=attachment&aid=NjQ4fGZkNjhmODQ1fDE3MTQ2MDkzOTZ8MHww
作者: milkyjing    时间: 2012-6-28 00:32:41     标题: Demos

PyOpenGL-Demo is written for Python 2.x not 3.x
So we may need certain modification on the code to make them fit for our environment.

http://pypi.python.org/pypi/PyOpenGL-Demo

PyOpenGL-Demo-3.0.1b1.zip (1.35 MB, 下载次数: 1647)



附件: PyOpenGL-Demo-3.0.1b1.zip (2012-6-28 00:31:18, 1.35 MB) / 下载次数 1647
http://tcax.org/forum.php?mod=attachment&aid=NjUzfGU0N2ViZGM0fDE3MTQ2MDkzOTZ8MHww
作者: milkyjing    时间: 2012-6-28 01:04:52     标题: Very First Lessons

Ported from the Python 2.x Demos above

ReadPixels.rar (2.18 KB, 下载次数: 1638)
NeHe_Lesson19.rar (7.23 KB, 下载次数: 1687)



附件: ReadPixels.rar (2012-6-28 01:03:52, 2.18 KB) / 下载次数 1638
http://tcax.org/forum.php?mod=attachment&aid=NjU1fDE0MTdmNjljfDE3MTQ2MDkzOTZ8MHww

附件: NeHe_Lesson19.rar (2012-6-28 15:25:50, 7.23 KB) / 下载次数 1687
http://tcax.org/forum.php?mod=attachment&aid=NjU4fDQzYWViOGRjfDE3MTQ2MDkzOTZ8MHww
作者: milkyjing    时间: 2012-6-29 00:59:28     标题: Black-Transparent OpenGL Background

http://www.opengl.org/discussion ... nsparent-background
http://home.comcast.net/~tom_forsyth/blog.wiki.html
http://stackoverflow.com/questio ... nsparent-background

http://stackoverflow.com/questio ... -pixels-transparent



作者: milkyjing    时间: 2012-6-29 16:11:14     标题: Issues

third party packages (i.e., site-packages) cannot be used in TCAX probably due to the modification of PATH environment variable.

Solution: this one is very easy to solve, just use sys.path.append() or sys.path.extend() to include the Python's site-packages directory. But when solving this issue, another one rose, that is, PyOpenGL requires msvcr90.dll to run, while tcax uses msvcr100.dll, the conflict needs to be eliminated. (Named R6034)


Solution of C Run-Time Error R6034

Posted by Microsoft on 8/26/2008 at 1:35 PM
The Visual C++ team has triaged the issue you reported. The issue has been resolved during triage with the following message:

When you compile you program in debug, the application manifest embedded in main.exe is this one:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
     <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
         <requestedPrivileges>
            <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
         </requestedPrivileges>
        </security>
     </trustInfo>
     <dependency>
        <dependentAssembly>
         <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
        </dependentAssembly>
     </dependency>
     <dependency>
        <dependentAssembly>
         <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
        </dependentAssembly>
     </dependency>
    </assembly>

As you can see, you depends on both Microsoft.VC90.DebugCRT and on Microsoft.VC80.CRT. The double dependency is not bad "per se". It's probably caused by a static library depending on the 80 Retail CRT.

Indeed, if you do "dumpbin /directives ssleay32.lib" you will find that they depend on the 80 Retail CRT.

But the problem is that you also have a dependency on the 90 Retail CRT (as you noticed with depends.exe), which is not expressed in the manifest.

Who's causing this dependency? Very likely, one of the static libraries you're using.

If you turn on the /verbose switch during the linking phase, you'll see in the output window that:

1>        Referenced in OLDNAMES.lib(fileno.obi)
1>        Loaded msvcrt.lib(MSVCR90.dll)

oldnames.lib brings in the dependency on msvcr90.dll.

There are two way of fixing this:

1) remove the need for oldnames.lib: oldnames.lib is brought in by fileno, which is referenced in libeay32.lib(bss_file.obj):

1>    Searching c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
1>     Found __imp__fileno
1>        Referenced in libeay32.lib(bss_file.obj)
1>        Loaded OLDNAMES.lib(fileno.obi)

2) manually add a depedency on msvcr90.dll assembly with an additional application manifest, which you have to write (you can't use Microsoft.VC90.DebugCRT.manifest, because it's an assembly manifest, not an application manifest)

3) manually add a depedency on msvcr90.dll assembly with a linker directive like this one (added to main.cpp, for example):

// add a dependency on the retail crt even in debug
#ifdef _M_IX86

#ifdef _DEBUG
#pragma comment(linker,"/manifestdependency:\"type='win32' "            \
        "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' "             \
        "version='" _CRT_ASSEMBLY_VERSION "' "                         \
        "processorArchitecture='x86' "                                 \
        "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif

#endif    /* _M_IX86 */

#ifdef _M_AMD64

#ifdef _DEBUG
#pragma comment(linker,"/manifestdependency:\"type='win32' "            \
        "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' "             \
        "version='" _CRT_ASSEMBLY_VERSION "' "                         \
        "processorArchitecture='amd64' "                                \
        "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif

#endif    /* _M_AMD64 */

#ifdef _M_IA64

#ifdef _DEBUG
#pragma comment(linker,"/manifestdependency:\"type='win32' "            \
        "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' "             \
        "version='" _CRT_ASSEMBLY_VERSION "' "                         \
        "processorArchitecture='ia64' "                                 \
        "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif

#endif    /* _M_IA64 */

the code was adapted from crtdefs.h.

HTH. More help on this can be found on the forum or with product support.

For the next release of Visual Studio, we're planning to greatly simplify this complex scenarios.

For further information, you may want to consult one of these resources:
1. Visual C++ triage guidelines:
        http://blogs.msdn.com/vcblog/articles/621116.aspx
2. MSDN forums:
        http://forums.microsoft.com/msdn/default.aspx

Thank you for taking time to send us feedback,
The Visual C++ Team

So, the solution would be, add
  1. #pragma comment(linker, "/manifestdependency:\"type='win32' "            \
  2.         "name='Microsoft.VC90.CRT' "             \
  3.         "version='9.0.21022.8' "                         \
  4.         "processorArchitecture='x86' "                                 \
  5.         "publicKeyToken='1fc8b3b9a1e18e3b'\"")
复制代码
to tcax_cmd.c

Related Links

http://msdn.microsoft.com/en-us/library/ms235560(v=vs.80).aspx

http://msdn.microsoft.com/en-us/library/ms235560(v=vs.90).aspx

https://connect.microsoft.com/Vi ... t-vc90-crt-manifest

http://msdn.microsoft.com/en-us/library/ms235624(v=vs.90).aspx

http://productforums.google.com/forum/#!topic/chrome/nmmb8Y4m9NQ

http://msdn.microsoft.com/en-us/library/ew0y5khy(v=vs.100).aspx


作者: milkyjing    时间: 2012-7-6 23:41:31     标题: glutInit

tcaxPy scripts have no sys.argv, so need to use

import inspect
glutInit([inspect.getfile(inspect.currentframe())])

instead of using

glutInit(sys.argv)

http://stackoverflow.com/questio ... -currently-executin


作者: milkyjing    时间: 2012-7-10 08:57:47     标题: Updates of TCAX supporting Python site-packages

patch.rar (248.01 KB, 下载次数: 1672)



附件: patch.rar (2012-7-10 08:57:34, 248.01 KB) / 下载次数 1672
http://tcax.org/forum.php?mod=attachment&aid=NjYzfGY5YzYzYTdhfDE3MTQ2MDkzOTZ8MHww
作者: milkyjing    时间: 2012-7-10 10:04:37

http://pyopengl.sourceforge.net/ ... reference-GLUT.html




欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/) Powered by Discuz! X2