pouët.net

Making 4k intro with Nim programming language

category: code [glöplog]
I tried to use glCreateShaderProgram in my sample code.
It replaced shader object and program object code to 1 call, but I have to use program pipeline object.
glCreateProgramPipelines
glUseProgramStages
glBindProgramPipeline

And also I have to add following code to vertex shader or I get error "ARB_separate_shader_objects requires built-in block gl_PerVertex to be redeclared before accessing its members".
Code: out gl_PerVertex {vec4 gl_Position;};


It reduced code size from 879 to 875.

glCreateShaderProgram would greatly reduce code size if it is used in an intro that use only compute shader (e.g. 4k executable music) as it doesn't require program pipeline object.
But it doesn't reduce code size so much in case vertex shader is used.
added on the 2020-05-16 06:52:07 by tomohiro tomohiro
Interesting language. Since Nim can compile to C it seems it could be used as an alternative on platforms that have no fancy modern languages, but still have C compilers. I’m thinking Amiga for example.
added on the 2020-05-16 07:52:51 by rloaderro rloaderro

login