mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-09-09 03:01:41 -04:00
Merge branch '4.0' of https://github.com/ChrisDill/Raylib-cs into 4.0
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Raylib_cs
|
||||
/// Wave type, defines audio wave data
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Wave
|
||||
public unsafe struct Wave
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of samples
|
||||
@@ -30,13 +30,13 @@ namespace Raylib_cs
|
||||
public uint channels;
|
||||
|
||||
/// <summary>
|
||||
/// Buffer data pointer (void *)
|
||||
/// Buffer data pointer
|
||||
/// </summary>
|
||||
public IntPtr data;
|
||||
public void* data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Audio stream type
|
||||
/// Audio stream type<br/>
|
||||
/// NOTE: Useful to create custom audio streams not bound to a specific file
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
@@ -45,7 +45,7 @@ namespace Raylib_cs
|
||||
/// <summary>
|
||||
/// Pointer to internal data(rAudioBuffer *) used by the audio system
|
||||
/// </summary>
|
||||
public IntPtr audioBuffer;
|
||||
public IntPtr buffer;
|
||||
|
||||
/// <summary>
|
||||
/// Frequency (samples per second)
|
||||
@@ -81,11 +81,11 @@ namespace Raylib_cs
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Music stream type (audio file streaming from memory)
|
||||
/// Music stream type (audio file streaming from memory)<br/>
|
||||
/// NOTE: Anything longer than ~10 seconds should be streamed
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Music
|
||||
public unsafe struct Music
|
||||
{
|
||||
/// <summary>
|
||||
/// Audio stream
|
||||
@@ -100,7 +100,7 @@ namespace Raylib_cs
|
||||
/// <summary>
|
||||
/// Music looping enable
|
||||
/// </summary>
|
||||
public byte looping;
|
||||
public CBool looping;
|
||||
|
||||
/// <summary>
|
||||
/// Type of music context (audio filetype)
|
||||
@@ -108,8 +108,8 @@ namespace Raylib_cs
|
||||
public int ctxType;
|
||||
|
||||
/// <summary>
|
||||
/// Audio context data, depends on type (void *)
|
||||
/// Audio context data, depends on type
|
||||
/// </summary>
|
||||
public IntPtr ctxData;
|
||||
public void* ctxData;
|
||||
}
|
||||
}
|
||||
|
@@ -38,7 +38,9 @@ namespace Raylib_cs
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Camera system modes</summary>
|
||||
/// <summary>
|
||||
/// Camera system modes
|
||||
/// </summary>
|
||||
public enum CameraMode
|
||||
{
|
||||
CAMERA_CUSTOM = 0,
|
||||
@@ -48,7 +50,9 @@ namespace Raylib_cs
|
||||
CAMERA_THIRD_PERSON
|
||||
}
|
||||
|
||||
/// <summary>Camera projection</summary>
|
||||
/// <summary>
|
||||
/// Camera projection
|
||||
/// </summary>
|
||||
public enum CameraProjection
|
||||
{
|
||||
CAMERA_PERSPECTIVE = 0,
|
||||
|
@@ -2,9 +2,11 @@ using System;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>System config flags
|
||||
/// NOTE: Every bit registers one state (use it with bit masks)
|
||||
/// By default all flags are set to 0</summary>
|
||||
/// <summary>
|
||||
/// System config flags<br/>
|
||||
/// NOTE: Every bit registers one state (use it with bit masks)<br/>
|
||||
/// By default all flags are set to 0
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum ConfigFlags
|
||||
{
|
||||
@@ -79,8 +81,10 @@ namespace Raylib_cs
|
||||
FLAG_INTERLACED_HINT = 0x00010000,
|
||||
}
|
||||
|
||||
/// <summary>Trace log level
|
||||
/// NOTE: Organized by priority level</summary>
|
||||
/// <summary>
|
||||
/// Trace log level<br/>
|
||||
/// NOTE: Organized by priority level
|
||||
/// </summary>
|
||||
public enum TraceLogLevel
|
||||
{
|
||||
/// <summary>
|
||||
@@ -124,7 +128,9 @@ namespace Raylib_cs
|
||||
LOG_NONE
|
||||
}
|
||||
|
||||
/// <summary>Color blending modes (pre-defined)</summary>
|
||||
/// <summary>
|
||||
/// Color blending modes (pre-defined)
|
||||
/// </summary>
|
||||
public enum BlendMode
|
||||
{
|
||||
/// <summary>
|
||||
|
@@ -3,7 +3,9 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>Font type, defines generation method</summary>
|
||||
/// <summary>
|
||||
/// Font type, defines generation method
|
||||
/// </summary>
|
||||
public enum FontType
|
||||
{
|
||||
/// <summary>
|
||||
@@ -58,7 +60,7 @@ namespace Raylib_cs
|
||||
/// Font, font texture and GlyphInfo array data
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Font
|
||||
public unsafe struct Font
|
||||
{
|
||||
/// <summary>
|
||||
/// Base size (default chars height)
|
||||
@@ -83,11 +85,11 @@ namespace Raylib_cs
|
||||
/// <summary>
|
||||
/// Rectangles in texture for the glyphs
|
||||
/// </summary>
|
||||
public IntPtr recs;
|
||||
public Rectangle* recs;
|
||||
|
||||
/// <summary>
|
||||
/// Glyphs info data
|
||||
/// </summary>
|
||||
public IntPtr glyphs;
|
||||
public GlyphInfo* glyphs;
|
||||
}
|
||||
}
|
||||
|
@@ -3,8 +3,10 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>Pixel formats
|
||||
/// NOTE: Support depends on OpenGL version and platform</summary>
|
||||
/// <summary>
|
||||
/// Pixel formats<br/>
|
||||
/// NOTE: Support depends on OpenGL version and platform
|
||||
/// </summary>
|
||||
public enum PixelFormat
|
||||
{
|
||||
/// <summary>
|
||||
@@ -117,12 +119,12 @@ namespace Raylib_cs
|
||||
/// Image, pixel data stored in CPU memory (RAM)
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Image
|
||||
public unsafe struct Image
|
||||
{
|
||||
/// <summary>
|
||||
/// Image raw data (void *)
|
||||
/// Image raw data
|
||||
/// </summary>
|
||||
public IntPtr data;
|
||||
public void* data;
|
||||
|
||||
/// <summary>
|
||||
/// Image base width
|
||||
|
@@ -4,9 +4,10 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>Keyboard keys (US keyboard layout)
|
||||
/// NOTE: Use GetKeyPressed() to allow redefining
|
||||
/// required keys for alternative layouts</summary>
|
||||
/// <summary>
|
||||
/// Keyboard keys (US keyboard layout)<br/>
|
||||
/// NOTE: Use GetKeyPressed() to allow redefining required keys for alternative layouts
|
||||
/// </summary>
|
||||
public enum KeyboardKey
|
||||
{
|
||||
/// <summary>
|
||||
@@ -132,7 +133,9 @@ namespace Raylib_cs
|
||||
KEY_VOLUME_DOWN = 25
|
||||
}
|
||||
|
||||
/// <summary>Mouse buttons</summary>
|
||||
/// <summary>
|
||||
/// Mouse buttons
|
||||
/// </summary>
|
||||
public enum MouseButton
|
||||
{
|
||||
/// <summary>
|
||||
@@ -161,7 +164,7 @@ namespace Raylib_cs
|
||||
MOUSE_BUTTON_EXTRA = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Mouse button fordward (advanced mouse device)
|
||||
/// Mouse button forward (advanced mouse device)
|
||||
/// </summary>
|
||||
MOUSE_BUTTON_FORWARD = 5,
|
||||
|
||||
@@ -175,7 +178,9 @@ namespace Raylib_cs
|
||||
MOUSE_MIDDLE_BUTTON = MOUSE_BUTTON_MIDDLE,
|
||||
}
|
||||
|
||||
/// <summary>Mouse cursor</summary>
|
||||
/// <summary>
|
||||
/// Mouse cursor
|
||||
/// </summary>
|
||||
public enum MouseCursor
|
||||
{
|
||||
/// <summary>
|
||||
@@ -268,7 +273,9 @@ namespace Raylib_cs
|
||||
GAMEPAD_AXIS_RIGHT_TRIGGER = 5
|
||||
}
|
||||
|
||||
/// <summary>Gamepad buttons</summary>
|
||||
/// <summary>
|
||||
/// Gamepad buttons
|
||||
/// </summary>
|
||||
public enum GamepadButton
|
||||
{
|
||||
/// <summary>
|
||||
@@ -349,9 +356,10 @@ namespace Raylib_cs
|
||||
/// </summary>
|
||||
GAMEPAD_BUTTON_RIGHT_THUMB
|
||||
}
|
||||
|
||||
|
||||
/// <summary>Gesture
|
||||
/// NOTE: It could be used as flags to enable only some gestures</summary>
|
||||
/// NOTE: It could be used as flags to enable only some gestures
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum Gesture
|
||||
{
|
||||
@@ -368,7 +376,9 @@ namespace Raylib_cs
|
||||
GESTURE_PINCH_OUT = 512
|
||||
}
|
||||
|
||||
/// <summary>Head-Mounted-Display device parameters</summary>
|
||||
/// <summary>
|
||||
/// Head-Mounted-Display device parameters
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct VrDeviceInfo
|
||||
{
|
||||
@@ -423,7 +433,9 @@ namespace Raylib_cs
|
||||
public fixed float chromaAbCorrection[4];
|
||||
}
|
||||
|
||||
/// <summary>VR Stereo rendering configuration for simulator</summary>
|
||||
/// <summary>
|
||||
/// VR Stereo rendering configuration for simulator
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct VrStereoConfig
|
||||
{
|
||||
|
@@ -3,21 +3,23 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>Material map index</summary>
|
||||
/// <summary>
|
||||
/// Material map index
|
||||
/// </summary>
|
||||
public enum MaterialMapIndex
|
||||
{
|
||||
/// <summary>
|
||||
/// MAP_DIFFUSE
|
||||
/// NOTE: Same as MATERIAL_MAP_DIFFUSE
|
||||
/// </summary>
|
||||
MATERIAL_MAP_ALBEDO = 0,
|
||||
|
||||
/// <summary>
|
||||
/// MAP_SPECULAR
|
||||
/// NOTE: Same as MATERIAL_MAP_SPECULAR
|
||||
/// </summary>
|
||||
MATERIAL_MAP_METALNESS = 1,
|
||||
MATERIAL_MAP_METALNESS,
|
||||
|
||||
MATERIAL_MAP_NORMAL = 2,
|
||||
MATERIAL_MAP_ROUGHNESS = 3,
|
||||
MATERIAL_MAP_NORMAL,
|
||||
MATERIAL_MAP_ROUGHNESS,
|
||||
MATERIAL_MAP_OCCLUSION,
|
||||
MATERIAL_MAP_EMISSION,
|
||||
MATERIAL_MAP_HEIGHT,
|
||||
@@ -69,7 +71,7 @@ namespace Raylib_cs
|
||||
/// Material type (generic)
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Material
|
||||
public unsafe struct Material
|
||||
{
|
||||
/// <summary>
|
||||
/// Material shader
|
||||
@@ -77,13 +79,13 @@ namespace Raylib_cs
|
||||
public Shader shader;
|
||||
|
||||
/// <summary>
|
||||
/// Material maps (MaterialMap *)
|
||||
/// Material maps
|
||||
/// </summary>
|
||||
public IntPtr maps;
|
||||
public MaterialMap *maps;
|
||||
|
||||
/// <summary>
|
||||
/// Material generic parameters (if required, float *)
|
||||
/// Material generic parameters (if required)
|
||||
/// </summary>
|
||||
public IntPtr param;
|
||||
public fixed float param[4];
|
||||
}
|
||||
}
|
||||
|
@@ -27,11 +27,11 @@ namespace Raylib_cs
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Vertex data definning a mesh
|
||||
/// Vertex data definning a mesh<br/>
|
||||
/// NOTE: Data stored in CPU memory (and GPU)
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Mesh
|
||||
public unsafe struct Mesh
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of vertices stored in arrays
|
||||
@@ -46,63 +46,63 @@ namespace Raylib_cs
|
||||
#region Default vertex data
|
||||
|
||||
/// <summary>
|
||||
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0, float *)
|
||||
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
|
||||
/// </summary>
|
||||
public IntPtr vertices;
|
||||
public float* vertices;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1, float *)
|
||||
/// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
|
||||
/// </summary>
|
||||
public IntPtr texcoords;
|
||||
public float* texcoords;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex second texture coordinates (useful for lightmaps) (shader-location = 5, float *)
|
||||
/// Vertex second texture coordinates (useful for lightmaps) (shader-location = 5)
|
||||
/// </summary>
|
||||
public IntPtr texcoords2;
|
||||
public float* texcoords2;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2, float *)
|
||||
/// Vertex normals (XYZ - 3 components per vertex) (shader-location = 2)
|
||||
/// </summary>
|
||||
public IntPtr normals;
|
||||
public float* normals;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4, float *)
|
||||
/// Vertex tangents (XYZW - 4 components per vertex) (shader-location = 4)
|
||||
/// </summary>
|
||||
public IntPtr tangents;
|
||||
public float* tangents;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3, unsigned char *)
|
||||
/// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
|
||||
/// </summary>
|
||||
public IntPtr colors;
|
||||
public byte* colors;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex indices (in case vertex data comes indexed, unsigned short *)
|
||||
/// Vertex indices (in case vertex data comes indexed)
|
||||
/// </summary>
|
||||
public IntPtr indices;
|
||||
public ushort* indices;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Animation vertex data
|
||||
|
||||
/// <summary>
|
||||
/// Animated vertex positions (after bones transformations, float *)
|
||||
/// Animated vertex positions (after bones transformations)
|
||||
/// </summary>
|
||||
public IntPtr animVertices;
|
||||
public float* animVertices;
|
||||
|
||||
/// <summary>
|
||||
/// Animated normals (after bones transformations, float *)
|
||||
/// Animated normals (after bones transformations)
|
||||
/// </summary>
|
||||
public IntPtr animNormals;
|
||||
public float* animNormals;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex bone ids, up to 4 bones influence by vertex (skinning, int *)
|
||||
/// Vertex bone ids, up to 4 bones influence by vertex (skinning)
|
||||
/// </summary>
|
||||
public IntPtr boneIds;
|
||||
public byte* boneIds;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex bone weight, up to 4 bones influence by vertex (skinning, float *)
|
||||
/// Vertex bone weight, up to 4 bones influence by vertex (skinning)
|
||||
/// </summary>
|
||||
public IntPtr boneWeights;
|
||||
public float* boneWeights;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace Raylib_cs
|
||||
/// <summary>
|
||||
/// OpenGL Vertex Buffer Objects id (default vertex data, uint[])
|
||||
/// </summary>
|
||||
public IntPtr vboId;
|
||||
public uint* vboId;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@@ -8,12 +8,12 @@ namespace Raylib_cs
|
||||
/// Bone information
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct BoneInfo
|
||||
public unsafe struct BoneInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Bone name (char[32])
|
||||
/// </summary>
|
||||
public IntPtr name;
|
||||
public fixed sbyte name[32];
|
||||
|
||||
/// <summary>
|
||||
/// Bone parent
|
||||
@@ -25,7 +25,7 @@ namespace Raylib_cs
|
||||
/// Model type
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Model
|
||||
public unsafe struct Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Local transform matrix
|
||||
@@ -45,17 +45,17 @@ namespace Raylib_cs
|
||||
/// <summary>
|
||||
/// Meshes array (Mesh *)
|
||||
/// </summary>
|
||||
public IntPtr meshes;
|
||||
public Mesh *meshes;
|
||||
|
||||
/// <summary>
|
||||
/// Materials array (Material *)
|
||||
/// </summary>
|
||||
public IntPtr materials;
|
||||
public Material *materials;
|
||||
|
||||
/// <summary>
|
||||
/// Mesh material number (int *)
|
||||
/// </summary>
|
||||
public IntPtr meshMaterial;
|
||||
public int *meshMaterial;
|
||||
|
||||
/// <summary>
|
||||
/// Number of bones
|
||||
@@ -65,19 +65,19 @@ namespace Raylib_cs
|
||||
/// <summary>
|
||||
/// Bones information (skeleton, BoneInfo *)
|
||||
/// </summary>
|
||||
public IntPtr bones;
|
||||
public BoneInfo *bones;
|
||||
|
||||
/// <summary>
|
||||
/// Bones base transformation (pose, Transform *)
|
||||
/// </summary>
|
||||
public IntPtr bindPose;
|
||||
public Transform *bindPose;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Model animation
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct ModelAnimation
|
||||
public unsafe struct ModelAnimation
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of bones
|
||||
@@ -92,11 +92,11 @@ namespace Raylib_cs
|
||||
/// <summary>
|
||||
/// Bones information (skeleton, BoneInfo *)
|
||||
/// </summary>
|
||||
public IntPtr bones;
|
||||
public BoneInfo *bones;
|
||||
|
||||
/// <summary>
|
||||
/// Poses array by frame (Transform **)
|
||||
/// </summary>
|
||||
public IntPtr framePoses;
|
||||
public Transform *framePoses;
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,9 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>N-patch layout</summary>
|
||||
/// <summary>
|
||||
/// N-patch layout
|
||||
/// </summary>
|
||||
public enum NPatchLayout
|
||||
{
|
||||
/// <summary>
|
||||
|
148
Raylib-cs/types/RenderBatch.cs
Normal file
148
Raylib-cs/types/RenderBatch.cs
Normal file
@@ -0,0 +1,148 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>
|
||||
/// RenderBatch type
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct RenderBatch
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of vertex buffers (multi-buffering support)
|
||||
/// </summary>
|
||||
int buffersCount;
|
||||
|
||||
/// <summary>
|
||||
/// Current buffer tracking in case of multi-buffering
|
||||
/// </summary>
|
||||
int currentBuffer;
|
||||
|
||||
/// <summary>
|
||||
/// Dynamic buffer(s) for vertex data
|
||||
/// </summary>
|
||||
VertexBuffer* vertexBuffer;
|
||||
|
||||
/// <summary>
|
||||
/// Draw calls array, depends on textureId
|
||||
/// </summary>
|
||||
DrawCall* draws;
|
||||
|
||||
/// <summary>
|
||||
/// Draw calls counter
|
||||
/// </summary>
|
||||
int drawsCounter;
|
||||
|
||||
/// <summary>
|
||||
/// Current depth value for next draw
|
||||
/// </summary>
|
||||
float currentDepth;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dynamic vertex buffers (position + texcoords + colors + indices arrays)
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct VertexBuffer
|
||||
{
|
||||
/// <summary>
|
||||
/// Number of elements in the buffer (QUADS)
|
||||
/// </summary>
|
||||
public int elementCount;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex position (XYZ - 3 components per vertex) (shader-location = 0)
|
||||
/// </summary>
|
||||
public float* vertices;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex texture coordinates (UV - 2 components per vertex) (shader-location = 1)
|
||||
/// </summary>
|
||||
public float* texcoords;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex colors (RGBA - 4 components per vertex) (shader-location = 3)
|
||||
/// </summary>
|
||||
public byte* colors;
|
||||
|
||||
/// <summary>
|
||||
/// Vertex indices (in case vertex data comes indexed) (6 indices per quad)<br/>
|
||||
/// unsigned int* for GRAPHICS_API_OPENGL_11 or GRAPHICS_API_OPENGL_33<br/>
|
||||
/// unsigned short* for GRAPHICS_API_OPENGL_ES2
|
||||
/// </summary>
|
||||
public void* indices;
|
||||
|
||||
/// <summary>
|
||||
/// OpenGL Vertex Array Object id
|
||||
/// </summary>
|
||||
public uint vaoId;
|
||||
|
||||
/// <summary>
|
||||
/// OpenGL Vertex Buffer Objects id (4 types of vertex data)
|
||||
/// </summary>
|
||||
public fixed uint vboId[4];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dynamic vertex buffers (position + texcoords + colors + indices arrays)
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct DrawCall
|
||||
{
|
||||
/// <summary>
|
||||
/// Drawing mode: LINES, TRIANGLES, QUADS
|
||||
/// </summary>
|
||||
int mode;
|
||||
|
||||
/// <summary>
|
||||
/// Number of vertices for the draw call
|
||||
/// </summary>
|
||||
int vertexCount;
|
||||
|
||||
/// <summary>
|
||||
/// Number of vertices required for index alignment (LINES, TRIANGLES)
|
||||
/// </summary>
|
||||
int vertexAlignment;
|
||||
|
||||
/// <summary>
|
||||
/// Texture id to be used on the draw -> Use to create new draw call if changes
|
||||
/// </summary>
|
||||
uint textureId;
|
||||
}
|
||||
|
||||
public enum GlVersion
|
||||
{
|
||||
OPENGL_11 = 1,
|
||||
OPENGL_21,
|
||||
OPENGL_33,
|
||||
OPENGL_43,
|
||||
OPENGL_ES_20
|
||||
}
|
||||
|
||||
public enum FramebufferAttachType
|
||||
{
|
||||
RL_ATTACHMENT_COLOR_CHANNEL0 = 0,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL1,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL2,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL3,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL4,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL5,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL6,
|
||||
RL_ATTACHMENT_COLOR_CHANNEL7,
|
||||
RL_ATTACHMENT_DEPTH = 100,
|
||||
RL_ATTACHMENT_STENCIL = 200,
|
||||
}
|
||||
|
||||
public enum FramebufferAttachTextureType
|
||||
{
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0,
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X,
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y,
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y,
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z,
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z,
|
||||
RL_ATTACHMENT_TEXTURE2D = 100,
|
||||
RL_ATTACHMENT_RENDERBUFFER = 200,
|
||||
}
|
||||
}
|
@@ -3,7 +3,9 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>Shader location index</summary>
|
||||
/// <summary>
|
||||
/// Shader location index
|
||||
/// </summary>
|
||||
public enum ShaderLocationIndex
|
||||
{
|
||||
SHADER_LOC_VERTEX_POSITION = 0,
|
||||
@@ -37,7 +39,9 @@ namespace Raylib_cs
|
||||
SHADER_LOC_MAP_SPECULAR = SHADER_LOC_MAP_METALNESS,
|
||||
}
|
||||
|
||||
// Shader attribute data types
|
||||
/// <summary>
|
||||
/// Shader attribute data types
|
||||
/// </summary>
|
||||
public enum ShaderAttributeDataType
|
||||
{
|
||||
SHADER_ATTRIB_FLOAT = 0,
|
||||
@@ -46,7 +50,9 @@ namespace Raylib_cs
|
||||
SHADER_ATTRIB_VEC4
|
||||
}
|
||||
|
||||
/// <summary>Shader uniform data type</summary>
|
||||
/// <summary>
|
||||
/// Shader uniform data type
|
||||
/// </summary>
|
||||
public enum ShaderUniformDataType
|
||||
{
|
||||
SHADER_UNIFORM_FLOAT = 0,
|
||||
@@ -64,7 +70,7 @@ namespace Raylib_cs
|
||||
/// Shader type (generic)
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Shader
|
||||
public unsafe struct Shader
|
||||
{
|
||||
/// <summary>
|
||||
/// Shader program id
|
||||
@@ -74,6 +80,6 @@ namespace Raylib_cs
|
||||
/// <summary>
|
||||
/// Shader locations array (MAX_SHADER_LOCATIONS, int *)
|
||||
/// </summary>
|
||||
public IntPtr locs;
|
||||
public int* locs;
|
||||
}
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ namespace Raylib_cs
|
||||
/// <summary>
|
||||
/// Did the ray hit something?
|
||||
/// </summary>
|
||||
public byte hit;
|
||||
public CBool hit;
|
||||
|
||||
/// <summary>
|
||||
/// Distance to nearest hit
|
||||
|
@@ -2,9 +2,11 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace Raylib_cs
|
||||
{
|
||||
/// <summary>Texture parameters: filter mode
|
||||
/// NOTE 1: Filtering considers mipmaps if available in the texture
|
||||
/// NOTE 2: Filter is accordingly set for minification and magnification</summary>
|
||||
/// <summary>
|
||||
/// Texture parameters: filter mode<br/>
|
||||
/// NOTE 1: Filtering considers mipmaps if available in the texture<br/>
|
||||
/// NOTE 2: Filter is accordingly set for minification and magnification
|
||||
/// </summary>
|
||||
public enum TextureFilter
|
||||
{
|
||||
/// <summary>
|
||||
@@ -38,7 +40,9 @@ namespace Raylib_cs
|
||||
TEXTURE_FILTER_ANISOTROPIC_16X,
|
||||
}
|
||||
|
||||
/// <summary>Texture parameters: wrap mode</summary>
|
||||
/// <summary>
|
||||
/// Texture parameters: wrap mode
|
||||
/// </summary>
|
||||
public enum TextureWrap
|
||||
{
|
||||
/// <summary>
|
||||
@@ -62,7 +66,9 @@ namespace Raylib_cs
|
||||
TEXTURE_WRAP_MIRROR_CLAMP
|
||||
}
|
||||
|
||||
/// <summary>Cubemap layouts</summary>
|
||||
/// <summary>
|
||||
/// Cubemap layouts
|
||||
/// </summary>
|
||||
public enum CubemapLayout
|
||||
{
|
||||
/// <summary>
|
||||
@@ -97,8 +103,7 @@ namespace Raylib_cs
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Texture2D type
|
||||
/// <br />
|
||||
/// Texture2D type<br/>
|
||||
/// NOTE: Data stored in GPU memory
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
|
Reference in New Issue
Block a user