Closed ucacaxm closed 9 years ago
Currently the GLSLSource::FromFile
function loads the specified file as a single string so the Count
function always returns 1 and Parts()
returns the whole content of the file as a single string. Furthermore the GLSLSource
class is intended to store the source of a single shader, so it can be used with glShaderSource
; I don't think it would do good if the Parts()
member function for some instances returned the sources of multiple shaders.
BR,
Matus
Sorry for the empty message.
As in OpenCL, CUDA or HLSL, I would like to write several compute shader in the same file. I know that GLSL does not allow this but I can do it by separating a text file into several string. For instance, each line with "#version 430 core" would the beginning of a new computer shader. Maybe I will add a pragma symbol with the name of the shader.
Just in case, I would like to know if this functionality is already possible with the class GLSLSource, maybe with the function Parts () ?
(if no, don"t worry, I will manage to do it easily).
Anyway, thanks for the great job in oglplus alex