int main(void) { if (PROCEDURE == 1) return mainImage(); if (PROCEDURE == 2) return mainVideo(); if (PROCEDURE == 3) return mainMatch(); if (PROCEDURE == 4) return mainMotionPoints(); if (PROCEDURE == 5) return mainStaticMatch(); if (PROCEDURE == 6) return mainKmeans(); }
bool Shadertoy::initShaderProgram(std::string const& fragmentShaderSource) { bool success = true; std::string shaderPath = Settings::Instance()->appFolder() + "/shaders/shadertoy.vert"; std::string shaderSourceVertex = Settings::Instance()->glUtils->readFile(shaderPath.c_str()); const char *shader_vertex = shaderSourceVertex.c_str(); std::string shaderFragment = "#version 410 core\n\ \n\ out vec4 outFragmentColor;\n\ uniform vec3 iResolution;\n\ uniform float iGlobalTime;\n\ uniform float iTimeDelta;\n\ uniform int iFrame;\n\ uniform int iFrameRate;\n\ uniform float iChannelTime[4];\n\ uniform vec3 iChannelResolution[4];\n\ uniform vec4 iMouse;\n\ uniform vec4 iDate;\n\ uniform float iSampleRate;\n"; if (this->iChannel0_Image != "") shaderFragment += "uniform sampler2D iChannel0;\n"; else if (this->iChannel0_CubeImage != "") shaderFragment += "uniform samplerCube iChannel0;\n"; shaderFragment += "\ \n\ #define texture2D texture\n\ #define textureCube texture\n\ \n\ \n"; shaderFragment += fragmentShaderSource; shaderFragment += "\ \n\ void main() {\n\ vec4 color = vec4(0.0, 0.0, 0.0, 1.0);\n\ mainImage(color, gl_FragCoord.xy);\n\ outFragmentColor = color;\n\ }\n\
void main(void) { mainImage(gl_FragColor, vec2(xx, yy)); }
int main() { mainImage(); return 0; }
int main(void) { if (PROCEDURE == 0) return mainImage(); if (PROCEDURE == 1) return mainStaticMatch(); if (PROCEDURE == 2) return mainStaticMatchStrengths(); }