From 3594036be440f29f8bfe0ffc8a07bb549b6c16d2 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 5 Dec 2010 11:52:51 +0000 Subject: [PATCH] * CppSpecWriter.cs: Added definitions for GL types. --- Source/Bind/CppSpecWriter.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Bind/CppSpecWriter.cs b/Source/Bind/CppSpecWriter.cs index bc5035e7..ab3ed468 100644 --- a/Source/Bind/CppSpecWriter.cs +++ b/Source/Bind/CppSpecWriter.cs @@ -74,6 +74,7 @@ namespace Bind { WriteLicense(sw); + sw.WriteLine("#include \"gldef++.h\""); sw.WriteLine("namespace {0}", Settings.OutputNamespace); sw.WriteLine("{"); sw.Indent(); @@ -96,6 +97,7 @@ namespace Bind { WriteLicense(sw); + sw.WriteLine("#include \"gldef++.cpp\""); sw.WriteLine("namespace {0}", Settings.OutputNamespace); sw.WriteLine("{"); sw.Indent(); @@ -123,8 +125,6 @@ namespace Bind void WriteLoader(BindStreamWriter sw, FunctionCollection wrappers, Dictionary CSTypes) { - sw.WriteLine("#include \"gl++def.cpp\""); - // Used to avoid multiple declarations of the same function Delegate last_delegate = null; @@ -261,7 +261,12 @@ namespace Bind last_delegate = null; foreach (var f in current) { - sw.WriteLine("static inline {0} {1}{2}", f.ReturnType, f.TrimmedName, f.Parameters); + if (last_delegate == f.WrappedDelegate) + continue; + last_delegate = f.WrappedDelegate; + + sw.WriteLine("static inline {0} {1}{2}", f.WrappedDelegate.Parameters, + f.TrimmedName, f.WrappedDelegate.Parameters); sw.WriteLine("{"); sw.Indent(); //WriteMethodBody(sw, f);