OpenGL tutorial


#1

https://docs.juce.com/master/tutorial_open_gl_application.html

In this new tutorial, there are some C-style things happening, which I thought was frowned upon in Juce. specifically, the use of const char *. The shader->addFragmentShader() method takes a string, so why does the tutorial class have a const char * to the text that becomes the vertex and fragment shaders?

Same question regarding the OpenGLShaderProgram::Uniform etc constructors and shader->getUniformIDFromName() method. Shouldn’t they be updated to accept a String and have an internal helper method that calls .toRawUTF8() on whatever is passed in?

I thought modern C++ was trying to distance itself from storing strings as const char*:thinking::thinking::thinking::thinking:


#2

I’ll take a look at this. Thanks for pointing that out.