morskott
22-01-2008, 14:42
Salve, per una tesina che dovrei fare per l'uni mi serve usare l'OpenGl.
Visto che, essendo abituato a Java, mi sembra piu facile passare al C# invece che al C++ ho scaricato il Tao Framework (http://www.taoframework.com/). Con questo programma di prova using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tao.OpenGl;
using Tao.FreeGlut;
namespace FirstOpenGLTest
{
class OpenGlTest
{
public static void Main(string[] args)
{
int width = 800;
int eight = 600;
Glut.glutInit();
Glut.glutInitDisplayMode(Glut.GLUT_DOUBLE | Glut.GLUT_RGB | Glut.GLUT_DEPTH);
Glut.glutInitWindowSize(width, eight);
Glut.glutInitWindowPosition(100, 100);
Glut.glutCreateWindow("Perspective's GLUT Template");
}
}
}(I vari using (tranne i due Tao) li ha creati autonomamente l'IDE (MS Visual studio 2008)), per compilare compila ma quando vado ad eseguire prima mi diceva che non trovava il file "freeglut.dll", poi una volta trovatolo nella cartella che Tao mi ha creato (e avendolo copiato nella root del compilato) quando vado a rieseguire mi fa un eccezione dicendomi 'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Users\Evangelist\Documents\Visual Studio 2008\Projects\FirstOpenGLTest\FirstOpenGLTest\bin\Debug\FirstOpenGLTest.vshost.exe'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_it_b77a5c561934e089\mscorlib.resources.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
The thread 0x1730 has exited with code 0 (0x0).
The thread 0x1504 has exited with code 0 (0x0).
The thread 0xed4 has exited with code 0 (0x0).
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Users\Evangelist\Documents\Visual Studio 2008\Projects\FirstOpenGLTest\FirstOpenGLTest\bin\Debug\FirstOpenGLTest.exe', Symbols loaded.
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Users\Evangelist\Documents\Visual Studio 2008\Projects\FirstOpenGLTest\FirstOpenGLTest\bin\Debug\Tao.FreeGlut.dll'
A first chance exception of type 'System.BadImageFormatException' occurred in FirstOpenGLTest.exe
An unhandled exception of type 'System.BadImageFormatException' occurred in FirstOpenGLTest.exe
Additional information: Tentativo di caricare un programma con un formato non corretto. (Eccezione da HRESULT: 0x8007000B)
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
The thread 'vshost.RunParkingWindow' (0x17f8) has exited with code 0 (0x0).
The program '[4972] FirstOpenGLTest.vshost.exe: Managed' has exited with code -532459699 (0xe0434f4d).
Qualcuno riesce a spiegarmi l'arcano????
Visto che, essendo abituato a Java, mi sembra piu facile passare al C# invece che al C++ ho scaricato il Tao Framework (http://www.taoframework.com/). Con questo programma di prova using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tao.OpenGl;
using Tao.FreeGlut;
namespace FirstOpenGLTest
{
class OpenGlTest
{
public static void Main(string[] args)
{
int width = 800;
int eight = 600;
Glut.glutInit();
Glut.glutInitDisplayMode(Glut.GLUT_DOUBLE | Glut.GLUT_RGB | Glut.GLUT_DEPTH);
Glut.glutInitWindowSize(width, eight);
Glut.glutInitWindowPosition(100, 100);
Glut.glutCreateWindow("Perspective's GLUT Template");
}
}
}(I vari using (tranne i due Tao) li ha creati autonomamente l'IDE (MS Visual studio 2008)), per compilare compila ma quando vado ad eseguire prima mi diceva che non trovava il file "freeglut.dll", poi una volta trovatolo nella cartella che Tao mi ha creato (e avendolo copiato nella root del compilato) quando vado a rieseguire mi fa un eccezione dicendomi 'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Users\Evangelist\Documents\Visual Studio 2008\Projects\FirstOpenGLTest\FirstOpenGLTest\bin\Debug\FirstOpenGLTest.vshost.exe'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_it_b77a5c561934e089\mscorlib.resources.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
The thread 0x1730 has exited with code 0 (0x0).
The thread 0x1504 has exited with code 0 (0x0).
The thread 0xed4 has exited with code 0 (0x0).
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Users\Evangelist\Documents\Visual Studio 2008\Projects\FirstOpenGLTest\FirstOpenGLTest\bin\Debug\FirstOpenGLTest.exe', Symbols loaded.
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Users\Evangelist\Documents\Visual Studio 2008\Projects\FirstOpenGLTest\FirstOpenGLTest\bin\Debug\Tao.FreeGlut.dll'
A first chance exception of type 'System.BadImageFormatException' occurred in FirstOpenGLTest.exe
An unhandled exception of type 'System.BadImageFormatException' occurred in FirstOpenGLTest.exe
Additional information: Tentativo di caricare un programma con un formato non corretto. (Eccezione da HRESULT: 0x8007000B)
'FirstOpenGLTest.vshost.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
The thread 'vshost.RunParkingWindow' (0x17f8) has exited with code 0 (0x0).
The program '[4972] FirstOpenGLTest.vshost.exe: Managed' has exited with code -532459699 (0xe0434f4d).
Qualcuno riesce a spiegarmi l'arcano????