parin.backend.rl
alias BasicContainer FontsData GenData RlBlend RlFilter RlKey RlWrap SoundsData SparseContainer TexturesData ViewportsData
fn activateSound beginBlend beginCamera beginClip beginDrawing beginDroppedPaths beginViewport clearBackground closeWindow deactivateSound deltaMouse deltaTime deltaWheel dequeuePressedKey dequeuePressedRune drawCirc drawLine drawRect drawRune drawSurface drawTexture drawViewport droppedPaths elapsedTicks elapsedTime endBlend endCamera endClip endDrawing endDroppedPaths endViewport fontCount fontFilter fontFree fontGlyphInfo fontIsValid fontLineSpacing fontRuneSpacing fontSetFilter fontSetLineSpacing fontSetRuneSpacing fontSetWrap fontSize fontWrap fps fpsMax freeAllFonts freeAllSounds freeAllTextures freeAllViewports isBackendNull isCursorVisible isDown isFullscreen isPressed isReleased isWindowCloseButtonPressed isWindowResized loadFont loadSound loadSurface loadTexture loadViewport masterVolume matrixRotate matrixScale matrixTranslate mouse openUrl openWindow pauseSound playSound popMatrix pumpEvents pushMatrix randf randi randomize resourceIsNull resumeSound screenHeight screenWidth setFpsMax setIsCursorVisible setIsFullscreen setMasterVolume setRandomSeed setVsync setWindowIconFromFiles setWindowMaxSize setWindowMinSize setWindowTitle soundCanRepeat soundCount soundDuration soundFree soundIsActive soundIsPaused soundIsValid soundPan soundPitch soundPitchVariance soundPitchVarianceBase soundProgress soundSetCanRepeat soundSetPan soundSetPitch soundSetPitchVariance soundSetPitchVarianceBase soundSetVolume soundTime soundVolume startSound stopSound takeScreenshot takeScreenshotAndUseAsTexture textureCount textureFilter textureFree textureHeight textureIsValid textureSetFilter textureSetWrap textureSize textureWidth textureWrap toCanvasPoint toPr toRl toRlKey toScenePoint updateIsFullscreen updateSound updateSoundPitchVariance updateVsync updateWindow viewportBlend viewportColor viewportCount viewportFilter viewportFree viewportHeight viewportIsAttached viewportIsFirstUse viewportIsValid viewportResize viewportSetBlend viewportSetColor viewportSetFilter viewportSetWrap viewportSize viewportWidth viewportWrap vsync windowHeight windowWidth
Types 16
aliasBasicContainer(T) = FixedList!(T, defaultBackendResourcesCapacity)
aliasSparseContainer(T) = FixedList!(SparseListItem!T, defaultBackendResourcesCapacity)
aliasGenData = BasicContainer!(Gen)
aliasTexturesData = SparseList!(RlTexture, SparseContainer!(RlTexture))
aliasFontsData = SparseList!(RlFont, SparseContainer!(RlFont))
aliasSoundsData = SparseList!(RlSound, SparseContainer!(RlSound))
aliasViewportsData = SparseList!(RlViewport, SparseContainer!(RlViewport))
aliasRlFilter = int
Raylib texture filter modes.
aliasRlWrap = int
Raylib texture wrapping modes.
aliasRlBlend = int
Raylib texture blending modes.
aliasRlKey = int
Raylib input key.
structRlTexture
A raylib texture.
structRlSound
structRlViewport
A raylib viewport.
Fields
rl.RenderTexture2D dataRgba colorbool isAttachedFilter filterWrap wrapBlend blendbool isFirstUsestructBackendState
Fields
GenList!(TexturesData.Item.Item, TexturesData, GenData) texturesGenList!(SoundsData.Item.Item, SoundsData, GenData) soundsGenList!(ViewportsData.Item.Item, ViewportsData, GenData) viewportsBasicContainer!IStr droppedPathsRlTexture[defaultBackendMaxSurfaceCount] surfaceTextureBuffersIVec2 surfaceCursorint surfaceRowHeightint surfaceCurrentSlotuint elapsedTicksint fpsMaxVec2 mouseBufferbool isCursorVisiblebool windowIsChangingfloat windowChangeTimeint windowPreviousWindowWidthint windowPreviousWindowHeightbool vsyncIsChangingbool vsyncFunctions 175
fn
void updateWindow(alias loop)()Updates the window every frame with the given function. Returns when the given function returns true.fn
void openWindow(int width, int height, IStr title, bool vsync, int fpsMax, int windowMinWidth, int windowMinHeight)fn
void closeWindow()fn
Maybe!Surface loadSurface(const(ubyte)[] memory, IStr ext = ".png", IStr file = __FILE__, Sz line = __LINE__)fn
Maybe!ResourceId loadTexture(IStr path)fn
Maybe!ResourceId loadTexture(const(ubyte)[] memory, IStr ext = ".png")fn
Maybe!ResourceId loadFont(IStr path, int size, int runeSpacing, int lineSpacing, IStr32 runes)fn
Maybe!ResourceId loadFont(const(ubyte)[] memory, int size, int runeSpacing, int lineSpacing, IStr32 runes, IStr ext = ".ttf")fn
Maybe!ResourceId loadFont(ResourceId texture, int tileWidth, int tileHeight)fn
Maybe!ResourceId loadViewport(int width, int height, Rgba color, Blend blend)fn
Maybe!ResourceId loadSound(IStr path, float volume, float pitch, bool canRepeat, float pitchVariance = 1.0f)fn
bool isBackendNull()fn
void freeAllTextures(bool canSkipFirst)fn
void freeAllFonts(bool canSkipFirst, bool canSkipSecond /* LOL */)fn
void freeAllSounds(bool canSkipFirst)fn
void freeAllViewports(bool canSkipFirst)fn
Sz textureCount()fn
Sz soundCount()fn
Sz viewportCount()fn
bool resourceIsNull(ResourceId id)fn
bool textureIsValid(ResourceId id)fn
Filter textureFilter(ResourceId id)fn
void textureSetFilter(ResourceId id, Filter value)fn
Wrap textureWrap(ResourceId id)fn
void textureSetWrap(ResourceId id, Wrap value)fn
int textureWidth(ResourceId id)fn
int textureHeight(ResourceId id)fn
Vec2 textureSize(ResourceId id)fn
void textureFree(ResourceId id)fn
bool fontIsValid(ResourceId id)fn
Filter fontFilter(ResourceId id)fn
void fontSetFilter(ResourceId id, Filter value)fn
Wrap fontWrap(ResourceId id)fn
void fontSetWrap(ResourceId id, Wrap value)fn
int fontSize(ResourceId id)fn
int fontRuneSpacing(ResourceId id)fn
void fontSetRuneSpacing(ResourceId id, int value)fn
int fontLineSpacing(ResourceId id)fn
void fontSetLineSpacing(ResourceId id, int value)fn
GlyphInfo fontGlyphInfo(ResourceId id, int rune)fn
void fontFree(ResourceId id)fn
bool soundIsValid(ResourceId id)fn
float soundVolume(ResourceId id)fn
void soundSetVolume(ResourceId id, float value)fn
float soundPan(ResourceId id)fn
void soundSetPan(ResourceId id, float value)fn
float soundPitch(ResourceId id)fn
void soundSetPitch(ResourceId id, float value, bool canUpdatePitchVarianceBase)fn
float soundPitchVariance(ResourceId id)fn
void soundSetPitchVariance(ResourceId id, float value)fn
float soundPitchVarianceBase(ResourceId id)fn
void soundSetPitchVarianceBase(ResourceId id, float value)fn
bool soundCanRepeat(ResourceId id)fn
void soundSetCanRepeat(ResourceId id, bool value)fn
bool soundIsActive(ResourceId id)fn
bool soundIsPaused(ResourceId id)fn
float soundTime(ResourceId id)fn
float soundDuration(ResourceId id)fn
float soundProgress(ResourceId id)fn
void soundFree(ResourceId id)fn
bool viewportIsValid(ResourceId id)fn
Filter viewportFilter(ResourceId id)fn
void viewportSetFilter(ResourceId id, Filter value)fn
Wrap viewportWrap(ResourceId id)fn
void viewportSetWrap(ResourceId id, Wrap value)fn
Blend viewportBlend(ResourceId id)fn
void viewportSetBlend(ResourceId id, Blend value)fn
Rgba viewportColor(ResourceId id)fn
void viewportSetColor(ResourceId id, Rgba value)fn
int viewportWidth(ResourceId id)fn
int viewportHeight(ResourceId id)fn
Vec2 viewportSize(ResourceId id)fn
bool viewportIsFirstUse(ResourceId id)fn
bool viewportIsAttached(ResourceId id)fn
void viewportResize(ResourceId id, int newWidth, int newHeight)fn
void viewportFree(ResourceId id)fn
void beginDroppedPaths()fn
void endDroppedPaths()fn
IStr[] droppedPaths()fn
int screenWidth()fn
int screenHeight()fn
int windowWidth()fn
int windowHeight()fn
bool isFullscreen()fn
void setIsFullscreen(bool value)fn
void updateIsFullscreen()fn
bool isWindowCloseButtonPressed()fn
bool isWindowResized()fn
void setWindowMinSize(int width, int height)fn
void setWindowMaxSize(int width, int height)fn
void setWindowTitle(IStr value)fn
Fault setWindowIconFromFiles(IStr path)fn
Fault takeScreenshot(IStr path, ResourceId canvasViewportId, bool hasAlpha)fn
Maybe!ResourceId takeScreenshotAndUseAsTexture(ResourceId canvasViewportId, bool hasAlpha)fn
int fps()fn
int fpsMax()fn
void setFpsMax(int value)fn
double elapsedTime()fn
float deltaTime()fn
void setRandomSeed(int value)fn
void randomize()fn
int randi()fn
float randf()fn
Vec2 toCanvasPoint(Vec2 point, Camera camera, Vec2 canvasSize)fn
Vec2 toScenePoint(Vec2 point, Camera camera, Vec2 canvasSize)fn
ulong elapsedTicks()fn
bool vsync()fn
void setVsync(bool value)fn
void updateVsync()fn
bool isCursorVisible()fn
void setIsCursorVisible(bool value)fn
void pumpEvents()fn
bool isDown(char key)fn
bool isPressed(char key)fn
bool isReleased(char key)fn
bool isReleased(Keyboard key)fn
bool isReleased(Mouse key)fn
bool isReleased(Gamepad key, int id = 0)fn
Vec2 deltaMouse()fn
float deltaWheel()fn
dchar dequeuePressedRune()fn
float masterVolume()fn
void setMasterVolume(float value)fn
void updateSoundPitchVariance(ResourceId id)fn
void activateSound(ResourceId id)fn
void deactivateSound(ResourceId id)fn
void playSound(ResourceId id)fn
void stopSound(ResourceId id)fn
void startSound(ResourceId id)fn
void pauseSound(ResourceId id)fn
void resumeSound(ResourceId id)fn
void updateSound(ResourceId id)fn
void beginDrawing()fn
void endDrawing()fn
void beginCamera(ref Camera camera, Vec2 canvasSize, Rounding type)fn
void beginViewport(ResourceId id)fn
void endViewport(ResourceId id)fn
void beginBlend(Blend blend)fn
void endBlend()fn
void endClip()fn
void clearBackground(Rgba color)fn
void pushMatrix()fn
void matrixTranslate(float x, float y, float z)fn
void matrixRotate(float angle, float x, float y, float z)fn
void matrixScale(float x, float y, float z)fn
void popMatrix()fn
void drawSurface(ref Surface surface, Rect area, Rect target, Vec2 origin, float rotation, Rgba color)fn
void drawTexture(ResourceId id, Rect area, Rect target, Vec2 origin, float rotation, Rgba color)fn
void drawViewport(ResourceId id, Rect area, Rect target, Vec2 origin, float rotation, Rgba color)fn
void drawRune(ResourceId id, int rune, Vec2 position, Rgba color)fn
rl.Camera2D toRl(Camera from, Vec2 canvasSize, Rounding type)Variables 3
var
BackendState * _backendStateenumvar
defaultBackendMaxSurfaceCount = 4enumvar
defaultBackendMaxSurfaceSide = 1024