Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
99e88140
Commit
99e88140
authored
Jul 17, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wrong memory freeing.
parent
861ea059
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
shader.cpp
common/gal/opengl/shader.cpp
+5
-5
No files found.
common/gal/opengl/shader.cpp
View file @
99e88140
...
@@ -164,7 +164,7 @@ void SHADER::programInfo( GLuint aProgram )
...
@@ -164,7 +164,7 @@ void SHADER::programInfo( GLuint aProgram )
wxLogInfo
(
wxString
::
FromUTF8
(
(
char
*
)
glInfoLog
)
);
wxLogInfo
(
wxString
::
FromUTF8
(
(
char
*
)
glInfoLog
)
);
delete
glInfoLog
;
delete
[]
glInfoLog
;
}
}
}
}
...
@@ -185,7 +185,7 @@ void SHADER::shaderInfo( GLuint aShader )
...
@@ -185,7 +185,7 @@ void SHADER::shaderInfo( GLuint aShader )
wxLogInfo
(
wxString
::
FromUTF8
(
(
char
*
)
glInfoLog
)
);
wxLogInfo
(
wxString
::
FromUTF8
(
(
char
*
)
glInfoLog
)
);
delete
glInfoLog
;
delete
[]
glInfoLog
;
}
}
}
}
...
@@ -246,6 +246,9 @@ bool SHADER::addSource( const std::string& aShaderSource, ShaderType aShaderType
...
@@ -246,6 +246,9 @@ bool SHADER::addSource( const std::string& aShaderSource, ShaderType aShaderType
glShaderSource
(
shaderNumber
,
1
,
source_
,
NULL
);
glShaderSource
(
shaderNumber
,
1
,
source_
,
NULL
);
programInfo
(
programNumber
);
programInfo
(
programNumber
);
// Delete the allocated char array
delete
[]
source
;
// Compile and attach shader to the program
// Compile and attach shader to the program
glCompileShader
(
shaderNumber
);
glCompileShader
(
shaderNumber
);
GLint
status
;
GLint
status
;
...
@@ -270,9 +273,6 @@ bool SHADER::addSource( const std::string& aShaderSource, ShaderType aShaderType
...
@@ -270,9 +273,6 @@ bool SHADER::addSource( const std::string& aShaderSource, ShaderType aShaderType
glProgramParameteriEXT
(
programNumber
,
GL_GEOMETRY_OUTPUT_TYPE_EXT
,
geomOutputType
);
glProgramParameteriEXT
(
programNumber
,
GL_GEOMETRY_OUTPUT_TYPE_EXT
,
geomOutputType
);
}
}
// Delete the allocated char array
delete
[]
source
;
return
true
;
return
true
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment