diff --git a/Raylib-cs/interop/Rlgl.cs b/Raylib-cs/interop/Rlgl.cs index 349dbb2..9e09982 100644 --- a/Raylib-cs/interop/Rlgl.cs +++ b/Raylib-cs/interop/Rlgl.cs @@ -93,54 +93,54 @@ namespace Raylib_cs /// Choose the current matrix to be transformed [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlMatrixMode(int mode); + public static extern void rlMatrixMode(int mode); - /// - public static void RlMatrixMode(MatrixMode mode) + /// + public static void rlMatrixMode(MatrixMode mode) { - RlMatrixMode((int)mode); + rlMatrixMode((int)mode); } /// Push the current matrix to stack [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlPushMatrix(); + public static extern void rlPushMatrix(); /// Pop lattest inserted matrix from stack [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlPopMatrix(); + public static extern void rlPopMatrix(); /// Reset current matrix to identity matrix [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlLoadIdentity(); + public static extern void rlLoadIdentity(); /// Multiply the current matrix by a translation matrix [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlTranslatef(float x, float y, float z); + public static extern void rlTranslatef(float x, float y, float z); /// Multiply the current matrix by a rotation matrix [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlRotatef(float angle, float x, float y, float z); + public static extern void rlRotatef(float angle, float x, float y, float z); /// Multiply the current matrix by a scaling matrix [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlScalef(float x, float y, float z); + public static extern void rlScalef(float x, float y, float z); /// /// Multiply the current matrix by another matrix
- /// Current Matrix can be set via + /// Current Matrix can be set via ///
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlMultMatrixf(float* matf); + public static extern void rlMultMatrixf(float* matf); - /// - public static void RlMultMatrixf(Matrix4x4 matf) + /// + public static void rlMultMatrixf(Matrix4x4 matf) { Float16 f = Raymath.MatrixToFloatV(matf); - RlMultMatrixf(f.v); + rlMultMatrixf(f.v); } [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlFrustum( + public static extern void rlFrustum( double left, double right, double bottom, @@ -150,7 +150,7 @@ namespace Raylib_cs ); [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlOrtho( + public static extern void rlOrtho( double left, double right, double bottom, @@ -161,7 +161,7 @@ namespace Raylib_cs /// Set the viewport area [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlViewport(int x, int y, int width, int height); + public static extern void rlViewport(int x, int y, int width, int height); // ------------------------------------------------------------------------------------ @@ -170,48 +170,48 @@ namespace Raylib_cs /// Initialize drawing mode (how to organize vertex) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlBegin(int mode); + public static extern void rlBegin(int mode); - public static void RlBegin(DrawMode mode) + public static void rlBegin(DrawMode mode) { - RlBegin((int)mode); + rlBegin((int)mode); } /// Finish vertex providing [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnd(); + public static extern void rlEnd(); /// Define one vertex (position) - 2 int [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlVertex2i(int x, int y); + public static extern void rlVertex2i(int x, int y); /// Define one vertex (position) - 2 float [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlVertex2f(float x, float y); + public static extern void rlVertex2f(float x, float y); /// Define one vertex (position) - 3 float [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlVertex3f(float x, float y, float z); + public static extern void rlVertex3f(float x, float y, float z); /// Define one vertex (texture coordinate) - 2 float [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlTexCoord2f(float x, float y); + public static extern void rlTexCoord2f(float x, float y); /// Define one vertex (normal) - 3 float [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlNormal3f(float x, float y, float z); + public static extern void rlNormal3f(float x, float y, float z); /// Define one vertex (color) - 4 byte [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlColor4ub(byte r, byte g, byte b, byte a); + public static extern void rlColor4ub(byte r, byte g, byte b, byte a); /// Define one vertex (color) - 3 float [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlColor3f(float x, float y, float z); + public static extern void rlColor3f(float x, float y, float z); /// Define one vertex (color) - 4 float [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlColor4f(float x, float y, float z, float w); + public static extern void rlColor4f(float x, float y, float z, float w); // ------------------------------------------------------------------------------------ @@ -223,213 +223,213 @@ namespace Raylib_cs /// Enable vertex array (VAO, if supported) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern CBool RlEnableVertexArray(uint vaoId); + public static extern CBool rlEnableVertexArray(uint vaoId); /// Disable vertex array (VAO, if supported) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableVertexArray(); + public static extern void rlDisableVertexArray(); /// Enable vertex buffer (VBO) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableVertexBuffer(uint id); + public static extern void rlEnableVertexBuffer(uint id); /// Disable vertex buffer (VBO) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableVertexBuffer(); + public static extern void rlDisableVertexBuffer(); /// Enable vertex buffer element (VBO element) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableVertexBufferElement(uint id); + public static extern void rlEnableVertexBufferElement(uint id); /// Disable vertex buffer element (VBO element) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableVertexBufferElement(); + public static extern void rlDisableVertexBufferElement(); /// Enable vertex attribute index [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableVertexAttribute(uint index); + public static extern void rlEnableVertexAttribute(uint index); /// Disable vertex attribute index [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableVertexAttribute(uint index); + public static extern void rlDisableVertexAttribute(uint index); /// Enable attribute state pointer
/// NOTE: Only available for GRAPHICS_API_OPENGL_11
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableStatePointer(int vertexAttribType, void* buffer); + public static extern void rlEnableStatePointer(int vertexAttribType, void* buffer); /// Disable attribute state pointer
/// NOTE: Only available for GRAPHICS_API_OPENGL_11
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableStatePointer(int vertexAttribType); + public static extern void rlDisableStatePointer(int vertexAttribType); // Textures state /// Select and active a texture slot [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlActiveTextureSlot(int slot); + public static extern void rlActiveTextureSlot(int slot); /// Enable texture [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableTexture(uint id); + public static extern void rlEnableTexture(uint id); /// Disable texture [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableTexture(); + public static extern void rlDisableTexture(); /// Enable texture cubemap [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableTextureCubemap(uint id); + public static extern void rlEnableTextureCubemap(uint id); /// Disable texture cubemap [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableTextureCubemap(); + public static extern void rlDisableTextureCubemap(); /// Set texture parameters (filter, wrap) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlTextureParameters(uint id, int param, int value); + public static extern void rlTextureParameters(uint id, int param, int value); /// Set cubemap parameters (filter, wrap) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlCubemapParameters(uint id, int param, int value); + public static extern void rlCubemapParameters(uint id, int param, int value); // Shader state /// Enable shader program [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableShader(uint id); + public static extern void rlEnableShader(uint id); /// Disable shader program [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableShader(); + public static extern void rlDisableShader(); // Framebuffer state /// Enable render texture (fbo) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableFramebuffer(uint id); + public static extern void rlEnableFramebuffer(uint id); /// Disable render texture (fbo), return to default framebuffer [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableFramebuffer(); + public static extern void rlDisableFramebuffer(); /// Activate multiple draw color buffers [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlActiveDrawBuffers(int count); + public static extern void rlActiveDrawBuffers(int count); // General render state /// Enable color blending [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableColorBlend(); + public static extern void rlEnableColorBlend(); /// Disable color blending [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableColorBlend(); + public static extern void rlDisableColorBlend(); /// Enable depth test [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableDepthTest(); + public static extern void rlEnableDepthTest(); /// Disable depth test [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableDepthTest(); + public static extern void rlDisableDepthTest(); /// Enable depth write [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableDepthMask(); + public static extern void rlEnableDepthMask(); /// Disable depth write [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableDepthMask(); + public static extern void rlDisableDepthMask(); /// Enable backface culling [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableBackfaceCulling(); + public static extern void rlEnableBackfaceCulling(); /// Disable backface culling [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableBackfaceCulling(); + public static extern void rlDisableBackfaceCulling(); /// Set face culling mode [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetCullFace(int mode); + public static extern void rlSetCullFace(int mode); /// Enable scissor test [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableScissorTest(); + public static extern void rlEnableScissorTest(); /// Disable scissor test [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableScissorTest(); + public static extern void rlDisableScissorTest(); /// Scissor test [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlScissor(int x, int y, int width, int height); + public static extern void rlScissor(int x, int y, int width, int height); /// Enable wire mode [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableWireMode(); + public static extern void rlEnableWireMode(); /// Disable wire mode [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableWireMode(); + public static extern void rlDisableWireMode(); /// Set the line drawing width [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetLineWidth(float width); + public static extern void rlSetLineWidth(float width); /// Get the line drawing width [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern float RlGetLineWidth(); + public static extern float rlGetLineWidth(); /// Enable line aliasing [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableSmoothLines(); + public static extern void rlEnableSmoothLines(); /// Disable line aliasing [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableSmoothLines(); + public static extern void rlDisableSmoothLines(); /// Enable stereo rendering [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlEnableStereoRender(); + public static extern void rlEnableStereoRender(); /// Disable stereo rendering [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDisableStereoRender(); + public static extern void rlDisableStereoRender(); /// Check if stereo render is enabled [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern CBool RlIsStereoRenderEnabled(); + public static extern CBool rlIsStereoRenderEnabled(); /// Clear color buffer with color [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlClearColor(byte r, byte g, byte b, byte a); + public static extern void rlClearColor(byte r, byte g, byte b, byte a); /// Clear used screen buffers (color and depth) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlClearScreenBuffers(); + public static extern void rlClearScreenBuffers(); /// Check and log OpenGL error codes [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlCheckErrors(); + public static extern void rlCheckErrors(); /// Set blending mode [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetBlendMode(BlendMode mode); + public static extern void rlSetBlendMode(BlendMode mode); /// Set blending mode factor and equation (using OpenGL factors) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation); + public static extern void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation); /// Set blending mode factors and equations separately (using OpenGL factors) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetBlendFactorsSeparate( + public static extern void rlSetBlendFactorsSeparate( int glSrcRGB, int glDstRGB, int glSrcAlpha, @@ -445,39 +445,39 @@ namespace Raylib_cs /// Initialize rlgl (buffers, shaders, textures, states) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlGlInit(int width, int height); + public static extern void rlglInit(int width, int height); /// De-inititialize rlgl (buffers, shaders, textures) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlGlClose(); + public static extern void rlglClose(); /// Load OpenGL extensions [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlLoadExtensions(void* loader); + public static extern void rlLoadExtensions(void* loader); /// Get current OpenGL version [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern GlVersion RlGetVersion(); + public static extern GlVersion rlGetVersion(); /// Get default framebuffer width [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern int RlGetFramebufferWidth(); + public static extern int rlGetFramebufferWidth(); /// Get default framebuffer height [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern int RlGetFramebufferHeight(); + public static extern int rlGetFramebufferHeight(); /// Get default texture [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlGetTextureIdDefault(); + public static extern uint rlGetTextureIdDefault(); /// Get default shader [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlGetShaderIdDefault(); + public static extern uint rlGetShaderIdDefault(); /// Get default shader locations [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern int* RlGetShaderLocsDefault(); + public static extern int* rlGetShaderLocsDefault(); // Render batch management @@ -485,63 +485,63 @@ namespace Raylib_cs /// NOTE: rlgl provides a default render batch to behave like OpenGL 1.1 immediate mode
/// but this render batch API is exposed in case custom batches are required [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern RenderBatch RlLoadRenderBatch(int numBuffers, int bufferElements); + public static extern RenderBatch rlLoadRenderBatch(int numBuffers, int bufferElements); /// Unload render batch system [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUnloadRenderBatch(RenderBatch batch); + public static extern void rlUnloadRenderBatch(RenderBatch batch); /// Draw render batch data (Update->Draw->Reset) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDrawRenderBatch(RenderBatch* batch); + public static extern void rlDrawRenderBatch(RenderBatch* batch); /// Set the active render batch for rlgl (NULL for default internal) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetRenderBatchActive(RenderBatch* batch); + public static extern void rlSetRenderBatchActive(RenderBatch* batch); /// Update and draw internal render batch [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDrawRenderBatchActive(); + public static extern void rlDrawRenderBatchActive(); /// Check internal buffer overflow for a given number of vertex [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern CBool RlCheckRenderBatchLimit(int vCount); + public static extern CBool rlCheckRenderBatchLimit(int vCount); /// Set current texture for render batch and check buffers limits [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetTexture(uint id); + public static extern void rlSetTexture(uint id); // Vertex buffers management /// Load vertex array (vao) if supported [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadVertexArray(); + public static extern uint rlLoadVertexArray(); /// Load a vertex buffer attribute [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadVertexBuffer(void* buffer, int size, CBool dynamic); + public static extern uint rlLoadVertexBuffer(void* buffer, int size, CBool dynamic); /// Load a new attributes element buffer [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadVertexBufferElement(void* buffer, int size, CBool dynamic); + public static extern uint rlLoadVertexBufferElement(void* buffer, int size, CBool dynamic); /// Update GPU buffer with new data [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUpdateVertexBuffer(uint bufferId, void* data, int dataSize, int offset); + public static extern void rlUpdateVertexBuffer(uint bufferId, void* data, int dataSize, int offset); /// Update vertex buffer elements with new data [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUpdateVertexBufferElements(uint id, void* data, int dataSize, int offset); + public static extern void rlUpdateVertexBufferElements(uint id, void* data, int dataSize, int offset); [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUnloadVertexArray(uint vaoId); + public static extern void rlUnloadVertexArray(uint vaoId); [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUnloadVertexBuffer(uint vboId); + public static extern void rlUnloadVertexBuffer(uint vboId); [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetVertexAttribute( + public static extern void rlSetVertexAttribute( uint index, int compSize, int type, @@ -551,23 +551,23 @@ namespace Raylib_cs ); [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetVertexAttributeDivisor(uint index, int divisor); + public static extern void rlSetVertexAttributeDivisor(uint index, int divisor); /// Set vertex attribute default value [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetVertexAttributeDefault(int locIndex, void* value, int attribType, int count); + public static extern void rlSetVertexAttributeDefault(int locIndex, void* value, int attribType, int count); [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDrawVertexArray(int offset, int count); + public static extern void rlDrawVertexArray(int offset, int count); [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDrawVertexArrayElements(int offset, int count, void* buffer); + public static extern void rlDrawVertexArrayElements(int offset, int count, void* buffer); [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDrawVertexArrayInstanced(int offset, int count, int instances); + public static extern void rlDrawVertexArrayInstanced(int offset, int count, int instances); [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlDrawVertexArrayElementsInstanced( + public static extern void rlDrawVertexArrayElementsInstanced( int offset, int count, void* buffer, @@ -579,19 +579,19 @@ namespace Raylib_cs /// Load texture in GPU [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadTexture(void* data, int width, int height, PixelFormat format, int mipmapCount); + public static extern uint rlLoadTexture(void* data, int width, int height, PixelFormat format, int mipmapCount); /// Load depth texture/renderbuffer (to be attached to fbo) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadTextureDepth(int width, int height, CBool useRenderBuffer); + public static extern uint rlLoadTextureDepth(int width, int height, CBool useRenderBuffer); /// Load texture cubemap [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadTextureCubemap(void* data, int size, PixelFormat format); + public static extern uint rlLoadTextureCubemap(void* data, int size, PixelFormat format); /// Update GPU texture with new data [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUpdateTexture( + public static extern void rlUpdateTexture( uint id, int offsetX, int offsetY, @@ -603,7 +603,7 @@ namespace Raylib_cs /// Get OpenGL internal formats [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlGetGlTextureFormats( + public static extern void rlGetGlTextureFormats( PixelFormat format, int* glInternalFormat, int* glFormat, @@ -612,34 +612,34 @@ namespace Raylib_cs /// Get OpenGL internal formats [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern sbyte* RlGetPixelFormatName(PixelFormat format); + public static extern sbyte* rlGetPixelFormatName(PixelFormat format); /// Unload texture from GPU memory [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUnloadTexture(uint id); + public static extern void rlUnloadTexture(uint id); /// Generate mipmap data for selected texture [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlGenTextureMipmaps(uint id, int width, int height, PixelFormat format, int* mipmaps); + public static extern void rlGenTextureMipmaps(uint id, int width, int height, PixelFormat format, int* mipmaps); /// Read texture pixel data [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void* RlReadTexturePixels(uint id, int width, int height, PixelFormat format); + public static extern void* rlReadTexturePixels(uint id, int width, int height, PixelFormat format); /// Read screen pixel data (color buffer) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern byte* RlReadScreenPixels(int width, int height); + public static extern byte* rlReadScreenPixels(int width, int height); // Framebuffer management (fbo) /// Load an empty framebuffer [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadFramebuffer(int width, int height); + public static extern uint rlLoadFramebuffer(int width, int height); /// Attach texture/renderbuffer to a framebuffer [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlFramebufferAttach( + public static extern void rlFramebufferAttach( uint fboId, uint texId, FramebufferAttachType attachType, @@ -649,93 +649,93 @@ namespace Raylib_cs /// Verify framebuffer is complete [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern CBool RlFramebufferComplete(uint id); + public static extern CBool rlFramebufferComplete(uint id); /// Delete framebuffer from GPU [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUnloadFramebuffer(uint id); + public static extern void rlUnloadFramebuffer(uint id); // Shaders management /// Load shader from code strings [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadShaderCode(sbyte* vsCode, sbyte* fsCode); + public static extern uint rlLoadShaderCode(sbyte* vsCode, sbyte* fsCode); /// Compile custom shader and return shader id
/// (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
[DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlCompileShader(sbyte* shaderCode, int type); + public static extern uint rlCompileShader(sbyte* shaderCode, int type); /// Load custom shader program [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadShaderProgram(uint vShaderId, uint fShaderId); + public static extern uint rlLoadShaderProgram(uint vShaderId, uint fShaderId); /// Unload shader program [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUnloadShaderProgram(uint id); + public static extern void rlUnloadShaderProgram(uint id); /// Get shader location uniform [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern int RlGetLocationUniform(uint shaderId, sbyte* uniformName); + public static extern int rlGetLocationUniform(uint shaderId, sbyte* uniformName); /// Get shader location attribute [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern int RlGetLocationAttrib(uint shaderId, sbyte* attribName); + public static extern int rlGetLocationAttrib(uint shaderId, sbyte* attribName); /// Set shader value uniform [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetUniform(int locIndex, void* value, int uniformType, int count); + public static extern void rlSetUniform(int locIndex, void* value, int uniformType, int count); /// Set shader value matrix [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetUniformMatrix(int locIndex, Matrix4x4 mat); + public static extern void rlSetUniformMatrix(int locIndex, Matrix4x4 mat); /// Set shader value sampler [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetUniformSampler(int locIndex, uint textureId); + public static extern void rlSetUniformSampler(int locIndex, uint textureId); /// Set shader currently active (id and locations) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetShader(uint id, int* locs); + public static extern void rlSetShader(uint id, int* locs); // Compute shader management /// Load compute shader program [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadComputeShaderProgram(uint shaderId); + public static extern uint rlLoadComputeShaderProgram(uint shaderId); /// Dispatch compute shader (equivalent to *draw* for graphics pilepine) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlComputeShaderDispatch(uint groupX, uint groupY, uint groupZ); + public static extern void rlComputeShaderDispatch(uint groupX, uint groupY, uint groupZ); // Shader buffer storage object management (ssbo) /// Load shader storage buffer object (SSBO) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlLoadShaderBuffer(uint size, void* data, int usageHint); + public static extern uint rlLoadShaderBuffer(uint size, void* data, int usageHint); /// Unload shader storage buffer object (SSBO) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUnloadShaderBuffer(uint ssboId); + public static extern void rlUnloadShaderBuffer(uint ssboId); /// Update SSBO buffer data [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlUpdateShaderBuffer(uint id, void* data, uint dataSize, uint offset); + public static extern void rlUpdateShaderBuffer(uint id, void* data, uint dataSize, uint offset); /// Bind SSBO buffer data [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlBindShaderBuffer(uint id, uint index); + public static extern void rlBindShaderBuffer(uint id, uint index); /// Read SSBO buffer data (GPU->CPU) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlReadShaderBuffer(uint id, void* dest, uint count, uint offset); + public static extern void rlReadShaderBuffer(uint id, void* dest, uint count, uint offset); /// Copy SSBO data between buffers [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlCopyShaderBuffer( + public static extern void rlCopyShaderBuffer( uint destId, uint srcId, uint destOffset, @@ -745,63 +745,64 @@ namespace Raylib_cs /// Get SSBO buffer size [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern uint RlGetShaderBufferSize(uint id); + public static extern uint rlGetShaderBufferSize(uint id); // Buffer management /// Bind image texture [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlBindImageTexture(uint id, uint index, int format, CBool readOnly); + public static extern void rlBindImageTexture(uint id, uint index, int format, CBool readOnly); // Matrix state management /// Get internal modelview matrix [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern Matrix4x4 RlGetMatrixModelView(); + public static extern Matrix4x4 rlGetMatrixModelview(); /// Get internal projection matrix [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern Matrix4x4 RlGetMatrixProjection(); + public static extern Matrix4x4 rlGetMatrixProjection(); /// Get internal accumulated transform matrix [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern Matrix4x4 RlGetMatrixTransform(); + public static extern Matrix4x4 rlGetMatrixTransform(); /// Get internal projection matrix for stereo render (selected eye) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern Matrix4x4 RlGetMatrixProjectionStereo(int eye); + public static extern Matrix4x4 rlGetMatrixProjectionStereo(int eye); /// Get internal view offset matrix for stereo render (selected eye) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern Matrix4x4 RlGetMatrixViewOffsetStereo(int eye); + public static extern Matrix4x4 rlGetMatrixViewOffsetStereo(int eye); /// Set a custom projection matrix (replaces internal projection matrix) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetMatrixProjection(Matrix4x4 view); + public static extern void rlSetMatrixProjection(Matrix4x4 view); /// Set a custom modelview matrix (replaces internal modelview matrix) [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetMatrixModelView(Matrix4x4 proj); + public static extern void rlSetMatrixModelview(Matrix4x4 proj); /// Set eyes projection matrices for stereo rendering [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetMatrixProjectionStereo(Matrix4x4 left, Matrix4x4 right); + public static extern void rlSetMatrixProjectionStereo(Matrix4x4 left, Matrix4x4 right); /// Set eyes view offsets matrices for stereo rendering [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlSetMatrixViewOffsetStereo(Matrix4x4 left, Matrix4x4 right); + public static extern void rlSetMatrixViewOffsetStereo(Matrix4x4 left, Matrix4x4 right); // Quick and dirty cube/quad buffers load->draw->unload /// Load and draw a cube [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlLoadDrawCube(); + public static extern void rlLoadDrawCube(); /// Load and draw a quad [DllImport(NativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void RlLoadDrawQuad(); + public static extern void rlLoadDrawQuad(); } } +