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

 找回密码
 新人加入
查看: 11053|回复: 10
打印 上一主题 下一主题

OpenGL particle systems - stuffs for TCAX particle system [复制链接]

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

跳转到指定楼层
楼主
发表于 2012-6-25 15:43:31 |只看该作者 |倒序浏览

Administrator

Shanzhai Pro.

Rank: 7Rank: 7Rank: 7

沙发
发表于 2012-6-25 18:35:42 |只看该作者
終於要高科技了

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

板凳
发表于 2012-6-27 07:25:07 |只看该作者

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

地板
发表于 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, 下载次数: 2337)
PyOpenGL-accelerate-3.0.2a1.win32-py3.2.rar (225.56 KB, 下载次数: 2235)
numpy-unoptimized-1.6.2.win32-py3.2.rar (2.14 MB, 下载次数: 2138)
PIL-1.1.7.win32-py3.2.rar (866.45 KB, 下载次数: 2476)


Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

5#
发表于 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, 下载次数: 2347)

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

6#
发表于 2012-6-28 01:04:52 |只看该作者

Very First Lessons

Ported from the Python 2.x Demos above

ReadPixels.rar (2.18 KB, 下载次数: 2248)
NeHe_Lesson19.rar (7.23 KB, 下载次数: 2319)

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

7#
发表于 2012-6-29 00:59:28 |只看该作者

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

8#
发表于 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

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

9#
发表于 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

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

10#
发表于 2012-7-10 08:57:47 |只看该作者

Updates of TCAX supporting Python site-packages

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

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

11#
发表于 2012-7-10 10:04:37 |只看该作者
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-11-24 10:07

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH