Platform SDK API Reference
Welcome to the comprehensive API reference for the Platform SDK. This section details all available functions, classes, structures, and constants that you can leverage to build powerful applications. Explore the different modules below to find the specific APIs you need.
Graphics Module
The Graphics module provides interfaces for rendering, image manipulation, and display management.
Key Classes & Functions
GraphicsDevice
: Manages the graphics rendering pipeline.RenderSurface
: Represents a drawable surface.Texture2D(width, height, format)
: Creates a 2D texture.DrawPrimitive(vertexData, primitiveType)
: Renders geometric primitives.
GraphicsDevice
Methods
Method | Description | Parameters |
---|---|---|
Present() |
Swaps the back buffer with the front buffer to display rendered content. | None |
Clear(color) |
Clears the render target with a specified color. | color (Color): The color to clear with. |
SetShader(shader) |
Sets the active shader program. | shader (Shader): The shader to set. |
Networking Module
The Networking module offers tools for establishing connections, sending and receiving data, and managing network protocols.
Key Classes & Functions
Socket
: A low-level network endpoint.TcpListener
: Listens for incoming TCP connections.UdpClient
: For sending and receiving UDP datagrams.ResolveHostname(hostname)
: Resolves a hostname to an IP address.
Socket
Methods
Method | Description | Parameters |
---|---|---|
Connect(address, port) |
Establishes a connection to a remote host. | address (string): The IP address or hostname. port (int): The port number. |
Send(data) |
Sends data over the socket. | data (byte[]): The data to send. |
Receive(buffer) |
Receives data into a buffer. | buffer (byte[]): The buffer to receive data into. |
Security Module
The Security module provides APIs for encryption, authentication, and secure data handling.
Key Classes & Functions
AesEncryptor
: Performs AES encryption.Sha256Hash
: Computes SHA-256 hashes.ValidateCertificate(certificate)
: Validates a digital certificate.
Storage Module
The Storage module allows for efficient management of persistent data, including file operations and database interactions.
Key Classes & Functions
FileSystem
: Provides access to the file system.DatabaseConnection
: Establishes a connection to a database.CreateFile(path)
: Creates a new file.ReadFile(path)
: Reads content from a file.
FileSystem
Methods
Method | Description | Parameters |
---|---|---|
Exists(path) |
Checks if a file or directory exists. | path (string): The path to check. |
Delete(path) |
Deletes a file or directory. | path (string): The path to delete. |
Important Notice: Deprecation
The LegacyDataStore
class in the Storage module is deprecated and will be removed in SDK version 3.0. Please migrate to DatabaseConnection
for new implementations.