Merge branch 'master' into android
This commit is contained in:
commit
03bf98a929
3 changed files with 53 additions and 5 deletions
12
.github/ISSUE_TEMPLATE/new-issue-template.md
vendored
12
.github/ISSUE_TEMPLATE/new-issue-template.md
vendored
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
name: new issue template
|
||||
about: generic template for new issues
|
||||
title: "[module] Short description of the issue/bug/feature"
|
||||
title: "Short description of the issue/bug/feature"
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
|
@ -14,11 +14,14 @@ Before submitting a new issue, please verify and check:
|
|||
|
||||
### Issue description
|
||||
|
||||
*Briefly describe the issue you are experiencing (or the feature you want to see added to Raylib-cs). Tell us what you were trying to do and what happened instead. You can also ask questions on the [raylib discord server](https://discord.gg/raylib).*
|
||||
*Briefly describe the issue you are experiencing (or the feature you want to see added to Raylib-cs). Tell us
|
||||
what you were trying to do and what happened instead. You can also ask questions on the
|
||||
[raylib discord server](https://discord.gg/raylib).*
|
||||
|
||||
### Environment
|
||||
|
||||
*Provide your Platform, Operating System, OpenGL version, GPU, Raylib-cs version, Raylib version (if applicable), and details of where or how you experienced the issue.*
|
||||
*Provide your Platform, Operating System, OpenGL version, GPU, Raylib-cs version, Raylib version (if applicable),
|
||||
and details of where or how you experienced the issue.*
|
||||
|
||||
### Issue screenshot
|
||||
|
||||
|
|
@ -26,4 +29,5 @@ Before submitting a new issue, please verify and check:
|
|||
|
||||
### Code example
|
||||
|
||||
*Provide minimal reproduction code to test the issue. Please, format the code properly and try to keep it as simple as possible, just focusing on the experienced issue.*
|
||||
*Provide minimal reproduction code to test the issue. Please, format the code properly and try to keep it as simple
|
||||
as possible, just focusing on the experienced issue.*
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Raylib-cs targets net5.0 and net6.0.
|
|||
This is the prefered method to get started.
|
||||
|
||||
```
|
||||
dotnet add package Raylib-cs --version 4.5.0.2
|
||||
dotnet add package Raylib-cs
|
||||
```
|
||||
|
||||
[](https://www.nuget.org/packages/Raylib-cs/)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,20 @@ namespace Raylib_cs
|
|||
using var str1 = text.ToUTF8Buffer();
|
||||
SetClipboardText(str1.AsPointer());
|
||||
}
|
||||
|
||||
/// <summary>Open URL with default system browser (if available)</summary>
|
||||
public static void OpenURL(string url)
|
||||
{
|
||||
using var str1 = url.ToUTF8Buffer();
|
||||
OpenURL(str1.AsPointer());
|
||||
}
|
||||
|
||||
/// <summary>Set internal gamepad mappings (SDL_GameControllerDB)</summary>
|
||||
public static int SetGamepadMappings(string mappings)
|
||||
{
|
||||
using var str1 = mappings.ToUTF8Buffer();
|
||||
return SetGamepadMappings(str1.AsPointer());
|
||||
}
|
||||
|
||||
/// <summary>Load shader from files and bind default locations</summary>
|
||||
public static Shader LoadShader(string vsFileName, string fsFileName)
|
||||
|
|
@ -652,6 +666,36 @@ namespace Raylib_cs
|
|||
return LoadTexture(str1.AsPointer());
|
||||
}
|
||||
|
||||
/// <summary>Update GPU texture with new data</summary>
|
||||
public static void UpdateTexture<T>(Texture2D texture, T[] pixels) where T : unmanaged
|
||||
{
|
||||
UpdateTexture(texture, (ReadOnlySpan<T>)pixels);
|
||||
}
|
||||
|
||||
/// <summary>Update GPU texture with new data</summary>
|
||||
public static void UpdateTexture<T>(Texture2D texture, ReadOnlySpan<T> pixels) where T : unmanaged
|
||||
{
|
||||
fixed (void* pixelPtr = pixels)
|
||||
{
|
||||
UpdateTexture(texture, pixelPtr);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Update GPU texture rectangle with new data</summary>
|
||||
public static void UpdateTextureRec<T>(Texture2D texture, Rectangle rec, T[] pixels) where T : unmanaged
|
||||
{
|
||||
UpdateTextureRec(texture, rec, (ReadOnlySpan<T>)pixels);
|
||||
}
|
||||
|
||||
/// <summary>Update GPU texture rectangle with new data</summary>
|
||||
public static void UpdateTextureRec<T>(Texture2D texture, Rectangle rec, ReadOnlySpan<T> pixels) where T : unmanaged
|
||||
{
|
||||
fixed (void* pixelPtr = pixels)
|
||||
{
|
||||
UpdateTextureRec(texture, rec, pixelPtr);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Generate GPU mipmaps for a texture</summary>
|
||||
public static void GenTextureMipmaps(ref Texture2D texture)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue