OpenGL Shader Uniform Functions Incomplete

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
sigvatr
Posts: 9
Joined: Sat Aug 10, 2013 8:54 pm
Location: Brisbane, Australia
Contact:

OpenGL Shader Uniform Functions Incomplete

Post by sigvatr »

I've been investigating Irrlicht's OpenGL and GLSL support and notice something interesting:

Code: Select all

 
COpenGLExtensionHandler::extGlUniform1fv(GLint loc, GLsizei count, const GLfloat *v) // pointer to data, using OpenGL function "glUniform1fv"
 
While there is an Irrlicht method to use this "glUniform1fv" function, there is no singular "glUniform1f" function that takes a copy of a GLfloat as a parameter (1-4 or otherwise, also for ints).

Unless there is a massive compatibility problem that will be invoked, I think we should include this function in Irrlicht:

Code: Select all

 
COpenGLExtensionHandler::extGlUniform1f(GLint location, GLfloat v0) // to invoke "glUniform1f"
 
I can't really think of any reasons why this function isn't already included in Irrlicht, aside from it being simply overlooked. This goes for all relevant functions respective of vX0-3 and GLfloat/GLint.

Thanks!
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: OpenGL Shader Uniform Functions Incomplete

Post by hendu »

I believe it's not necessary. Passing the float var as a pointer works just as well.
sigvatr
Posts: 9
Joined: Sat Aug 10, 2013 8:54 pm
Location: Brisbane, Australia
Contact:

Re: OpenGL Shader Uniform Functions Incomplete

Post by sigvatr »

I don't believe it is entirely necessary either, but I was in the process of converting some raw OpenGL code to Irrlicht code and the incompatibility problem only arose then. 99% of the people who use Irrlicht will never find this to be a problem, but for the people with an interest in game engine frameworks and development it might be worth considering.
Post Reply