/foundation/graphic/graphic_2d/rosen/modules/effect/test/unittest/ |
H A D | program_unittest.cpp | 17 #include "program.h"
29 * @tc.desc: Compile the program based on the input string
40 auto program = std::make_shared<Program>();
in HWTEST_F() local 41 bool testResult = program != nullptr;
in HWTEST_F() 44 * @tc.steps: step2. Call Compile to compile the program
in HWTEST_F() 47 program->Compile(horizon->GetVertexShader(), horizon->GetFragmentShader());
in HWTEST_F() 52 * @tc.desc: Compile the program based on the input string
63 auto program = std::make_shared<Program>();
in HWTEST_F() local 64 bool testResult = program != nullptr;
in HWTEST_F() 67 * @tc.steps: step2. Call Compile to compile the program
in HWTEST_F() 86 auto program = std::make_shared<Program>(); HWTEST_F() local 109 auto program = std::make_shared<Program>(); HWTEST_F() local [all...] |
/foundation/graphic/graphic_2d/rosen/samples/webgl/entry/src/main/js/MainAbility/pages/index/sample2/ |
H A D | panorama2_demo.js | 52 let program = createProgram(gl, VSCODE, FSCODE, ['a_Position', 'a_TexCoord'], ['u_MvpMatrix', 'u_ModelMatrix', 'u_Sampler']); 60 gl.vertexAttribPointer(program.a_Position, 3, gl.FLOAT, false, FSIZE * 3, 0); //将缓冲区对象分配给一个attribute变量 61 gl.enableVertexAttribArray(program.a_Position); //开启attribute变量(连接a_Position变量与分配给它的缓冲区对象 65 gl.vertexAttribPointer(program.a_TexCoord, 2, gl.FLOAT, false, FSIZE * 2, 0); //将缓冲区对象分配给一个attribute变量 66 gl.enableVertexAttribArray(program.a_TexCoord); 88 gl.uniform1i(program.u_Sampler, 0); 92 gl.uniformMatrix4fv(program.u_MvpMatrix, false, mvpMatrix.getElements()); 93 draw(program, gl); 104 function draw(program, gl) { 107 gl.uniformMatrix4fv(program [all...] |
H A D | cube2_demo.js | 114 let program = createProgram(gl, vSource, fSource, ['a_Position', 'a_TexCoord', 'a_Normal'], ['a_Matrix', 'u_NormalMatrix', 'u_Sampler']); 121 gl.vertexAttribPointer(program.a_Position, 3, gl.FLOAT, false, Float32Array.BYTES_PER_ELEMENT * 8, 0); 122 gl.enableVertexAttribArray(program.a_Position); 123 gl.vertexAttribPointer(program.a_TexCoord, 2, gl.FLOAT, false, Float32Array.BYTES_PER_ELEMENT * 8, Float32Array.BYTES_PER_ELEMENT * 3); 124 gl.enableVertexAttribArray(program.a_TexCoord); 125 gl.vertexAttribPointer(program.a_Normal, 3, gl.FLOAT, false, Float32Array.BYTES_PER_ELEMENT * 8, Float32Array.BYTES_PER_ELEMENT * 5); 126 gl.enableVertexAttribArray(program.a_Normal); 140 gl.uniform1i(program.u_Sampler, 0); 148 draw(program, gl); 151 function draw(program, g [all...] |
H A D | shadow2_demo.js | 81 let program = createProgram(gl, NORMAL_VS_CODE, NORMAL_FS_CODE, ['a_Position', 'a_Color', 'a_TexCoord'], ['umvpMatrix', 'umvpMatrixFromLight', 'u_ShadowMap', 'u_Sampler']); 111 gl.useProgram(program); // 为常规绘制设置着色器 112 gl.uniform1i(program.u_ShadowMap, 0); 113 gl.uniformMatrix4fv(program.umvpMatrixFromLight, false, mvpMatrixFromLightOt.getElements()); 115 draw2(gl, program, triangle, matrixCamera, boxImage); 116 gl.uniformMatrix4fv(program.umvpMatrixFromLight, false, mvpMatrixFromLightOp.getElements()); 118 draw2(gl, program, plane, matrixCamera, floorImage); 127 function draw(gl, program, o, viewProjMatrix) { 128 initAttributeVariable(gl, program.a_Position, o.vertexBuffer); 129 if (program [all...] |
/foundation/graphic/graphic_2d/rosen/samples/webgl/entry/src/main/js/MainAbility/pages/index/sample/ |
H A D | panorama_demo.js | 49 let program = createProgram(gl, VSCODE, FSCODE, ['a_Position', 'a_TexCoord'], ['u_MvpMatrix', 'u_ModelMatrix', 'u_Sampler']); 57 gl.vertexAttribPointer(program.a_Position, 3, gl.FLOAT, false, FSIZE * 3, 0); //将缓冲区对象分配给一个attribute变量 58 gl.enableVertexAttribArray(program.a_Position); //开启attribute变量(连接a_Position变量与分配给它的缓冲区对象 62 gl.vertexAttribPointer(program.a_TexCoord, 2, gl.FLOAT, false, FSIZE * 2, 0); //将缓冲区对象分配给一个attribute变量 63 gl.enableVertexAttribArray(program.a_TexCoord); 85 gl.uniform1i(program.u_Sampler, 0); 89 gl.uniformMatrix4fv(program.u_MvpMatrix, false, mvpMatrix.getElements()); 90 draw(program, gl); 101 function draw(program, gl) { 104 gl.uniformMatrix4fv(program [all...] |
H A D | cube_demo.js | 114 let program = createProgram(gl, vSource, fSource, ['a_Position', 'a_TexCoord', 'a_Normal'], ['a_Matrix', 'u_NormalMatrix', 'u_Sampler']); 121 gl.vertexAttribPointer(program.a_Position, 3, gl.FLOAT, false, Float32Array.BYTES_PER_ELEMENT * 8, 0); 122 gl.enableVertexAttribArray(program.a_Position); 123 gl.vertexAttribPointer(program.a_TexCoord, 2, gl.FLOAT, false, Float32Array.BYTES_PER_ELEMENT * 8, Float32Array.BYTES_PER_ELEMENT * 3); 124 gl.enableVertexAttribArray(program.a_TexCoord); 125 gl.vertexAttribPointer(program.a_Normal, 3, gl.FLOAT, false, Float32Array.BYTES_PER_ELEMENT * 8, Float32Array.BYTES_PER_ELEMENT * 5); 126 gl.enableVertexAttribArray(program.a_Normal); 140 gl.uniform1i(program.u_Sampler, 0); 148 draw(program, gl); 151 function draw(program, g [all...] |
H A D | shadow_demo.js | 79 let program = createProgram(gl, NORMAL_VS_CODE, NORMAL_FS_CODE, ['a_Position', 'a_Color', 'a_TexCoord'], ['u_MvpMatrix', 'u_MvpMatrixFromLight', 'u_ShadowMap', 'u_Sampler']); 109 gl.useProgram(program); // 为常规绘制设置着色器 110 gl.uniform1i(program.u_ShadowMap, 0); 111 gl.uniformMatrix4fv(program.u_MvpMatrixFromLight, false, mvpMatrixFromLightOt.getElements()); 113 draw2(gl, program, triangle, matrixCamera, boxImage); 114 gl.uniformMatrix4fv(program.u_MvpMatrixFromLight, false, mvpMatrixFromLightOp.getElements()); 116 draw2(gl, program, plane, matrixCamera, floorImage); 125 function draw(gl, program, o, viewProjMatrix) { 126 initAttributeVariable(gl, program.a_Position, o.vertexBuffer); 127 if (program [all...] |
/foundation/graphic/graphic_3d/lume/LumeRender/src/gles/ |
H A D | gpu_program_gles.cpp | 61 void ProcessPushConstants(GLuint program, const ShaderModulePlatformDataGLES& plat, GLenum flag, BindMaps& map) in ProcessPushConstants() argument 73 const GLuint index = glGetProgramResourceIndex(program, GL_UNIFORM, info.name.c_str()); in ProcessPushConstants() 75 glGetProgramResourceiv(program, GL_UNIFORM, index, (GLsizei)countof(uniform_props), uniform_props, in ProcessPushConstants() 86 void ProcessStorageBlocks(GLuint program, const ShaderModulePlatformDataGLES& plat, GLenum flag, const BindMaps& map) in ProcessStorageBlocks() argument 94 const GLuint index = glGetProgramResourceIndex(program, GL_SHADER_STORAGE_BLOCK, t.name.c_str()); in ProcessStorageBlocks() 96 glGetProgramResourceiv(program, GL_SHADER_STORAGE_BLOCK, index, (GLsizei)countof(block_props), block_props, in ProcessStorageBlocks() 107 void ProcessUniformBlocks(GLuint program, const ShaderModulePlatformDataGLES& plat, GLenum flag, BindMaps& map) in ProcessUniformBlocks() argument 128 const GLuint elementIndex = glGetProgramResourceIndex(program, GL_UNIFORM_BLOCK, tmp.c_str()); in ProcessUniformBlocks() 129 glGetProgramResourceiv(program, GL_UNIFORM_BLOCK, elementIndex, (GLsizei)countof(block_props), in ProcessUniformBlocks() 131 glUniformBlockBinding(program, in ProcessUniformBlocks() 151 ProcessImageTextures(GLuint program, const ShaderModulePlatformDataGLES& plat, GLenum flag, const BindMaps& map) ProcessImageTextures() argument 174 ProcessCombinedSamplers(GLuint program, const ShaderModulePlatformDataGLES& plat, GLenum flag, BindMaps& map) ProcessCombinedSamplers() argument [all...] |
H A D | gpu_program_gles.h | 46 uint32_t program { 0 }; 86 uint32_t program { 0 };
|
H A D | device_gles.cpp | 1364 void DeviceGLES::ReleaseProgram(uint32_t program) 1369 if (t.program == program) { 1381 glDeleteProgram(t.program); 1387 PLUGIN_ASSERT_MSG(false, "Tried to release a non-existant program?"); 1441 // Then check if we have the program already cached (ie. matching shaders linked) 1448 return t.program; 1450 // Create new program 1452 const GLuint program = glCreateProgram(); 1455 glProgramParameteri(program, GL_PROGRAM_SEPARABL [all...] |
H A D | render_backend_gles.cpp | 2151 void RenderBackendGLES::SetPushConstant(uint32_t program, const Gles::PushConstantReflection& pc, const void* data) 2159 glProgramUniform1uiv(program, location, count, static_cast<const GLuint*>(data)); 2163 glProgramUniform1fv(program, location, count, static_cast<const GLfloat*>(data)); 2167 glProgramUniform2fv(program, location, count, static_cast<const GLfloat*>(data)); 2171 glProgramUniform4fv(program, location, count, static_cast<const GLfloat*>(data)); 2175 glProgramUniformMatrix4fv(program, location, count, false, static_cast<const GLfloat*>(data)); 2179 glProgramUniform4uiv(program, location, count, static_cast<const GLuint*>(data)); 2187 void RenderBackendGLES::SetPushConstants(uint32_t program, const array_view<Gles::PushConstantReflection>& consts) 2211 SetPushConstant(program, pc, &renderCmd.data[offs]); 2462 uint32_t program in BindResources() local [all...] |
H A D | device_gles.h | 184 void ReleaseProgram(uint32_t program); 186 void UseProgram(uint32_t program); 323 uint32_t program { 0 };
|
H A D | render_backend_gles.h | 150 static void SetPushConstant(uint32_t program, const Gles::PushConstantReflection& pc, const void* data); 151 void SetPushConstants(uint32_t program, const BASE_NS::array_view<Gles::PushConstantReflection>& pushConstants);
|
/foundation/multimedia/image_effect/frameworks/native/render_environment/graphic/ |
H A D | gl_utils.cpp | 172 unsigned int program = glCreateProgram();
in CreateProgram() local 173 if (program == 0) {
in CreateProgram() 176 glAttachShader(program, vs);
in CreateProgram() 177 glAttachShader(program, fs);
in CreateProgram() 178 glLinkProgram(program);
in CreateProgram() 181 glGetProgramiv(program, GL_LINK_STATUS, &status);
in CreateProgram() 184 glGetShaderInfoLog(program, MSG_SIZE - 1, nullptr, &message[0]);
in CreateProgram() 186 glDeleteProgram(program);
in CreateProgram() 187 program = 0;
in CreateProgram() 190 glDetachShader(program, v in CreateProgram() [all...] |
/foundation/graphic/graphic_2d/rosen/samples/opengl/test_eglCreateWindowSurface/entry/src/main/cpp/render/ |
H A D | egl_core.cpp | 86 // Create program.
in CreateEnvironment() 89 OH_LOG_Print(LOG_APP, LOG_ERROR, LOG_PRINT_DOMAIN, "EGLCore", "CreateProgram: unable to create program");
in CreateEnvironment() 115 GLuint program = glCreateProgram();
in CreateProgram() local 116 if (program == PROGRAM_ERROR) {
in CreateProgram() 117 OH_LOG_Print(LOG_APP, LOG_ERROR, LOG_PRINT_DOMAIN, "EGLCore", "createProgram program error");
in CreateProgram() 123 glAttachShader(program, vertex);
in CreateProgram() 124 glAttachShader(program, fragment);
in CreateProgram() 125 glLinkProgram(program);
in CreateProgram() 128 glGetProgramiv(program, GL_LINK_STATUS, &linked);
in CreateProgram() 132 return program;
in CreateProgram() [all...] |
/foundation/multimedia/image_framework/plugins/common/libs/image/libextplugin/src/texture_encode/ |
H A D | image_compressor.cpp | 1354 static CL_ASTC_STATUS SaveClBin(cl_program program, const std::string &clBinPath) in SaveClBin() argument 1357 cl_int clRet = clGetProgramInfo(program, CL_PROGRAM_BINARY_SIZES, sizeof(size_t), &programBinarySizes, NULL); in SaveClBin() 1372 clRet = clGetProgramInfo(program, CL_PROGRAM_BINARIES, programBinarySizes, &programBinaries, NULL); in SaveClBin() 1398 static CL_ASTC_STATUS BuildProgramAndCreateKernel(cl_program program, ClAstcHandle *clAstcHandle) in BuildProgramAndCreateKernel() argument 1400 cl_int clRet = clBuildProgram(program, 1, &clAstcHandle->deviceID, "-cl-std=CL3.0", nullptr, nullptr); in BuildProgramAndCreateKernel() 1405 clAstcHandle->kernel = clCreateKernel(program, "AstcCl", &clRet); in BuildProgramAndCreateKernel() 1416 cl_program program = nullptr; in AstcClBuildProgram() local 1419 program = clCreateProgramWithSource(clAstcHandle->context, 1, &g_programSource, &sourceSize, &clRet); in AstcClBuildProgram() 1424 if (BuildProgramAndCreateKernel(program, clAstcHandle) != CL_ASTC_ENC_SUCCESS) { in AstcClBuildProgram() 1426 clReleaseProgram(program); in AstcClBuildProgram() [all...] |
/foundation/graphic/graphic_2d/rosen/modules/effect/effectChain/src/ |
H A D | program.cpp | 17 #include "program.h"
67 void Program::CheckProgramLinkErrors(GLuint program)
in CheckProgramLinkErrors() argument 71 glGetProgramiv(program, GL_LINK_STATUS, &complete);
in CheckProgramLinkErrors() 73 glGetProgramInfoLog(program, INFO_LOG_LENGTH, nullptr, infoLog);
in CheckProgramLinkErrors()
|
/foundation/graphic/graphic_2d/frameworks/opengl_wrapper/test/ |
H A D | opengl_wrapper_native_test.cpp | 111 GLuint program = glCreateProgram(); in CreateAndLinkProgram() local 113 glAttachShader(program, vert); in CreateAndLinkProgram() 114 glAttachShader(program, frag); in CreateAndLinkProgram() 115 glLinkProgram(program); in CreateAndLinkProgram() 117 glGetProgramiv(program, GL_LINK_STATUS, &status); in CreateAndLinkProgram() 123 return program; in CreateAndLinkProgram()
|
/foundation/arkui/ace_engine_lite/frameworks/tools/qt/simulator/entry/ |
H A D | child_widget.cpp | 105 QString program = QApplication::applicationFilePath();
in RestartApp() local 107 QProcess::startDetached(program, arguments, QDir::currentPath());
in RestartApp()
|
/foundation/graphic/graphic_2d/rosen/modules/effect/effectChain/include/ |
H A D | program.h | 37 void CheckProgramLinkErrors(GLuint program);
|
/foundation/ability/idl_tool/idl_tool_2/util/ |
H A D | options.h | 207 : program(), in Options() 291 std::string program; member in OHOS::Idl::Options
|
/foundation/arkui/ace_engine/frameworks/core/image/ |
H A D | image_compressor.cpp | 119 cl_program program = LoadShaderBin(context_, device_id); in CreateKernel() local 120 clBuildProgram(program, 1, &device_id, compileOption_.c_str(), NULL, NULL); in CreateKernel() 122 kernel_ = clCreateKernel(program, "astc", &err); in CreateKernel() 123 clReleaseProgram(program); in CreateKernel() 127 LOGE("build opencl program failed"); in CreateKernel()
|
/foundation/graphic/graphic_3d/lume/LumeRender/src/vulkan/ |
H A D | pipeline_state_object_vk.cpp | 191 const GpuShaderProgramVk& program = static_cast<const GpuShaderProgramVk&>(gpuShaderProgram); in GraphicsPipelineStateObjectVk() local 192 const GpuShaderProgramPlatformDataVk& platData = program.GetPlatformData(); in GraphicsPipelineStateObjectVk() 543 const GpuComputeProgramVk& program = static_cast<const GpuComputeProgramVk&>(gpuComputeProgram); in ComputePipelineStateObjectVk() local 544 const auto& platData = program.GetPlatformData(); in ComputePipelineStateObjectVk()
|
/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/webgl/src/ |
H A D | webgl_rendering_context_base_impl.cpp | 383 SET_ERROR_WITH_LOG(WebGLRenderingContextBase::INVALID_VALUE, "WebGL attach shader invalid program"); in AttachShader() 1303 uint32_t program = WebGLProgram::DEFAULT_PROGRAM_ID; in UseProgram() local 1306 program = webGLProgram->GetProgramId(); in UseProgram() 1308 if ((currentProgramId_ != program) && (currentProgramId_ != 0)) { in UseProgram() 1311 currentProgramId_ = program; in UseProgram() 1312 glUseProgram(static_cast<GLuint>(program)); in UseProgram() 1314 program, currentProgramId_, GetError_()); in UseProgram() 1320 uint32_t program = WebGLProgram::DEFAULT_PROGRAM_ID; in ValidateProgram() local 1323 program = webGLProgram->GetProgramId(); in ValidateProgram() 1325 LOGD("WebGL validateProgram program in ValidateProgram() 1332 uint32_t program = WebGLProgram::DEFAULT_PROGRAM_ID; LinkProgram() local 1471 BindAttribLocation( napi_env env, napi_value program, GLuint index, const std::string& name) BindAttribLocation() argument 2664 CheckProgramLinkStatus(WebGLProgram* program) CheckProgramLinkStatus() argument [all...] |
/foundation/multimedia/image_effect/frameworks/native/render_environment/ |
H A D | render_environment.cpp | 534 RenderGeneralProgram *program;
in DrawTexFromSurfaceBuffer() local 537 program = param_->shaderBaseDMA_;
in DrawTexFromSurfaceBuffer() 540 program = param_->shaderBaseYUVDMA2RGB2D_;
in DrawTexFromSurfaceBuffer() 543 param_->renderer_->Draw(input, tempFbo, mesh, program, &vp, GL_TEXTURE_EXTERNAL_OES);
in DrawTexFromSurfaceBuffer()
|