mirror of https://github.com/axmolengine/axmol.git
issue #1506: implement ShaderTest
This commit is contained in:
parent
bb908f5a5e
commit
92c30a328e
|
@ -140,7 +140,7 @@ public:
|
|||
/** returns the program error log */
|
||||
const char* programLog();
|
||||
|
||||
inline const GLuint& getProgram() { return m_uProgram; }
|
||||
inline const GLuint getProgram() { return m_uProgram; }
|
||||
|
||||
private:
|
||||
bool updateUniformLocation(unsigned int location, GLvoid* data, unsigned int bytes);
|
||||
|
|
|
@ -262,7 +262,7 @@ It should work same as apples CFSwapInt32LittleToHost(..)
|
|||
Increments the GL Draws counts by one.
|
||||
The number of calls per frame are displayed on the screen when the CCDirector's stats are enabled.
|
||||
*/
|
||||
extern unsigned int g_uNumberOfDraws;
|
||||
extern unsigned int CC_DLL g_uNumberOfDraws;
|
||||
#define CC_INCREMENT_GL_DRAWS(__n__) g_uNumberOfDraws += __n__
|
||||
|
||||
/*******************/
|
||||
|
|
|
@ -55,6 +55,7 @@ tests/RenderTextureTest/RenderTextureTest.cpp \
|
|||
tests/RotateWorldTest/RotateWorldTest.cpp \
|
||||
tests/SceneTest/SceneTest.cpp \
|
||||
tests/SchedulerTest/SchedulerTest.cpp \
|
||||
tests/ShaderTest/ShaderTest.cpp \
|
||||
tests/SpriteTest/SpriteTest.cpp \
|
||||
tests/TextureCacheTest/TextureCacheTest.cpp \
|
||||
tests/Texture2dTest/Texture2dTest.cpp \
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// http://www.cocos2d-iphone.org
|
||||
|
||||
attribute vec4 a_position;
|
||||
|
||||
uniform mat4 u_MVPMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_MVPMatrix * a_position;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// http://www.cocos2d-iphone.org
|
||||
|
||||
attribute vec4 a_position;
|
||||
|
||||
uniform mat4 u_MVPMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_MVPMatrix * a_position;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// http://www.cocos2d-iphone.org
|
||||
|
||||
attribute vec4 a_position;
|
||||
|
||||
uniform mat4 u_MVPMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_MVPMatrix * a_position;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// http://www.cocos2d-iphone.org
|
||||
|
||||
attribute vec4 a_position;
|
||||
|
||||
uniform mat4 u_MVPMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_MVPMatrix * a_position;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// http://www.cocos2d-iphone.org
|
||||
|
||||
attribute vec4 a_position;
|
||||
|
||||
uniform mat4 u_MVPMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_MVPMatrix * a_position;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// http://www.cocos2d-iphone.org
|
||||
|
||||
attribute vec4 a_position;
|
||||
|
||||
uniform mat4 u_MVPMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_MVPMatrix * a_position;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// http://www.cocos2d-iphone.org
|
||||
|
||||
attribute vec4 a_position;
|
||||
|
||||
uniform mat4 u_MVPMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_MVPMatrix * a_position;
|
||||
}
|
|
@ -335,6 +335,18 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="ShaderTest"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\tests\ShaderTest\ShaderTest.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\tests\ShaderTest\ShaderTest.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="TouchesTest"
|
||||
>
|
||||
|
@ -831,10 +843,6 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="ShaderTest"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="NodeTest"
|
||||
>
|
||||
|
|
|
@ -121,6 +121,9 @@ static TestScene* CreateTestScene(int nIdx)
|
|||
pScene = new ExtensionsTestScene();
|
||||
}
|
||||
break;
|
||||
case TEST_SHADER:
|
||||
pScene = new ShaderTestScene();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "CurrentLanguageTest/CurrentLanguageTest.h"
|
||||
#include "TextureCacheTest/TextureCacheTest.h"
|
||||
#include "NodeTest/NodeTest.h"
|
||||
#include "ShaderTest/ShaderTest.h"
|
||||
|
||||
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
|
||||
#include "ChipmunkTest/cocos2dChipmunkDemo.h"
|
||||
|
@ -103,7 +104,8 @@ enum
|
|||
TEST_CURRENT_LANGUAGE,
|
||||
TEST_TEXTURECACHE,
|
||||
TEST_EXTENSIONS,
|
||||
TESTS_COUNT,
|
||||
TEST_SHADER,
|
||||
TESTS_COUNT,
|
||||
};
|
||||
|
||||
const std::string g_aTestNames[TESTS_COUNT] = {
|
||||
|
@ -149,7 +151,8 @@ const std::string g_aTestNames[TESTS_COUNT] = {
|
|||
"FontTest",
|
||||
"CurrentLanguageTest",
|
||||
"TextureCacheTest",
|
||||
"ExtensionsTest"
|
||||
"ExtensionsTest",
|
||||
"ShaderTest"
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue