New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed define bug for OpenGL shadergen. #1100

Merged
merged 1 commit into from Feb 7, 2015

Conversation

Projects
None yet
3 participants
@JeffProgrammer
Contributor

JeffProgrammer commented Jan 11, 2015

Defines were "defining" structure properties out for IN structures sometimes.

example shadergen glsl output where this bug happened to me:

     // struct VertexData
     // {
     //    vec3 position;
     //    vec3 normal;
     //    vec3 T;
     //    vec3 B;
     //    vec2 texCoord;
     //    vec2 texCoord2;
     // } IN;
     //
     // out vec4 _TEXCOORD2_;
     //
     // #define texCoord2 OUT_texCoord2
     // #define OUT_outVpos _TEXCOORD2_
Fixed defines for shadergen. Defines were "defining" structure proper…
…ties out for IN structures.

example:

         // struct VertexData
         // {
         //    vec3 position;
         //    vec3 normal;
         //    vec3 T;
         //    vec3 B;
         //    vec2 texCoord;
         //    vec2 texCoord2;
         // } IN;
         //
         // varying vec4 _TEXCOORD2_;
         //
         // #define texCoord2 OUT_texCoord2
         // #define OUT_outVpos _TEXCOORD2_

@crabmusket crabmusket added the Bug label Jan 11, 2015

@@ -405,6 +405,7 @@ void VertPixelConnectorGLSL::printStructDefines( Stream &stream, bool in )
{
dSprintf((char*)output, sizeof(output), "#define %s_%s _%s_\r\n", connectionDir, var->name, var->connectName);
stream.write( dStrlen((char*)output), output );
continue;

This comment has been minimized.

@LuisAntonRebollo

LuisAntonRebollo Feb 7, 2015

Contributor

The code after the continue you added is dead code we can remove.

@LuisAntonRebollo

LuisAntonRebollo Feb 7, 2015

Contributor

The code after the continue you added is dead code we can remove.

LuisAntonRebollo added a commit that referenced this pull request Feb 7, 2015

@LuisAntonRebollo LuisAntonRebollo merged commit d90baad into GarageGames:development Feb 7, 2015

1 check failed

default Merged build finished.
Details

@crabmusket crabmusket added this to the 3.7 milestone Feb 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment