Moved all bindings to the "bindings" sub-directory
Renamed the CSFML directory to c Renamed the DSFML directory to d --> bindings must now be updated to match the new organization! git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1630 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
0cc5563cac
commit
0e2297af28
417 changed files with 0 additions and 0 deletions
13
bindings/dotnet/examples/visualbasic/My Project/Application.Designer.vb
generated
Normal file
13
bindings/dotnet/examples/visualbasic/My Project/Application.Designer.vb
generated
Normal file
|
@ -0,0 +1,13 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.3053
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>2</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
|
@ -0,0 +1,35 @@
|
|||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("visualbasic")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Wam")>
|
||||
<Assembly: AssemblyProduct("visualbasic")>
|
||||
<Assembly: AssemblyCopyright("Copyright © Wam 2008")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("6694830f-34ec-4c32-b1c8-895dbbf41593")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
63
bindings/dotnet/examples/visualbasic/My Project/Resources.Designer.vb
generated
Normal file
63
bindings/dotnet/examples/visualbasic/My Project/Resources.Designer.vb
generated
Normal file
|
@ -0,0 +1,63 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.3053
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("visualbasic.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
117
bindings/dotnet/examples/visualbasic/My Project/Resources.resx
Normal file
117
bindings/dotnet/examples/visualbasic/My Project/Resources.resx
Normal file
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
73
bindings/dotnet/examples/visualbasic/My Project/Settings.Designer.vb
generated
Normal file
73
bindings/dotnet/examples/visualbasic/My Project/Settings.Designer.vb
generated
Normal file
|
@ -0,0 +1,73 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:2.0.50727.3053
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings),MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.visualbasic.My.MySettings
|
||||
Get
|
||||
Return Global.visualbasic.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
161
bindings/dotnet/examples/visualbasic/OpenGL.vb
Normal file
161
bindings/dotnet/examples/visualbasic/OpenGL.vb
Normal file
|
@ -0,0 +1,161 @@
|
|||
Imports SFML
|
||||
Imports SFML.Window
|
||||
Imports SFML.Graphics
|
||||
Imports Tao.OpenGl
|
||||
Imports Tao.FreeGlut
|
||||
|
||||
|
||||
Module OpenGL
|
||||
|
||||
Dim WithEvents window As RenderWindow
|
||||
|
||||
''' <summary>
|
||||
''' Entry point of application
|
||||
''' </summary>
|
||||
Sub Main()
|
||||
|
||||
' Create main window
|
||||
window = New RenderWindow(New VideoMode(800, 600), "SFML.Net OpenGL (Visual Basic)")
|
||||
|
||||
' Create a sprite for the background
|
||||
Dim backgroundImage = New Image("resources/background.jpg")
|
||||
Dim background = New Sprite(backgroundImage)
|
||||
|
||||
' Create a text to display
|
||||
Dim text = New Text("SFML / OpenGL demo")
|
||||
text.Position = New Vector2(250.0F, 450.0F)
|
||||
text.Color = New Color(255, 255, 255, 170)
|
||||
|
||||
' Load an OpenGL texture.
|
||||
' We could directly use a SFML.Graphics.Image as an OpenGL texture (with its Bind() member function),
|
||||
' but here we want more control on it (generate mipmaps, ...) so we create a new one
|
||||
Dim texture = 0
|
||||
Using tempImage = New Image("resources/texture.jpg")
|
||||
Gl.glGenTextures(1, texture)
|
||||
Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture)
|
||||
Glu.gluBuild2DMipmaps(Gl.GL_TEXTURE_2D, Gl.GL_RGBA, tempImage.Width, tempImage.Height, Gl.GL_RGBA, Gl.GL_UNSIGNED_BYTE, tempImage.Pixels)
|
||||
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MAG_FILTER, Gl.GL_LINEAR)
|
||||
Gl.glTexParameteri(Gl.GL_TEXTURE_2D, Gl.GL_TEXTURE_MIN_FILTER, Gl.GL_LINEAR_MIPMAP_LINEAR)
|
||||
End Using
|
||||
|
||||
' Enable Z-buffer read and write
|
||||
Gl.glEnable(Gl.GL_DEPTH_TEST)
|
||||
Gl.glDepthMask(Gl.GL_TRUE)
|
||||
Gl.glClearDepth(1.0F)
|
||||
|
||||
' Setup a perspective projection
|
||||
Gl.glMatrixMode(Gl.GL_PROJECTION)
|
||||
Gl.glLoadIdentity()
|
||||
Glu.gluPerspective(90.0F, 1.0F, 1.0F, 500.0F)
|
||||
|
||||
' Bind our texture
|
||||
Gl.glEnable(Gl.GL_TEXTURE_2D)
|
||||
Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture)
|
||||
Gl.glColor4f(1.0F, 1.0F, 1.0F, 1.0F)
|
||||
|
||||
Dim time = 0.0F
|
||||
|
||||
' Start game loop
|
||||
While (window.IsOpened())
|
||||
|
||||
' Process events
|
||||
window.DispatchEvents()
|
||||
|
||||
' Draw background
|
||||
window.SaveGLStates()
|
||||
window.Draw(background)
|
||||
window.RestoreGLStates()
|
||||
|
||||
' Clear depth buffer
|
||||
Gl.glClear(Gl.GL_DEPTH_BUFFER_BIT)
|
||||
|
||||
' We get the position of the mouse cursor, so that we can move the box accordingly
|
||||
Dim x = window.Input.GetMouseX() * 200.0F / window.Width - 100.0F
|
||||
Dim y = -window.Input.GetMouseY() * 200.0F / window.Height + 100.0F
|
||||
|
||||
' Apply some transformations
|
||||
time += window.GetFrameTime()
|
||||
Gl.glMatrixMode(Gl.GL_MODELVIEW)
|
||||
Gl.glLoadIdentity()
|
||||
Gl.glTranslatef(x, y, -100.0F)
|
||||
Gl.glRotatef(time * 50, 1.0F, 0.0F, 0.0F)
|
||||
Gl.glRotatef(time * 30, 0.0F, 1.0F, 0.0F)
|
||||
Gl.glRotatef(time * 90, 0.0F, 0.0F, 1.0F)
|
||||
|
||||
' Draw a cube
|
||||
Dim size = 20.0F
|
||||
Gl.glBegin(Gl.GL_QUADS)
|
||||
|
||||
Gl.glTexCoord2f(0, 0) : Gl.glVertex3f(-size, -size, -size)
|
||||
Gl.glTexCoord2f(0, 1) : Gl.glVertex3f(-size, size, -size)
|
||||
Gl.glTexCoord2f(1, 1) : Gl.glVertex3f(size, size, -size)
|
||||
Gl.glTexCoord2f(1, 0) : Gl.glVertex3f(size, -size, -size)
|
||||
|
||||
Gl.glTexCoord2f(0, 0) : Gl.glVertex3f(-size, -size, size)
|
||||
Gl.glTexCoord2f(0, 1) : Gl.glVertex3f(-size, size, size)
|
||||
Gl.glTexCoord2f(1, 1) : Gl.glVertex3f(size, size, size)
|
||||
Gl.glTexCoord2f(1, 0) : Gl.glVertex3f(size, -size, size)
|
||||
|
||||
Gl.glTexCoord2f(0, 0) : Gl.glVertex3f(-size, -size, -size)
|
||||
Gl.glTexCoord2f(0, 1) : Gl.glVertex3f(-size, size, -size)
|
||||
Gl.glTexCoord2f(1, 1) : Gl.glVertex3f(-size, size, size)
|
||||
Gl.glTexCoord2f(1, 0) : Gl.glVertex3f(-size, -size, size)
|
||||
|
||||
Gl.glTexCoord2f(0, 0) : Gl.glVertex3f(size, -size, -size)
|
||||
Gl.glTexCoord2f(0, 1) : Gl.glVertex3f(size, size, -size)
|
||||
Gl.glTexCoord2f(1, 1) : Gl.glVertex3f(size, size, size)
|
||||
Gl.glTexCoord2f(1, 0) : Gl.glVertex3f(size, -size, size)
|
||||
|
||||
Gl.glTexCoord2f(0, 1) : Gl.glVertex3f(-size, -size, size)
|
||||
Gl.glTexCoord2f(0, 0) : Gl.glVertex3f(-size, -size, -size)
|
||||
Gl.glTexCoord2f(1, 0) : Gl.glVertex3f(size, -size, -size)
|
||||
Gl.glTexCoord2f(1, 1) : Gl.glVertex3f(size, -size, size)
|
||||
|
||||
Gl.glTexCoord2f(0, 1) : Gl.glVertex3f(-size, size, size)
|
||||
Gl.glTexCoord2f(0, 0) : Gl.glVertex3f(-size, size, -size)
|
||||
Gl.glTexCoord2f(1, 0) : Gl.glVertex3f(size, size, -size)
|
||||
Gl.glTexCoord2f(1, 1) : Gl.glVertex3f(size, size, size)
|
||||
|
||||
Gl.glEnd()
|
||||
|
||||
' Draw some text on top of our OpenGL object
|
||||
window.SaveGLStates()
|
||||
window.Draw(text)
|
||||
window.RestoreGLStates()
|
||||
|
||||
' Finally, display the rendered frame on screen
|
||||
window.Display()
|
||||
|
||||
End While
|
||||
|
||||
' Don't forget to destroy our texture
|
||||
Gl.glDeleteTextures(1, texture)
|
||||
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Function called when the window is closed
|
||||
''' </summary>
|
||||
Sub App_Closed(ByVal sender As Object, ByVal e As EventArgs) Handles window.Closed
|
||||
Dim window = CType(sender, RenderWindow)
|
||||
window.Close()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Function called when a key is pressed
|
||||
''' </summary>
|
||||
Sub App_KeyPressed(ByVal sender As Object, ByVal e As KeyEventArgs) Handles window.KeyPressed
|
||||
Dim window = CType(sender, RenderWindow)
|
||||
If e.Code = KeyCode.Escape Then
|
||||
window.Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Function called when the window is resized
|
||||
''' </summary>
|
||||
Sub App_Resized(ByVal sender As Object, ByVal e As SizeEventArgs) Handles window.Resized
|
||||
Gl.glViewport(0, 0, e.Width, e.Height)
|
||||
End Sub
|
||||
|
||||
End Module
|
BIN
bindings/dotnet/examples/visualbasic/resources/background.jpg
Normal file
BIN
bindings/dotnet/examples/visualbasic/resources/background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 KiB |
BIN
bindings/dotnet/examples/visualbasic/resources/texture.jpg
Normal file
BIN
bindings/dotnet/examples/visualbasic/resources/texture.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
20
bindings/dotnet/examples/visualbasic/visualbasic.sln
Normal file
20
bindings/dotnet/examples/visualbasic/visualbasic.sln
Normal file
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Basic Express 2008
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "visualbasic", "visualbasic.vbproj", "{98552080-F688-46B4-A2FF-1AC7C50ECBE8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{98552080-F688-46B4-A2FF-1AC7C50ECBE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{98552080-F688-46B4-A2FF-1AC7C50ECBE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{98552080-F688-46B4-A2FF-1AC7C50ECBE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{98552080-F688-46B4-A2FF-1AC7C50ECBE8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
121
bindings/dotnet/examples/visualbasic/visualbasic.vbproj
Normal file
121
bindings/dotnet/examples/visualbasic/visualbasic.vbproj
Normal file
|
@ -0,0 +1,121 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{98552080-F688-46B4-A2FF-1AC7C50ECBE8}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>visualbasic.OpenGL</StartupObject>
|
||||
<RootNamespace>visualbasic</RootNamespace>
|
||||
<AssemblyName>visualbasic</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsFormsWithCustomSubMain</MyType>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>.\</OutputPath>
|
||||
<DocumentationFile>visualbasic.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>visualbasic.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="sfmlnet2-graphics, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\sfmlnet2-graphics.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="sfmlnet2-window, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\lib\sfmlnet2-window.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="Tao.FreeGlut, Version=2.4.0.2, Culture=neutral, PublicKeyToken=6e602a6ad6c0d06d, processorArchitecture=MSIL" />
|
||||
<Reference Include="Tao.OpenGl, Version=2.1.0.12, Culture=neutral, PublicKeyToken=1ca010269a4501ef, processorArchitecture=MSIL" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="OpenGL.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue