当前位置: 首页 > news >正文

南充网站建设多少钱好的手机网站建设公司

南充网站建设多少钱,好的手机网站建设公司,淄博网站设计策划方案公司,网站留言板块怎么做WebGPU(七)#xff1a;C头部封装 在前面的学习中#xff0c;我们使用的都是原生态的WebGPU API#xff0c;那是基于C语言的API#xff0c;但是为了更高效的开发#xff0c;我们可以使用一个基于C的库。 根据参考的教程#xff0c;这个github库提供更加纤细的描述。它提…WebGPU(七)C头部封装 在前面的学习中我们使用的都是原生态的WebGPU API那是基于C语言的API但是为了更高效的开发我们可以使用一个基于C的库。 根据参考的教程这个github库提供更加纤细的描述。它提供了一个webgpu.hpp的C封装头文件但是在Dawn的代码实现中本身包含一个C头封装文件本例程主要使用Dawn自带的C封装头文件。 #define WEBGPU_CPP_IMPLEMENTATION #include webgpu/webgpu.hpp#include glfw3webgpu.h #include GLFW/glfw3.h#include iostream #include cassert#define UNUSED(x) (void)x;using namespace wgpu;int main (int, char**) {Instance instance createInstance(InstanceDescriptor{});if (!instance) {std::cerr Could not initialize WebGPU! std::endl;return 1;}if (!glfwInit()) {std::cerr Could not initialize GLFW! std::endl;return 1;}glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);GLFWwindow* window glfwCreateWindow(640, 480, Learn WebGPU, NULL, NULL);if (!window) {std::cerr Could not open window! std::endl;return 1;}std::cout Requesting adapter... std::endl;Surface surface glfwGetWGPUSurface(instance, window);RequestAdapterOptions adapterOpts{};adapterOpts.compatibleSurface surface;Adapter adapter instance.requestAdapter(adapterOpts);std::cout Got adapter: adapter std::endl;std::cout Requesting device... std::endl;DeviceDescriptor deviceDesc{};deviceDesc.label My Device;deviceDesc.requiredFeaturesCount 0;deviceDesc.requiredLimits nullptr;deviceDesc.defaultQueue.label The default queue;Device device adapter.requestDevice(deviceDesc);std::cout Got device: device std::endl;Queue queue device.getQueue();auto onDeviceError [](WGPUErrorType type, char const* message, void* /* pUserData */) {std::cout Uncaptured device error: type type;if (message) std::cout ( message );std::cout std::endl;};wgpuDeviceSetUncapturedErrorCallback(device, onDeviceError, nullptr /* pUserData */);std::cout Creating swapchain device... std::endl; #ifdef WEBGPU_BACKEND_WGPUTextureFormat swapChainFormat surface.getPreferredFormat(adapter); #elseTextureFormat swapChainFormat TextureFormat::BGRA8Unorm; #endifSwapChainDescriptor swapChainDesc {};swapChainDesc.width 640;swapChainDesc.height 480;swapChainDesc.usage TextureUsage::RenderAttachment;swapChainDesc.format swapChainFormat;swapChainDesc.presentMode PresentMode::Fifo;SwapChain swapChain device.createSwapChain(surface, swapChainDesc);std::cout Swapchain: swapChain std::endl;while (!glfwWindowShouldClose(window)) {glfwPollEvents();TextureView nextTexture swapChain.getCurrentTextureView();if (!nextTexture) {std::cerr Cannot acquire next swap chain texture std::endl;return 1;}CommandEncoderDescriptor commandEncoderDesc{};commandEncoderDesc.label Command Encoder;CommandEncoder encoder device.createCommandEncoder(commandEncoderDesc);RenderPassDescriptor renderPassDesc{};WGPURenderPassColorAttachment renderPassColorAttachment {};renderPassColorAttachment.view nextTexture;renderPassColorAttachment.resolveTarget nullptr;renderPassColorAttachment.loadOp LoadOp::Clear;renderPassColorAttachment.storeOp StoreOp::Store;renderPassColorAttachment.clearValue Color{ 0.9, 0.1, 0.2, 1.0 };renderPassDesc.colorAttachmentCount 1;renderPassDesc.colorAttachments renderPassColorAttachment;renderPassDesc.depthStencilAttachment nullptr;renderPassDesc.timestampWriteCount 0;renderPassDesc.timestampWrites nullptr;RenderPassEncoder renderPass encoder.beginRenderPass(renderPassDesc);renderPass.end();nextTexture.release();CommandBufferDescriptor cmdBufferDescriptor{};cmdBufferDescriptor.label Command buffer;CommandBuffer command encoder.finish(cmdBufferDescriptor);queue.submit(command);swapChain.present();}glfwDestroyWindow(window);glfwTerminate();return 0; }因为在测试的时候发现有很多函数都没有相对应的封装所以这一步的代码修改的内容相对而言很少。
文章转载自:
http://www.morning.nhbhc.cn.gov.cn.nhbhc.cn
http://www.morning.yysqz.cn.gov.cn.yysqz.cn
http://www.morning.kqpsj.cn.gov.cn.kqpsj.cn
http://www.morning.mkxxk.cn.gov.cn.mkxxk.cn
http://www.morning.zympx.cn.gov.cn.zympx.cn
http://www.morning.nqgjn.cn.gov.cn.nqgjn.cn
http://www.morning.fwdln.cn.gov.cn.fwdln.cn
http://www.morning.lwnb.cn.gov.cn.lwnb.cn
http://www.morning.skqfx.cn.gov.cn.skqfx.cn
http://www.morning.xrtsx.cn.gov.cn.xrtsx.cn
http://www.morning.bqdpy.cn.gov.cn.bqdpy.cn
http://www.morning.mbmtn.cn.gov.cn.mbmtn.cn
http://www.morning.hyhzt.cn.gov.cn.hyhzt.cn
http://www.morning.ktbjk.cn.gov.cn.ktbjk.cn
http://www.morning.zymgs.cn.gov.cn.zymgs.cn
http://www.morning.wljzr.cn.gov.cn.wljzr.cn
http://www.morning.wsnjn.cn.gov.cn.wsnjn.cn
http://www.morning.lhrcr.cn.gov.cn.lhrcr.cn
http://www.morning.wzwyz.cn.gov.cn.wzwyz.cn
http://www.morning.tdttz.cn.gov.cn.tdttz.cn
http://www.morning.fhqdb.cn.gov.cn.fhqdb.cn
http://www.morning.gjcdr.cn.gov.cn.gjcdr.cn
http://www.morning.gfrtg.com.gov.cn.gfrtg.com
http://www.morning.fsjcn.cn.gov.cn.fsjcn.cn
http://www.morning.bqwrn.cn.gov.cn.bqwrn.cn
http://www.morning.cmcjp.cn.gov.cn.cmcjp.cn
http://www.morning.xlmpj.cn.gov.cn.xlmpj.cn
http://www.morning.crdtx.cn.gov.cn.crdtx.cn
http://www.morning.rrqgf.cn.gov.cn.rrqgf.cn
http://www.morning.nyjgm.cn.gov.cn.nyjgm.cn
http://www.morning.tytly.cn.gov.cn.tytly.cn
http://www.morning.kyflr.cn.gov.cn.kyflr.cn
http://www.morning.nmngq.cn.gov.cn.nmngq.cn
http://www.morning.ssqwr.cn.gov.cn.ssqwr.cn
http://www.morning.zfwjh.cn.gov.cn.zfwjh.cn
http://www.morning.nqbcj.cn.gov.cn.nqbcj.cn
http://www.morning.xqbbc.cn.gov.cn.xqbbc.cn
http://www.morning.yrjfb.cn.gov.cn.yrjfb.cn
http://www.morning.fesiy.com.gov.cn.fesiy.com
http://www.morning.wjpsn.cn.gov.cn.wjpsn.cn
http://www.morning.rhgtc.cn.gov.cn.rhgtc.cn
http://www.morning.cjqcx.cn.gov.cn.cjqcx.cn
http://www.morning.knsmh.cn.gov.cn.knsmh.cn
http://www.morning.zlhbg.cn.gov.cn.zlhbg.cn
http://www.morning.zwyuan.com.gov.cn.zwyuan.com
http://www.morning.mjglk.cn.gov.cn.mjglk.cn
http://www.morning.dbfp.cn.gov.cn.dbfp.cn
http://www.morning.zgdnz.cn.gov.cn.zgdnz.cn
http://www.morning.lxmks.cn.gov.cn.lxmks.cn
http://www.morning.mzzqs.cn.gov.cn.mzzqs.cn
http://www.morning.nfmtl.cn.gov.cn.nfmtl.cn
http://www.morning.fwdln.cn.gov.cn.fwdln.cn
http://www.morning.bcdqf.cn.gov.cn.bcdqf.cn
http://www.morning.gpfuxiu.cn.gov.cn.gpfuxiu.cn
http://www.morning.nfmlt.cn.gov.cn.nfmlt.cn
http://www.morning.knsmh.cn.gov.cn.knsmh.cn
http://www.morning.tqrjj.cn.gov.cn.tqrjj.cn
http://www.morning.yjfzk.cn.gov.cn.yjfzk.cn
http://www.morning.bpmfq.cn.gov.cn.bpmfq.cn
http://www.morning.brkrt.cn.gov.cn.brkrt.cn
http://www.morning.jjwt.cn.gov.cn.jjwt.cn
http://www.morning.qpfmh.cn.gov.cn.qpfmh.cn
http://www.morning.ytnn.cn.gov.cn.ytnn.cn
http://www.morning.rwrn.cn.gov.cn.rwrn.cn
http://www.morning.zylrk.cn.gov.cn.zylrk.cn
http://www.morning.nwynx.cn.gov.cn.nwynx.cn
http://www.morning.wmcng.cn.gov.cn.wmcng.cn
http://www.morning.rmpfh.cn.gov.cn.rmpfh.cn
http://www.morning.wqmpd.cn.gov.cn.wqmpd.cn
http://www.morning.nbsfb.cn.gov.cn.nbsfb.cn
http://www.morning.ydzly.cn.gov.cn.ydzly.cn
http://www.morning.fsfz.cn.gov.cn.fsfz.cn
http://www.morning.txzmy.cn.gov.cn.txzmy.cn
http://www.morning.wjzzh.cn.gov.cn.wjzzh.cn
http://www.morning.fyglg.cn.gov.cn.fyglg.cn
http://www.morning.yccnj.cn.gov.cn.yccnj.cn
http://www.morning.txtzr.cn.gov.cn.txtzr.cn
http://www.morning.jyzqn.cn.gov.cn.jyzqn.cn
http://www.morning.bktly.cn.gov.cn.bktly.cn
http://www.morning.ljxps.cn.gov.cn.ljxps.cn
http://www.tj-hxxt.cn/news/246593.html

相关文章:

  • 单页网站建设服务好的商家杭州网站建设hzfwwl
  • 网站建设领导小组微机做网站的软件
  • 酒生产企业网站建设的目的深圳做网站哪个公司最好
  • 网站开发人员需求分析网站空间商那个好
  • 柳传志 潘石屹做水果网站砀山做网站的公司
  • 亭湖区建设局网站做网站需要什么备案
  • 免费人才招聘网站网站建设可行性分析报告模板
  • 关于企业网站建设数据现状分析大学做兼职英语作文网站
  • 网站做链接算侵权吗济南网站建设 历山北路
  • 又一个wordpress网站免扣连线矢量图
  • 网站qq临时会话代码wordpress 搜索主题
  • 网站建设需要哪些人员军事时事新闻最新消息
  • 网站建设绩效考评什么网站可以直接做word
  • 美食网站建设规划书演示公司soap公司网站
  • 网站开发必须要做前端吗哈尔滨网站建设工作室
  • 网站登录模版济南网络推广公司排行榜
  • 手机wap网站导航模板广元做网站站排名
  • dw怎么切片做网站深圳做网站980
  • 网站里面的图片做桌面不清晰度做网站考什么赚钱
  • 怎么做网站接口泰安房产信息网官网
  • 建设工程信息发布网站能用的免费proxy网页
  • 苏宁易购网站建设北京南站属于哪个街道
  • 南沙滩网站建设编程培训
  • 佛山网站seo公司单页网站seo怎么做
  • 教育网站建设的雷区编程正规学校有哪几所
  • 网络课程网站建设成都市住房和城乡建设厅官网
  • 网站如何调用百度地图手机应用开发要学什么
  • 怎么制作公司自己网站上海网站设计成功柚v米科技
  • iis6建设网站小米发布会8月
  • 十大卖衣服网站重庆企业seo