Skip to content

Compile error under ubuntu 22. #3

@zhangfq-chemistry

Description

@zhangfq-chemistry

RGL-Samples/01-HelloTriangle/hellotriangle.cpp:161:62: error: cannot convert ‘’ to ‘const RGL::RenderPipelineDescriptor&’
161 | renderPipeline = device->CreateRenderPipeline({
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
162 | .stages = {
| ~~~~~~~~~~~
163 | {
| ~
164 | .type = RGL::ShaderStageDesc::Type::Vertex,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165 | .shaderModule = vertexShaderLibrary,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
166 | },
| ~~
167 | {
| ~
168 | .type = RGL::ShaderStageDesc::Type::Fragment,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
169 | .shaderModule = fragmentShaderLibrary,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170 | }
| ~
171 | },
| ~~
172 | .vertexConfig = {
| ~~~~~~~~~~~~~~~~~
173 | .vertexBindings = {{
| ~~~~~~~~~~~~~~~~~~~~
174 | .binding = 0,
| ~~~~~~~~~~~~~
175 | .stride = sizeof(Vertex),
| ~~~~~~~~~~~~~~~~~~~~~~~~~
176 | }},
| ~~~
177 | .attributeDescs = {
| ~~~~~~~~~~~~~~~~~~~
178 | {
| ~
179 | .location = 0,
| ~~~~~~~~~~~~~~
180 | .binding = 0,
| ~~~~~~~~~~~~~
181 | .offset = offsetof(Vertex,pos),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
182 | .format = RGL::VertexAttributeFormat::R32G32_SignedFloat,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183 | },
| ~~
184 | {
| ~
185 | .location = 1,
| ~~~~~~~~~~~~~~
186 | .binding = 0,
| ~~~~~~~~~~~~~
187 | .offset = offsetof(Vertex,color),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
188 | .format = RGL::VertexAttributeFormat::R32G32B32_SignedFloat,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
189 | }
| ~
190 | }
| ~
191 | },
| ~~
192 | .inputAssembly = {
| ~~~~~~~~~~~~~~~~~~
193 | .topology = RGL::PrimitiveTopology::TriangleList,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
194 | },
| ~~
195 | .rasterizerConfig = {
| ~~~~~~~~~~~~~~~~~~~~~
196 | .windingOrder = RGL::WindingOrder::Counterclockwise,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
197 | },
| ~~
198 | .colorBlendConfig{
| ~~~~~~~~~~~~~~~~~~
199 | .attachments = {
| ~~~~~~~~~~~~~~~~
200 | {
| ~
201 | .format = RGL::TextureFormat::BGRA8_Unorm // specify attachment data
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
202 | }
| ~
203 | }
| ~
204 | },
| ~~
205 | .pipelineLayout = renderPipelineLayout,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
206 | });
| ~~

  |                         ~~~~~~~~~~~~~                 

114 | .offset = offsetof(BasicObjects::Quad::Vertex,uv),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115 | .format = RGL::VertexAttributeFormat::R32G32_SignedFloat,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
116 | }
| ~
117 | }
| ~
118 | },
| ~~
119 | .inputAssembly = {
| ~~~~~~~~~~~~~~~~~~
120 | .topology = RGL::PrimitiveTopology::TriangleList,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
121 | },
| ~~
122 | .viewport = {
| ~~~~~~~~~~~~~
123 | .width = (float)width,
| ~~~~~~~~~~~~~~~~~~~~~~
124 | .height = (float)height
| ~~~~~~~~~~~~~~~~~~~~~~~
125 | },
| ~~
126 | .scissor = {
| ~~~~~~~~~~~~
127 | .extent = {width, height}
| ~~~~~~~~~~~~~~~~~~~~~~~~~
128 | },
| ~~
129 | .rasterizerConfig = {
| ~~~~~~~~~~~~~~~~~~~~~
130 | .windingOrder = RGL::WindingOrder::Counterclockwise,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131 | },
| ~~
132 | .colorBlendConfig{
| ~~~~~~~~~~~~~~~~~~
133 | .attachments = {
| ~~~~~~~~~~~~~~~~
134 | {
| ~
135 | .format = RGL::TextureFormat::BGRA8_Unorm // specify attachment data
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
136 | }
| ~
137 | }
| ~
138 | },
| ~~
139 | .depthStencilConfig = {
| ~~~~~~~~~~~~~~~~~~~~~~~
140 | .depthFormat = RGL::TextureFormat::D32SFloat,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141 | .depthTestEnabled = true,
| ~~~~~~~~~~~~~~~~~~~~~~~~~
142 | .depthWriteEnabled = true,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
143 | .depthFunction = RGL::DepthCompareFunction::Less,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144 | },
| ~~
145 | .pipelineLayout = renderPipelineLayout,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 | });
| ~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions