Skip to content

syntax error? #2

Open
Open
@ghost

Description

Hi,
I have build these projects with CodeBlocks and MinGW on windows.
Everything is correct except compute shader nbody.
I have some errors in Code Blocks:

||=== Build: all in OPENGLEXAMPLES (compiler: GNU GCC Compiler) ===|
E:\Lab\OpenGL-Examples\13compute_shader_nbody.cpp||In function 'int main()':|
E:\Lab\OpenGL-Examples\13compute_shader_nbody.cpp|368|error: taking address of temporary array|
CMakeFiles\13compute_shader_nbody.dir\build.make|54|recipe for target 'CMakeFiles/13compute_shader_nbody.dir/13compute_shader_nbody.cpp.obj' failed|
CMakeFiles\Makefile2|636|recipe for target 'CMakeFiles/13compute_shader_nbody.dir/all' failed|
E:\Lab\OpenGL-Examples\build\Makefile|116|recipe for target 'all' failed|
||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 3 second(s)) ===|

I suspect line 368

glBindBuffersBase(GL_SHADER_STORAGE_BUFFER, 0, 2, (const GLuint[]){positions_vbo, velocities_vbo});

Please give me some advice how fix this line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions