This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using System.Runtime.InteropServices; | |
using System.Windows.Forms; | |
using Raylib_cs; | |
using Color = Raylib_cs.Color; | |
namespace Rayforms | |
{ | |
public class RayForm : Form |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INCLUDES="-I../../dependencies/cgltf -I../../dependencies/dr_libs -I../../dependencies/jar -I../../dependencies/miniaudio -I../../dependencies/par -I../../dependencies/stb -I../../dependencies/tinyobjloader-c -I../../examples/dependencies/ -I../../examples/dependencies/sokol -I../../rayfork" | |
if [ "$(uname)" = "Darwin" ] | |
then | |
FLAGS="-g -D_DEFAULT_SOURCE -ObjC -fobjc-arc" | |
LIBRARIES="-framework Cocoa" | |
else | |
FLAGS="-g -D_DEFAULT_SOURCE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Numerics; | |
using Raylib_cs; | |
namespace Testing | |
{ | |
public class CubeTexture1 | |
{ | |
// Draw cube with multiple textures for different faces | |
// NOTE: Cube position is the center position | |
static void DrawCubeCustom(Texture2D texture1, Texture2D texture2, Vector3 position, float width, float height, float length, Color color) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Updated with bug fixes etc | |
// Draw a part of a texture (defined by a rectangle) with 'pro' parameters | |
// NOTE: origin is relative to destination rectangle size | |
void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint) | |
{ | |
// Check if texture is valid | |
if (texture.id > 0) | |
{ | |
float width = (float)texture.width; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Built in tools for learning and testing | |
static void UpdateTools() | |
{ | |
#if defined(SUPPORT_SCREEN_CAPTURE) | |
// Check screen capture key (raylib key: KEY_F12) | |
if (IsKeyPressed(KEY_F12)) | |
{ | |
#if defined(SUPPORT_GIF_RECORDING) && defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB) || defined(PLATFORM_UWP) | |
if (IsKeyDown(KEY_LEFT_CONTROL) || IsKeyDown(KEY_RIGHT_CONTROL)) |