请选择 进入手机版 | 继续访问电脑版
楼主: ly3323110

[综合] Crossapp最新版本:v2.0.0 Beta版 全新出炉

  [复制链接]
最佳答案
0 
zss159369 发表于 2017-4-16 10:35:23 | 显示全部楼层
很好很强大
最佳答案
0 
zss159369 发表于 2017-4-16 10:35:43 | 显示全部楼层
2.0版本还能支持老版本代码的写法吗
最佳答案
0 
zss159369 发表于 2017-4-16 10:35:56 | 显示全部楼层
楼主真牛,赞赞赞赞赞赞赞赞赞啊
最佳答案
0 
1335326251 发表于 2017-4-18 21:43:54 | 显示全部楼层
屌炸天,真的不错,牛逼
最佳答案
0 
tanchangbo 发表于 2017-4-23 15:27:56 | 显示全部楼层
6666666666666666666666666666
最佳答案
0 
midle110 发表于 2017-4-23 17:24:10 | 显示全部楼层
本帖最后由 midle110 于 2017-4-23 17:39 编辑

2.0版本
win7  系统
vs2013编译不过去,提示错误,用的c++11语法导致的vs2013编译不了。4>g:\opensource\cross\crossapp\device\caaddressbook.h(39): error C2797: 'CrossApp::CAAddressBook:ate::country': 未执行成员初始值列表内的列表初始化或非静态数据成员初始值




vs2015能够编译成功,但是运行崩溃。
“test.exe”(Win32): 已加载“G:\opensource\cross\projects\test\proj.win32\Debug.win32\test.exe”。已加载符号。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\ntdll.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\kernel32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\KernelBase.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“G:\opensource\cross\projects\test\proj.win32\Debug.win32\libCrossApp.dll”。已加载符号。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\opengl32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\msvcrt.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\advapi32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\sechost.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\rpcrt4.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\sspicli.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\cryptbase.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\gdi32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\user32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\lpk.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\usp10.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\glu32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\ddraw.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\dciman32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\setupapi.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\cfgmgr32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\oleaut32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\ole32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\devobj.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\dwmapi.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“G:\opensource\cross\projects\test\proj.win32\Debug.win32\glew32.dll”。模块已生成,不包含符号。
“test.exe”(Win32): 已加载“G:\opensource\cross\projects\test\proj.win32\Debug.win32\zlib1.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“G:\opensource\cross\projects\test\proj.win32\Debug.win32\pthreadVCE2.dll”。模块已生成,不包含符号。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\wsock32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\ws2_32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\nsi.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“G:\opensource\cross\projects\test\proj.win32\Debug.win32\libcurl.dll”。模块已生成,不包含符号。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\Wldap32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\normaliz.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\msvcr120.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“G:\opensource\cross\projects\test\proj.win32\Debug.win32\sqlite3.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\msvcr100.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\shell32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\shlwapi.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\msvcp140d.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\vcruntime140d.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\ucrtbased.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-timezone-l1-1-0.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-file-l2-1-0.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-localization-l1-2-0.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-synch-l1-2-0.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-processthreads-l1-1-1.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\api-ms-win-core-file-l1-2-0.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\imm32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\msctf.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\uxtheme.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\nvoglv32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\wtsapi32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\version.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\gdi32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已卸载“C:\Windows\SysWOW64\gdi32.dll”
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\wintrust.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\crypt32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\msasn1.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\ntmarta.dll”。无法查找或打开 PDB 文件。
线程 0x162c 已退出,返回值为 0 (0x0)。
线程 0x1328 已退出,返回值为 0 (0x0)。
线程 0x185c 已退出,返回值为 0 (0x0)。
线程 0x32c 已退出,返回值为 0 (0x0)。
“test.exe”(Win32): 已加载“C:\Users\Administrator\AppData\Roaming\TaobaoProtect\TaobaoProtectSE.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\psapi.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\sfc.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\sfc_os.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\powrprof.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已卸载“C:\Windows\SysWOW64\powrprof.dll”
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\winsta.dll”。无法查找或打开 PDB 文件。
OpenGL version = 4.5.0 NVIDIA 364.51
Ready for GLSL
Ready for OpenGL 2.0
name: image_gray, value: ../../Resources/source_material/loading_black.png
name: image_white, value: ../../Resources/source_material/loading_white.png
control   name: CAActivityIndicatorView
name: badgeImage, value: ../../Resources/source_material/bg_badge.png
control   name: CABadgeView
name: backgroundView_disabled, value: ../../Resources/source_material/btn_rounded_disabled.png
name: backgroundView_highlighted, value: ../../Resources/source_material/btn_rounded_highlighted.png
name: backgroundView_normal, value: ../../Resources/source_material/btn_rounded_normal.png
name: height, value: 60
name: titleColor_disabled, value: 0xff999999
name: titleColor_highlighted, value: 0xff009082
name: titleColor_normal, value: 0xff009082
control   name: CAButton_RoundedRect
name: backgroundView_disabled, value: ../../Resources/source_material/btn_square_disabled.png
name: backgroundView_highlighted, value: ../../Resources/source_material/btn_square_highlighted.png
name: backgroundView_normal, value: ../../Resources/source_material/btn_square_normal.png
name: height, value: 60
name: titleColor_disabled, value: 0xff999999
name: titleColor_highlighted, value: 0xff009082
name: titleColor_normal, value: 0xff009082
control   name: CAButton_SquareRect
name: backgroundColor_disabled, value: 0xffcccccc
name: backgroundColor_highlighted, value: 0xffdddddd
name: backgroundColor_normal, value: 0xffffffff
name: backgroundColor_selected, value: 0xffdddddd
name: separatorColor, value: 0xffefeef4
control   name: CACell
name: checkbox_image_normal, value: ../../Resources/source_material/checkbox1_r.png
name: checkbox_image_selected, value: ../../Resources/source_material/checkbox2_r.png
name: titleColor_normal, value: 0xff000000
name: titleColor_selected, value: 0xff000000
control   name: CACheckbox_RoundedRect
name: checkbox_image_normal, value: ../../Resources/source_material/checkbox1.png
name: checkbox_image_selected, value: ../../Resources/source_material/checkbox2.png
name: titleColor_normal, value: 0xff000000
name: titleColor_selected, value: 0xff000000
control   name: CACheckbox_SquareRect
name: backgroundView, value: ../../Resources/source_material/indicator.png
control   name: CAIndicator
name: Scale9, value: 1
name: backgroundView, value: ../../Resources/source_material/navigation_bg.png
name: leftButtonImage, value: ../../Resources/source_material/btn_left_white.png
name: titleColor, value: 0xffffffff
control   name: CANavigationBar
name: backgroundView_normal_custom, value: ../../Resources/source_material/page_n.png
name: backgroundView_normal_rect, value: ../../Resources/source_material/page_rect_n.png
name: backgroundView_normal_round, value: ../../Resources/source_material/page_round_n.png
name: backgroundView_selected_custom, value: ../../Resources/source_material/page_h.png
name: backgroundView_selected_rect, value: ../../Resources/source_material/page_rect_h.png
name: backgroundView_selected_round, value: ../../Resources/source_material/page_round_h.png
control   name: CAPageControl
name: height, value: 12
name: tintImage, value: ../../Resources/source_material/progress_tint.png
name: trackImage, value: ../../Resources/source_material/progress_track.png
control   name: CAProgress
name: footer, value: ../../Resources/source_material/grayArrow_footer.png
name: header, value: ../../Resources/source_material/grayArrow_header.png
control   name: CAPullToRefreshView
name: backgroundView_normal, value: ../../Resources/source_material/segmented_normal.png
name: backgroundView_selected, value: ../../Resources/source_material/segmented_selected.png
name: height, value: 60
name: tintColor, value: 0xff009082
name: titleColor_normal, value: 0xff333333
name: titleColor_selected, value: 0xffffffff
control   name: CASegmentedControl
name: height, value: 40
name: maxTrackTintImage, value: ../../Resources/source_material/slider_max_track.png
name: minTrackTintImage, value: ../../Resources/source_material/slider_min_track.png
name: thumbTintImage, value: ../../Resources/source_material/slider_indicator.png
name: trackHeight, value: 12
control   name: CASlider
name: backgroundView_normal, value: ../../Resources/source_material/stepper_normal.png
name: backgroundView_selected, value: ../../Resources/source_material/stepper_selected.png
name: decImage_highlighted, value: ../../Resources/source_material/stepper_dec_h.png
name: decImage_normal, value: ../../Resources/source_material/stepper_dec_n.png
name: height, value: 68
name: incImage_highlighted, value: ../../Resources/source_material/stepper_inc_h.png
name: incImage_normal, value: ../../Resources/source_material/stepper_inc_n.png
name: tintColor, value: 0xff009082
name: width, value: 320
control   name: CAStepper
name: height, value: 56
name: offImage, value: ../../Resources/source_material/switch_off.png
name: onImage, value: ../../Resources/source_material/switch_on.png
name: thumbTintImage, value: ../../Resources/source_material/switch_indicator.png
name: width, value: 102
control   name: CASwitch_RoundedRect
name: height, value: 56
name: offImage, value: ../../Resources/source_material/switch_off_s.png
name: onImage, value: ../../Resources/source_material/switch_on_s.png
name: thumbTintImage, value: ../../Resources/source_material/switch_indicator_s.png
name: width, value: 102
control   name: CASwitch_SquareRect
name: Scale9, value: 1
name: backgroundView_normal, value: ../../Resources/source_material/tabBar_bg.png
name: backgroundView_selected, value: ../../Resources/source_material/tabBar_selected_bg.png
name: bottomLine, value: ../../Resources/source_material/tabBar_selected_indicator.png
name: titleColor_normal, value: 0xff55aba1
name: titleColor_selected, value: 0xffffffff
control   name: CATabBar
name: backgroundView_normal, value: ../../Resources/source_material/textField_bg.png
name: clearImage, value: ../../Resources/source_material/clear_button.png
name: height, value: 0
control   name: CATextField
“test.exe”(Win32): 已加载“C:\Windows\SysWOW64\ole32.dll”。无法查找或打开 PDB 文件。
“test.exe”(Win32): 已卸载“C:\Windows\SysWOW64\ole32.dll”
CossApp: ERROR: Failed to compile shader:
uniform mat4 CC_PMatrix;
uniform mat4 CC_MVMatrix;
uniform mat4 CC_MVPMatrix;
uniform mat3 CC_NormalMatrix;
uniform vec4 CC_Time;
uniform vec4 CC_SinTime;
uniform vec4 CC_CosTime;
uniform vec4 CC_Random01;
uniform sampler2D CC_Texture0;
uniform sampler2D CC_Texture1;
uniform sampler2D CC_Texture2;
uniform sampler2D CC_Texture3;
//CC INCLUDES END

3DPositionNormal
#ifdef USE_NORMAL_MAPPING

#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
uniform vec3 u_DirLightSourceDirection[MAX_DIRECTIONAL_LIGHT_NUM];
#endif

#endif

#if (MAX_POINT_LIGHT_NUM > 0)
uniform vec3 u_PointLightSourcePosition[MAX_POINT_LIGHT_NUM];
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
uniform vec3 u_SpotLightSourcePosition[MAX_SPOT_LIGHT_NUM];
#ifdef USE_NORMAL_MAPPING
uniform vec3 u_SpotLightSourceDirection[MAX_SPOT_LIGHT_NUM];
#endif

#endif
attribute vec4 a_position; attribute vec2 a_texCoord; attribute vec3 a_normal;
#ifdef USE_NORMAL_MAPPING
attribute vec3 a_tangent; attribute vec3 a_binormal;
#endif
varying vec2 TextureCoordOut;
#ifdef USE_NORMAL_MAPPING

#if MAX_DIRECTIONAL_LIGHT_NUM
varying vec3 v_dirLightDirection[MAX_DIRECTIONAL_LIGHT_NUM];
#endif

#endif

#if MAX_POINT_LIGHT_NUM
varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
#endif

#if MAX_SPOT_LIGHT_NUM
varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
#ifdef USE_NORMAL_MAPPING
varying vec3 v_spotLightDirection[MAX_SPOT_LIGHT_NUM];
#endif

#endif

#ifndef USE_NORMAL_MAPPING

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
varying vec3 v_normal;
#endif

#endif
void main(void) { vec4 ePosition = CC_MVMatrix * a_position;
#ifdef USE_NORMAL_MAPPING

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
vec3 eTangent = normalize(CC_NormalMatrix * a_tangent); vec3 eBinormal = normalize(CC_NormalMatrix * a_binormal); vec3 eNormal = normalize(CC_NormalMatrix * a_normal);
#endif

#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
for (int i = 0; i < MAX_DIRECTIONAL_LIGHT_NUM; ++i) { v_dirLightDirection.x = dot(eTangent, u_DirLightSourceDirection); v_dirLightDirection.y = dot(eBinormal, u_DirLightSourceDirection); v_dirLightDirection.z = dot(eNormal, u_DirLightSourceDirection); }
#endif

#if (MAX_POINT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) { vec3 pointLightDir = u_PointLightSourcePosition.xyz - ePosition.xyz; v_vertexToPointLightDirection.x = dot(eTangent, pointLightDir); v_vertexToPointLightDirection.y = dot(eBinormal, pointLightDir); v_vertexToPointLightDirection.z = dot(eNormal, pointLightDir); }
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) { vec3 spotLightDir = u_SpotLightSourcePosition - ePosition.xyz; v_vertexToSpotLightDirection.x = dot(eTangent, spotLightDir); v_vertexToSpotLightDirection.y = dot(eBinormal, spotLightDir); v_vertexToSpotLightDirection.z = dot(eNormal, spotLightDir); v_spotLightDirection.x = dot(eTangent, u_SpotLightSourceDirection); v_spotLightDirection.y = dot(eBinormal, u_SpotLightSourceDirection); v_spotLightDirection.z = dot(eNormal, u_SpotLightSourceDirection); }
#endif

#else

#if (MAX_POINT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) { v_vertexToPointLightDirection = u_PointLightSourcePosition.xyz - ePosition.xyz; }
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) { v_vertexToSpotLightDirection = u_SpotLightSourcePosition - ePosition.xyz; }
#endif

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
v_normal = CC_NormalMatrix * a_normal;
#endif

#endif
TextureCoordOut = a_texCoord; TextureCoordOut.y = 1.0 - TextureCoordOut.y; gl_Position = CC_PMatrix * ePosition; }
CossApp: 0(15) : error C0159: invalid char 'D' in integer constant suffix
0(15) : error C0159: invalid char 'P' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 't' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'n' in integer constant suffix
0(15) : error C0159: invalid char 'N' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'r' in integer constant suffix
0(15) : error C0159: invalid char 'm' in integer constant suffix
0(15) : error C0159: invalid char 'a' in integer constant suffix
0(15) : error C0159: invalid char 'l' in integer constant suffix
0(15) : error C0000: syntax error, unexpected long integer constant at token "<long-const>"

CossApp: ERROR: Failed to compile vertex shader
CossApp: ERROR: Failed to link program: 61
OpenGL error 0x0501 in g:\opensource\cross\crossapp\renderer\ccglprogramcache.cpp CrossApp::GLProgramCache::loadDefaultGLProgram 567

CossApp: ERROR: Failed to compile shader:
uniform mat4 CC_PMatrix;
uniform mat4 CC_MVMatrix;
uniform mat4 CC_MVPMatrix;
uniform mat3 CC_NormalMatrix;
uniform vec4 CC_Time;
uniform vec4 CC_SinTime;
uniform vec4 CC_CosTime;
uniform vec4 CC_Random01;
uniform sampler2D CC_Texture0;
uniform sampler2D CC_Texture1;
uniform sampler2D CC_Texture2;
uniform sampler2D CC_Texture3;
//CC INCLUDES END

3DPositionNormalTex
#ifdef USE_NORMAL_MAPPING

#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
uniform vec3 u_DirLightSourceDirection[MAX_DIRECTIONAL_LIGHT_NUM];
#endif

#endif

#if (MAX_POINT_LIGHT_NUM > 0)
uniform vec3 u_PointLightSourcePosition[MAX_POINT_LIGHT_NUM];
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
uniform vec3 u_SpotLightSourcePosition[MAX_SPOT_LIGHT_NUM];
#ifdef USE_NORMAL_MAPPING
uniform vec3 u_SpotLightSourceDirection[MAX_SPOT_LIGHT_NUM];
#endif

#endif
attribute vec4 a_position; attribute vec2 a_texCoord; attribute vec3 a_normal;
#ifdef USE_NORMAL_MAPPING
attribute vec3 a_tangent; attribute vec3 a_binormal;
#endif
varying vec2 TextureCoordOut;
#ifdef USE_NORMAL_MAPPING

#if MAX_DIRECTIONAL_LIGHT_NUM
varying vec3 v_dirLightDirection[MAX_DIRECTIONAL_LIGHT_NUM];
#endif

#endif

#if MAX_POINT_LIGHT_NUM
varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
#endif

#if MAX_SPOT_LIGHT_NUM
varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
#ifdef USE_NORMAL_MAPPING
varying vec3 v_spotLightDirection[MAX_SPOT_LIGHT_NUM];
#endif

#endif

#ifndef USE_NORMAL_MAPPING

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
varying vec3 v_normal;
#endif

#endif
void main(void) { vec4 ePosition = CC_MVMatrix * a_position;
#ifdef USE_NORMAL_MAPPING

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
vec3 eTangent = normalize(CC_NormalMatrix * a_tangent); vec3 eBinormal = normalize(CC_NormalMatrix * a_binormal); vec3 eNormal = normalize(CC_NormalMatrix * a_normal);
#endif

#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
for (int i = 0; i < MAX_DIRECTIONAL_LIGHT_NUM; ++i) { v_dirLightDirection.x = dot(eTangent, u_DirLightSourceDirection); v_dirLightDirection.y = dot(eBinormal, u_DirLightSourceDirection); v_dirLightDirection.z = dot(eNormal, u_DirLightSourceDirection); }
#endif

#if (MAX_POINT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) { vec3 pointLightDir = u_PointLightSourcePosition.xyz - ePosition.xyz; v_vertexToPointLightDirection.x = dot(eTangent, pointLightDir); v_vertexToPointLightDirection.y = dot(eBinormal, pointLightDir); v_vertexToPointLightDirection.z = dot(eNormal, pointLightDir); }
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) { vec3 spotLightDir = u_SpotLightSourcePosition - ePosition.xyz; v_vertexToSpotLightDirection.x = dot(eTangent, spotLightDir); v_vertexToSpotLightDirection.y = dot(eBinormal, spotLightDir); v_vertexToSpotLightDirection.z = dot(eNormal, spotLightDir); v_spotLightDirection.x = dot(eTangent, u_SpotLightSourceDirection); v_spotLightDirection.y = dot(eBinormal, u_SpotLightSourceDirection); v_spotLightDirection.z = dot(eNormal, u_SpotLightSourceDirection); }
#endif

#else

#if (MAX_POINT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) { v_vertexToPointLightDirection = u_PointLightSourcePosition.xyz - ePosition.xyz; }
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) { v_vertexToSpotLightDirection = u_SpotLightSourcePosition - ePosition.xyz; }
#endif

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
v_normal = CC_NormalMatrix * a_normal;
#endif

#endif
TextureCoordOut = a_texCoord; TextureCoordOut.y = 1.0 - TextureCoordOut.y; gl_Position = CC_PMatrix * ePosition; }
CossApp: 0(15) : error C0159: invalid char 'D' in integer constant suffix
0(15) : error C0159: invalid char 'P' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 't' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'n' in integer constant suffix
0(15) : error C0159: invalid char 'N' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'r' in integer constant suffix
0(15) : error C0159: invalid char 'm' in integer constant suffix
0(15) : error C0159: invalid char 'a' in integer constant suffix
0(15) : error C0159: invalid char 'l' in integer constant suffix
0(15) : error C0159: invalid char 'T' in integer constant suffix
0(15) : error C0159: invalid char 'e' in integer constant suffix
0(15) : error C0159: invalid char 'x' in integer constant suffix
0(15) : error C0000: syntax error, unexpected byte integer constant at token "<byte-const>"

CossApp: ERROR: Failed to compile vertex shader
CossApp: ERROR: Failed to link program: 61
OpenGL error 0x0501 in g:\opensource\cross\crossapp\renderer\ccglprogramcache.cpp CrossApp::GLProgramCache::loadDefaultGLProgram 567

CossApp: ERROR: Failed to compile shader:
uniform mat4 CC_PMatrix;
uniform mat4 CC_MVMatrix;
uniform mat4 CC_MVPMatrix;
uniform mat3 CC_NormalMatrix;
uniform vec4 CC_Time;
uniform vec4 CC_SinTime;
uniform vec4 CC_CosTime;
uniform vec4 CC_Random01;
uniform sampler2D CC_Texture0;
uniform sampler2D CC_Texture1;
uniform sampler2D CC_Texture2;
uniform sampler2D CC_Texture3;
//CC INCLUDES END

3DSkinPositionNormalTex
#ifdef USE_NORMAL_MAPPING

#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
uniform vec3 u_DirLightSourceDirection[MAX_DIRECTIONAL_LIGHT_NUM];
#endif

#endif

#if (MAX_POINT_LIGHT_NUM > 0)
uniform vec3 u_PointLightSourcePosition[MAX_POINT_LIGHT_NUM];
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
uniform vec3 u_SpotLightSourcePosition[MAX_SPOT_LIGHT_NUM];
#ifdef USE_NORMAL_MAPPING
uniform vec3 u_SpotLightSourceDirection[MAX_SPOT_LIGHT_NUM];
#endif

#endif
attribute vec3 a_position; attribute vec4 a_blendWeight; attribute vec4 a_blendIndex; attribute vec2 a_texCoord; attribute vec3 a_normal;
#ifdef USE_NORMAL_MAPPING
attribute vec3 a_tangent; attribute vec3 a_binormal;
#endif
const int SKINNING_JOINT_COUNT = 60; uniform vec4 u_matrixPalette[SKINNING_JOINT_COUNT * 3]; varying vec2 TextureCoordOut;
#ifdef USE_NORMAL_MAPPING

#if MAX_DIRECTIONAL_LIGHT_NUM
varying vec3 v_dirLightDirection[MAX_DIRECTIONAL_LIGHT_NUM];
#endif

#endif

#if MAX_POINT_LIGHT_NUM
varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
#endif

#if MAX_SPOT_LIGHT_NUM
varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
#ifdef USE_NORMAL_MAPPING
varying vec3 v_spotLightDirection[MAX_SPOT_LIGHT_NUM];
#endif

#endif

#ifndef USE_NORMAL_MAPPING

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
varying vec3 v_normal;
#endif

#endif
void getPositionAndNormal(out vec4 position, out vec3 normal, out vec3 tangent, out vec3 binormal) { float blendWeight = a_blendWeight[0]; int matrixIndex = int (a_blendIndex[0]) * 3; vec4 matrixPalette1 = u_matrixPalette[matrixIndex] * blendWeight; vec4 matrixPalette2 = u_matrixPalette[matrixIndex + 1] * blendWeight; vec4 matrixPalette3 = u_matrixPalette[matrixIndex + 2] * blendWeight; blendWeight = a_blendWeight[1]; if (blendWeight > 0.0) { matrixIndex = int(a_blendIndex[1]) * 3; matrixPalette1 += u_matrixPalette[matrixIndex] * blendWeight; matrixPalette2 += u_matrixPalette[matrixIndex + 1] * blendWeight; matrixPalette3 += u_matrixPalette[matrixIndex + 2] * blendWeight; blendWeight = a_blendWeight[2]; if (blendWeight > 0.0) { matrixIndex = int(a_blendIndex[2]) * 3; matrixPalette1 += u_matrixPalette[matrixIndex] * blendWeight; matrixPalette2 += u_matrixPalette[matrixIndex + 1] * blendWeight; matrixPalette3 += u_matrixPalette[matrixIndex + 2] * blendWeight; blendWeight = a_blendWeight[3]; if (blendWeight > 0.0) { matrixIndex = int(a_blendIndex[3]) * 3; matrixPalette1 += u_matrixPalette[matrixIndex] * blendWeight; matrixPalette2 += u_matrixPalette[matrixIndex + 1] * blendWeight; matrixPalette3 += u_matrixPalette[matrixIndex + 2] * blendWeight; } } } vec4 p = vec4(a_position, 1.0); position.x = dot(p, matrixPalette1); position.y = dot(p, matrixPalette2); position.z = dot(p, matrixPalette3); position.w = p.w;
#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
vec4 n = vec4(a_normal, 0.0); normal.x = dot(n, matrixPalette1); normal.y = dot(n, matrixPalette2); normal.z = dot(n, matrixPalette3);
#ifdef USE_NORMAL_MAPPING
vec4 t = vec4(a_tangent, 0.0); tangent.x = dot(t, matrixPalette1); tangent.y = dot(t, matrixPalette2); tangent.z = dot(t, matrixPalette3); vec4 b = vec4(a_binormal, 0.0); binormal.x = dot(b, matrixPalette1); binormal.y = dot(b, matrixPalette2); binormal.z = dot(b, matrixPalette3);
#endif

#endif
} void main() { vec4 position; vec3 normal; vec3 tangent; vec3 binormal; getPositionAndNormal(position, normal, tangent, binormal); vec4 ePosition = CC_MVMatrix * position;
#ifdef USE_NORMAL_MAPPING

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
vec3 eTangent = normalize(CC_NormalMatrix * tangent); vec3 eBinormal = normalize(CC_NormalMatrix * binormal); vec3 eNormal = normalize(CC_NormalMatrix * normal);
#endif

#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
for (int i = 0; i < MAX_DIRECTIONAL_LIGHT_NUM; ++i) { v_dirLightDirection.x = dot(eTangent, u_DirLightSourceDirection); v_dirLightDirection.y = dot(eBinormal, u_DirLightSourceDirection); v_dirLightDirection.z = dot(eNormal, u_DirLightSourceDirection); }
#endif

#if (MAX_POINT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) { vec3 pointLightDir = u_PointLightSourcePosition.xyz - ePosition.xyz; v_vertexToPointLightDirection.x = dot(eTangent, pointLightDir); v_vertexToPointLightDirection.y = dot(eBinormal, pointLightDir); v_vertexToPointLightDirection.z = dot(eNormal, pointLightDir); }
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) { vec3 spotLightDir = u_SpotLightSourcePosition - ePosition.xyz; v_vertexToSpotLightDirection.x = dot(eTangent, spotLightDir); v_vertexToSpotLightDirection.y = dot(eBinormal, spotLightDir); v_vertexToSpotLightDirection.z = dot(eNormal, spotLightDir); v_spotLightDirection.x = dot(eTangent, u_SpotLightSourceDirection); v_spotLightDirection.y = dot(eBinormal, u_SpotLightSourceDirection); v_spotLightDirection.z = dot(eNormal, u_SpotLightSourceDirection); }
#endif

#else

#if (MAX_POINT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) { v_vertexToPointLightDirection = u_PointLightSourcePosition.xyz- ePosition.xyz; }
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) { v_vertexToSpotLightDirection = u_SpotLightSourcePosition - ePosition.xyz; }
#endif

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
v_normal = CC_NormalMatrix * normal;
#endif

#endif
TextureCoordOut = a_texCoord; TextureCoordOut.y = 1.0 - TextureCoordOut.y; gl_Position = CC_PMatrix * ePosition; }
CossApp: 0(15) : error C0159: invalid char 'D' in integer constant suffix
0(15) : error C0159: invalid char 'k' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 'n' in integer constant suffix
0(15) : error C0159: invalid char 'P' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 's' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 't' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'n' in integer constant suffix
0(15) : error C0159: invalid char 'N' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'r' in integer constant suffix
0(15) : error C0159: invalid char 'm' in integer constant suffix
0(15) : error C0159: invalid char 'a' in integer constant suffix
0(15) : error C0159: invalid char 'l' in integer constant suffix
0(15) : error C0159: invalid char 'T' in integer constant suffix
0(15) : error C0159: invalid char 'e' in integer constant suffix
0(15) : error C0159: invalid char 'x' in integer constant suffix
0(15) : error C0000: syntax error, unexpected byte integer constant at token "<byte-const>"

CossApp: ERROR: Failed to compile vertex shader
CossApp: ERROR: Failed to link program: 61
OpenGL error 0x0501 in g:\opensource\cross\crossapp\renderer\ccglprogramcache.cpp CrossApp::GLProgramCache::loadDefaultGLProgram 567

CossApp: ERROR: Failed to compile shader:
uniform mat4 CC_PMatrix;
uniform mat4 CC_MVMatrix;
uniform mat4 CC_MVPMatrix;
uniform mat3 CC_NormalMatrix;
uniform vec4 CC_Time;
uniform vec4 CC_SinTime;
uniform vec4 CC_CosTime;
uniform vec4 CC_Random01;
uniform sampler2D CC_Texture0;
uniform sampler2D CC_Texture1;
uniform sampler2D CC_Texture2;
uniform sampler2D CC_Texture3;
//CC INCLUDES END

3DPositionBumpedNormalTex
#define USE_NORMAL_MAPPING 1

#ifdef USE_NORMAL_MAPPING

#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
uniform vec3 u_DirLightSourceDirection[MAX_DIRECTIONAL_LIGHT_NUM];
#endif

#endif

#if (MAX_POINT_LIGHT_NUM > 0)
uniform vec3 u_PointLightSourcePosition[MAX_POINT_LIGHT_NUM];
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
uniform vec3 u_SpotLightSourcePosition[MAX_SPOT_LIGHT_NUM];
#ifdef USE_NORMAL_MAPPING
uniform vec3 u_SpotLightSourceDirection[MAX_SPOT_LIGHT_NUM];
#endif

#endif
attribute vec4 a_position; attribute vec2 a_texCoord; attribute vec3 a_normal;
#ifdef USE_NORMAL_MAPPING
attribute vec3 a_tangent; attribute vec3 a_binormal;
#endif
varying vec2 TextureCoordOut;
#ifdef USE_NORMAL_MAPPING

#if MAX_DIRECTIONAL_LIGHT_NUM
varying vec3 v_dirLightDirection[MAX_DIRECTIONAL_LIGHT_NUM];
#endif

#endif

#if MAX_POINT_LIGHT_NUM
varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
#endif

#if MAX_SPOT_LIGHT_NUM
varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
#ifdef USE_NORMAL_MAPPING
varying vec3 v_spotLightDirection[MAX_SPOT_LIGHT_NUM];
#endif

#endif

#ifndef USE_NORMAL_MAPPING

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
varying vec3 v_normal;
#endif

#endif
void main(void) { vec4 ePosition = CC_MVMatrix * a_position;
#ifdef USE_NORMAL_MAPPING

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
vec3 eTangent = normalize(CC_NormalMatrix * a_tangent); vec3 eBinormal = normalize(CC_NormalMatrix * a_binormal); vec3 eNormal = normalize(CC_NormalMatrix * a_normal);
#endif

#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
for (int i = 0; i < MAX_DIRECTIONAL_LIGHT_NUM; ++i) { v_dirLightDirection.x = dot(eTangent, u_DirLightSourceDirection); v_dirLightDirection.y = dot(eBinormal, u_DirLightSourceDirection); v_dirLightDirection.z = dot(eNormal, u_DirLightSourceDirection); }
#endif

#if (MAX_POINT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) { vec3 pointLightDir = u_PointLightSourcePosition.xyz - ePosition.xyz; v_vertexToPointLightDirection.x = dot(eTangent, pointLightDir); v_vertexToPointLightDirection.y = dot(eBinormal, pointLightDir); v_vertexToPointLightDirection.z = dot(eNormal, pointLightDir); }
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) { vec3 spotLightDir = u_SpotLightSourcePosition - ePosition.xyz; v_vertexToSpotLightDirection.x = dot(eTangent, spotLightDir); v_vertexToSpotLightDirection.y = dot(eBinormal, spotLightDir); v_vertexToSpotLightDirection.z = dot(eNormal, spotLightDir); v_spotLightDirection.x = dot(eTangent, u_SpotLightSourceDirection); v_spotLightDirection.y = dot(eBinormal, u_SpotLightSourceDirection); v_spotLightDirection.z = dot(eNormal, u_SpotLightSourceDirection); }
#endif

#else

#if (MAX_POINT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) { v_vertexToPointLightDirection = u_PointLightSourcePosition.xyz - ePosition.xyz; }
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) { v_vertexToSpotLightDirection = u_SpotLightSourcePosition - ePosition.xyz; }
#endif

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
v_normal = CC_NormalMatrix * a_normal;
#endif

#endif
TextureCoordOut = a_texCoord; TextureCoordOut.y = 1.0 - TextureCoordOut.y; gl_Position = CC_PMatrix * ePosition; }
CossApp: 0(15) : error C0159: invalid char 'D' in integer constant suffix
0(15) : error C0159: invalid char 'P' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 't' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'n' in integer constant suffix
0(15) : error C0159: invalid char 'B' in integer constant suffix
0(15) : error C0159: invalid char 'm' in integer constant suffix
0(15) : error C0159: invalid char 'p' in integer constant suffix
0(15) : error C0159: invalid char 'e' in integer constant suffix
0(15) : error C0159: invalid char 'd' in integer constant suffix
0(15) : error C0159: invalid char 'N' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'r' in integer constant suffix
0(15) : error C0159: invalid char 'm' in integer constant suffix
0(15) : error C0159: invalid char 'a' in integer constant suffix
0(15) : error C0159: invalid char 'l' in integer constant suffix
0(15) : error C0159: invalid char 'T' in integer constant suffix
0(15) : error C0159: invalid char 'e' in integer constant suffix
0(15) : error C0159: invalid char 'x' in integer constant suffix
0(15) : error C0000: syntax error, unexpected unsigned byte integer constant at token "<ubyte-const>"

CossApp: ERROR: Failed to compile vertex shader
CossApp: ERROR: Failed to link program: 61
OpenGL error 0x0501 in g:\opensource\cross\crossapp\renderer\ccglprogramcache.cpp CrossApp::GLProgramCache::loadDefaultGLProgram 567

CossApp: ERROR: Failed to compile shader:
uniform mat4 CC_PMatrix;
uniform mat4 CC_MVMatrix;
uniform mat4 CC_MVPMatrix;
uniform mat3 CC_NormalMatrix;
uniform vec4 CC_Time;
uniform vec4 CC_SinTime;
uniform vec4 CC_CosTime;
uniform vec4 CC_Random01;
uniform sampler2D CC_Texture0;
uniform sampler2D CC_Texture1;
uniform sampler2D CC_Texture2;
uniform sampler2D CC_Texture3;
//CC INCLUDES END

3DSkinPositionBumpedNormalTex
#define USE_NORMAL_MAPPING 1

#ifdef USE_NORMAL_MAPPING

#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
uniform vec3 u_DirLightSourceDirection[MAX_DIRECTIONAL_LIGHT_NUM];
#endif

#endif

#if (MAX_POINT_LIGHT_NUM > 0)
uniform vec3 u_PointLightSourcePosition[MAX_POINT_LIGHT_NUM];
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
uniform vec3 u_SpotLightSourcePosition[MAX_SPOT_LIGHT_NUM];
#ifdef USE_NORMAL_MAPPING
uniform vec3 u_SpotLightSourceDirection[MAX_SPOT_LIGHT_NUM];
#endif

#endif
attribute vec3 a_position; attribute vec4 a_blendWeight; attribute vec4 a_blendIndex; attribute vec2 a_texCoord; attribute vec3 a_normal;
#ifdef USE_NORMAL_MAPPING
attribute vec3 a_tangent; attribute vec3 a_binormal;
#endif
const int SKINNING_JOINT_COUNT = 60; uniform vec4 u_matrixPalette[SKINNING_JOINT_COUNT * 3]; varying vec2 TextureCoordOut;
#ifdef USE_NORMAL_MAPPING

#if MAX_DIRECTIONAL_LIGHT_NUM
varying vec3 v_dirLightDirection[MAX_DIRECTIONAL_LIGHT_NUM];
#endif

#endif

#if MAX_POINT_LIGHT_NUM
varying vec3 v_vertexToPointLightDirection[MAX_POINT_LIGHT_NUM];
#endif

#if MAX_SPOT_LIGHT_NUM
varying vec3 v_vertexToSpotLightDirection[MAX_SPOT_LIGHT_NUM];
#ifdef USE_NORMAL_MAPPING
varying vec3 v_spotLightDirection[MAX_SPOT_LIGHT_NUM];
#endif

#endif

#ifndef USE_NORMAL_MAPPING

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
varying vec3 v_normal;
#endif

#endif
void getPositionAndNormal(out vec4 position, out vec3 normal, out vec3 tangent, out vec3 binormal) { float blendWeight = a_blendWeight[0]; int matrixIndex = int (a_blendIndex[0]) * 3; vec4 matrixPalette1 = u_matrixPalette[matrixIndex] * blendWeight; vec4 matrixPalette2 = u_matrixPalette[matrixIndex + 1] * blendWeight; vec4 matrixPalette3 = u_matrixPalette[matrixIndex + 2] * blendWeight; blendWeight = a_blendWeight[1]; if (blendWeight > 0.0) { matrixIndex = int(a_blendIndex[1]) * 3; matrixPalette1 += u_matrixPalette[matrixIndex] * blendWeight; matrixPalette2 += u_matrixPalette[matrixIndex + 1] * blendWeight; matrixPalette3 += u_matrixPalette[matrixIndex + 2] * blendWeight; blendWeight = a_blendWeight[2]; if (blendWeight > 0.0) { matrixIndex = int(a_blendIndex[2]) * 3; matrixPalette1 += u_matrixPalette[matrixIndex] * blendWeight; matrixPalette2 += u_matrixPalette[matrixIndex + 1] * blendWeight; matrixPalette3 += u_matrixPalette[matrixIndex + 2] * blendWeight; blendWeight = a_blendWeight[3]; if (blendWeight > 0.0) { matrixIndex = int(a_blendIndex[3]) * 3; matrixPalette1 += u_matrixPalette[matrixIndex] * blendWeight; matrixPalette2 += u_matrixPalette[matrixIndex + 1] * blendWeight; matrixPalette3 += u_matrixPalette[matrixIndex + 2] * blendWeight; } } } vec4 p = vec4(a_position, 1.0); position.x = dot(p, matrixPalette1); position.y = dot(p, matrixPalette2); position.z = dot(p, matrixPalette3); position.w = p.w;
#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
vec4 n = vec4(a_normal, 0.0); normal.x = dot(n, matrixPalette1); normal.y = dot(n, matrixPalette2); normal.z = dot(n, matrixPalette3);
#ifdef USE_NORMAL_MAPPING
vec4 t = vec4(a_tangent, 0.0); tangent.x = dot(t, matrixPalette1); tangent.y = dot(t, matrixPalette2); tangent.z = dot(t, matrixPalette3); vec4 b = vec4(a_binormal, 0.0); binormal.x = dot(b, matrixPalette1); binormal.y = dot(b, matrixPalette2); binormal.z = dot(b, matrixPalette3);
#endif

#endif
} void main() { vec4 position; vec3 normal; vec3 tangent; vec3 binormal; getPositionAndNormal(position, normal, tangent, binormal); vec4 ePosition = CC_MVMatrix * position;
#ifdef USE_NORMAL_MAPPING

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
vec3 eTangent = normalize(CC_NormalMatrix * tangent); vec3 eBinormal = normalize(CC_NormalMatrix * binormal); vec3 eNormal = normalize(CC_NormalMatrix * normal);
#endif

#if (MAX_DIRECTIONAL_LIGHT_NUM > 0)
for (int i = 0; i < MAX_DIRECTIONAL_LIGHT_NUM; ++i) { v_dirLightDirection.x = dot(eTangent, u_DirLightSourceDirection); v_dirLightDirection.y = dot(eBinormal, u_DirLightSourceDirection); v_dirLightDirection.z = dot(eNormal, u_DirLightSourceDirection); }
#endif

#if (MAX_POINT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) { vec3 pointLightDir = u_PointLightSourcePosition.xyz - ePosition.xyz; v_vertexToPointLightDirection.x = dot(eTangent, pointLightDir); v_vertexToPointLightDirection.y = dot(eBinormal, pointLightDir); v_vertexToPointLightDirection.z = dot(eNormal, pointLightDir); }
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) { vec3 spotLightDir = u_SpotLightSourcePosition - ePosition.xyz; v_vertexToSpotLightDirection.x = dot(eTangent, spotLightDir); v_vertexToSpotLightDirection.y = dot(eBinormal, spotLightDir); v_vertexToSpotLightDirection.z = dot(eNormal, spotLightDir); v_spotLightDirection.x = dot(eTangent, u_SpotLightSourceDirection); v_spotLightDirection.y = dot(eBinormal, u_SpotLightSourceDirection); v_spotLightDirection.z = dot(eNormal, u_SpotLightSourceDirection); }
#endif

#else

#if (MAX_POINT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_POINT_LIGHT_NUM; ++i) { v_vertexToPointLightDirection = u_PointLightSourcePosition.xyz- ePosition.xyz; }
#endif

#if (MAX_SPOT_LIGHT_NUM > 0)
for (int i = 0; i < MAX_SPOT_LIGHT_NUM; ++i) { v_vertexToSpotLightDirection = u_SpotLightSourcePosition - ePosition.xyz; }
#endif

#if ((MAX_DIRECTIONAL_LIGHT_NUM > 0) || (MAX_POINT_LIGHT_NUM > 0) || (MAX_SPOT_LIGHT_NUM > 0))
v_normal = CC_NormalMatrix * normal;
#endif

#endif
TextureCoordOut = a_texCoord; TextureCoordOut.y = 1.0 - TextureCoordOut.y; gl_Position = CC_PMatrix * ePosition; }
CossApp: 0(15) : error C0159: invalid char 'D' in integer constant suffix
0(15) : error C0159: invalid char 'k' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 'n' in integer constant suffix
0(15) : error C0159: invalid char 'P' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 's' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 't' in integer constant suffix
0(15) : error C0159: invalid char 'i' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'n' in integer constant suffix
0(15) : error C0159: invalid char 'B' in integer constant suffix
0(15) : error C0159: invalid char 'm' in integer constant suffix
0(15) : error C0159: invalid char 'p' in integer constant suffix
0(15) : error C0159: invalid char 'e' in integer constant suffix
0(15) : error C0159: invalid char 'd' in integer constant suffix
0(15) : error C0159: invalid char 'N' in integer constant suffix
0(15) : error C0159: invalid char 'o' in integer constant suffix
0(15) : error C0159: invalid char 'r' in integer constant suffix
0(15) : error C0159: invalid char 'm' in integer constant suffix
0(15) : error C0159: invalid char 'a' in integer constant suffix
0(15) : error C0159: invalid char 'l' in integer constant suffix
0(15) : error C0159: invalid char 'T' in integer constant suffix
0(15) : error C0159: invalid char 'e' in integer constant suffix
0(15) : error C0159: invalid char 'x' in integer constant suffix
0(15) : error C0000: syntax error, unexpected unsigned byte integer constant at token "<ubyte-const>"

CossApp: ERROR: Failed to compile vertex shader
CossApp: ERROR: Failed to link program: 61
OpenGL error 0x0501 in g:\opensource\cross\crossapp\renderer\ccglprogramcache.cpp CrossApp::GLProgramCache::loadDefaultGLProgram 567

CrossApp: fullPathForFilename: No file found at r/FirstViewController.xib. Possible missing file.
Get data from file(r/FirstViewController.xib) failed, error code is 0
0x7796EB83 (ntdll.dll)处(位于 test.exe 中)引发的异常: 0xC0000005: 写入位置 0x69666F86 时发生访问冲突。




不知道你们出现过这种情况没?


最佳答案
0 
kent0546 发表于 2017-4-28 23:06:33 | 显示全部楼层
如果您要查看本帖隐藏内容请回复
最佳答案
0 
zz2436562549 发表于 2017-4-30 08:47:28 | 显示全部楼层
好源码必须要来看看啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则

推荐阅读 More>

© 2001-2015 9秒社团

合作伙伴

公司简介 | 联系方式
COPYRIGHT©2015 ZHONGQINGLONGTU NETWORK CO.LTD ALL RIGHTS RESERVED.ICP备11023195号-4
北京中清龙图网络技术有限公司
返回顶部 返回列表