|
| |

Allgemeine Diskussionen| Re: VB, C# od. C++? | |  | | Autor: Sloorg | | Datum: 23.04.16 06:46 |
| Hallo Manfred,
merci für deine Antwort! Ich muss sagen, ich würde auch lieber bei VB bleiben. Aber wie könnte ich dann z. B. folgenden Code (ich denk mal, der ist in C#) in ein VB.NET-Programm einbinden? Hatte online einen Converter gefunden, und dort eingegeben, aber der Kreisel hat sich ne Std. gedreht und passiert is gar nix...
using System;
using System.Drawing;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
using OpenTK.Input;
namespace Example
{
class MyApplication
{
[STAThread]
public static void Main()
{
using (var game = new GameWindow())
{
game.Load += (sender, e) =>
{
// setup settings, load textures, sounds
game.VSync = VSyncMode.On;
};
game.Resize += (sender, e) =>
{
GL.Viewport(0, 0, game.Width, game.Height);
};
game.UpdateFrame += (sender, e) =>
{
// add game logic, input handling
if (game.Keyboard[Key.Escape])
{
game.Exit();
}
};
game.RenderFrame += (sender, e) =>
{
// render graphics
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.MatrixMode(MatrixMode.Projection);
GL.LoadIdentity();
GL.Ortho(-1.0, 1.0, -1.0, 1.0, 0.0, 4.0);
GL.Begin(PrimitiveType.Triangles);
GL.Color3(Color.MidnightBlue);
GL.Vertex2(-1.0f, 1.0f);
GL.Color3(Color.SpringGreen);
GL.Vertex2(0.0f, -1.0f);
GL.Color3(Color.Ivory);
GL.Vertex2(1.0f, 1.0f);
GL.End();
game.SwapBuffers();
};
// Run the game at 60 updates per second
game.Run(60.0);
}
}
}
}
Der Code stammt von hier (OpenTK-Tutorial):
http://www.opentk.com/doc/chapter/0
Schöne Grüße,
Sloorg. |  |
 VB, C# od. C++? | 6.084 | Sloorg | 22.04.16 03:28 |   Re: VB, C# od. C++? | 3.298 | Manfred X | 22.04.16 09:06 |    Re: VB, C# od. C++? | 3.370 | Sloorg | 23.04.16 06:46 |     Re: VB, C# od. C++? | 3.155 | Manfred X | 23.04.16 08:10 |      Re: VB, C# od. C++? | 2.932 | Manfred X | 23.04.16 08:57 |       Re: VB, C# od. C++? | 3.219 | Sloorg | 24.04.16 12:26 |        Re: VB, C# od. C++? | 2.965 | Franki | 25.04.16 01:17 |         Re: VB, C# od. C++? | 3.061 | Manfred X | 25.04.16 13:28 |          Re: VB, C# od. C++? | 3.017 | Sloorg | 26.04.16 18:59 |          Re: VB, C# od. C++? | 3.222 | Sloorg | 28.04.16 18:33 |         Re: VB, C# od. C++? | 2.929 | Sloorg | 26.04.16 18:56 |          Re: VB, C# od. C++? | 2.976 | Franki | 17.05.16 03:10 |           Re: VB, C# od. C++? | 3.021 | Sloorg | 18.05.16 06:16 |            Re: VB, C# od. C++? | 3.193 | Franki | 19.05.16 00:52 |             Re: VB, C# od. C++? | 2.936 | Sloorg | 21.05.16 08:55 |              Re: VB, C# od. C++? | 3.104 | Manfred X | 21.05.16 13:05 |               Re: VB, C# od. C++? | 2.953 | Sloorg | 23.05.16 12:49 |                Re: VB, C# od. C++? | 2.909 | Manfred X | 23.05.16 15:24 |                 Re: VB, C# od. C++? | 3.048 | Sloorg | 23.05.16 18:56 |                  Re: VB, C# od. C++? | 2.926 | Franki | 24.05.16 01:48 |                   Re: VB, C# od. C++? | 3.042 | Sloorg | 26.05.16 02:27 |                 Re: VB, C# od. C++? - OOP | 3.076 | Sloorg | 26.05.16 04:48 |              Re: VB, C# od. C++? | 3.230 | Franki | 22.05.16 02:58 |   Re: VB, C# od. C++? | 3.206 | Sloorg | 28.04.16 18:40 |
 | Sie sind nicht angemeldet! Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.
Einloggen | Neu registrieren |
  |
|
Neu! sevPopUp 2.0 
Dynamische Kontextmenüs!
Erstellen Sie mit nur wenigen Zeilen Code Kontextmenüs dynamisch zur Laufzeit. Vordefinierte Styles (XP, Office, OfficeXP, Vista oder Windows 8) erleichtern die Anpassung an die eigenen Anwendung... Weitere InfosTipp des Monats Access-Tools Vol.1 
Über 400 MByte Inhalt
Mehr als 250 Access-Beispiele, 25 Add-Ins und ActiveX-Komponenten, 16 VB-Projekt inkl. Source, mehr als 320 Tipps & Tricks für Access und VB
Nur 24,95 EURWeitere Infos
|