From: Brendan Hansen Date: Wed, 29 Dec 2021 19:03:07 +0000 (-0600) Subject: random additions X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=29fb49aee380171412b94b027c71fca006cc392e;p=onyx.git random additions --- diff --git a/core/alloc.onyx b/core/alloc.onyx index 67e63d23..5c8729f1 100644 --- a/core/alloc.onyx +++ b/core/alloc.onyx @@ -11,6 +11,12 @@ as_allocator :: #match { macro (a: Allocator) => a } +// This is similar to alloca in C. +from_stack :: macro (size: u32) -> rawptr { + defer __stack_top = ~~(cast(^u8) __stack_top + size); + return __stack_top; +} + TEMPORARY_ALLOCATOR_SIZE :: 1 << 12; // 4Kb // The global heap allocator, set up upon program intialization. diff --git a/modules/opengles/onyx_opengles.c b/modules/opengles/onyx_opengles.c index 175b19ca..ba757fcc 100644 --- a/modules/opengles/onyx_opengles.c +++ b/modules/opengles/onyx_opengles.c @@ -307,7 +307,6 @@ ONYX_GL_INT_1(glDisableVertexAttribArray) ONYX_GL_INT_1(glEnableVertexAttribArray) ONYX_GL_INT_1(glFrontFace) ONYX_GL_INT_1(glGenerateMipmap) -ONYX_GL_INT_1(glLineWidth) ONYX_GL_INT_1(glLinkProgram) ONYX_GL_INT_1(glStencilMask) ONYX_GL_INT_1(glUseProgram) @@ -347,6 +346,7 @@ ONYX_GL_INT_1_RET_INT(glIsVertexArray) ONYX_GL_INT_1_RET_INT(glIsTransformFeedback) ONYX_GL_INT_1_RET_INT(glIsSampler) // ONYX_GL_INT_2_RET_INT(glFenceSync) +ONYX_GL_FLOAT_1(glLineWidth) ONYX_GL_FLOAT_1(glClearDepthf) ONYX_GL_FLOAT_2(glDepthRangef) ONYX_GL_FLOAT_2(glPolygonOffset) diff --git a/modules/opengles/onyx_opengles.so b/modules/opengles/onyx_opengles.so index 393e39ff..cc89c8ce 100755 Binary files a/modules/opengles/onyx_opengles.so and b/modules/opengles/onyx_opengles.so differ