mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-18 20:40:28 +00:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
30
.github/workflows/nightly.yml
vendored
30
.github/workflows/nightly.yml
vendored
@@ -63,11 +63,13 @@ jobs:
|
||||
cp -r core dist
|
||||
cp -r vendor dist
|
||||
cp -r examples dist
|
||||
# Zipping so executable permissions are retained, see https://github.com/actions/upload-artifact/issues/38
|
||||
zip -r dist.zip dist
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: ubuntu_artifacts
|
||||
path: dist
|
||||
path: dist.zip
|
||||
build_macos:
|
||||
name: MacOS Build
|
||||
if: github.repository == 'odin-lang/Odin'
|
||||
@@ -76,15 +78,13 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Download LLVM and setup PATH
|
||||
run: |
|
||||
brew install llvm@13
|
||||
brew install llvm@13 dylibbundler
|
||||
echo "/usr/local/opt/llvm@13/bin" >> $GITHUB_PATH
|
||||
TMP_PATH=$(xcrun --show-sdk-path)/user/include
|
||||
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
|
||||
- name: build odin
|
||||
run: make nightly
|
||||
- name: Odin run
|
||||
run: ./odin run examples/demo
|
||||
- name: Copy artifacts
|
||||
- name: Bundle
|
||||
run: |
|
||||
mkdir dist
|
||||
cp odin dist
|
||||
@@ -94,11 +94,16 @@ jobs:
|
||||
cp -r core dist
|
||||
cp -r vendor dist
|
||||
cp -r examples dist
|
||||
dylibbundler -b -x dist/odin -d dist/libs -od -p @executable_path/libs
|
||||
# Zipping so executable permissions are retained, see https://github.com/actions/upload-artifact/issues/38
|
||||
zip -r dist.zip dist
|
||||
- name: Odin run
|
||||
run: ./dist/odin run examples/demo
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: macos_artifacts
|
||||
path: dist
|
||||
path: dist.zip
|
||||
build_macos_arm:
|
||||
name: MacOS ARM Build
|
||||
if: github.repository == 'odin-lang/Odin'
|
||||
@@ -107,15 +112,13 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Download LLVM and setup PATH
|
||||
run: |
|
||||
brew install llvm@13
|
||||
brew install llvm@13 dylibbundler
|
||||
echo "/opt/homebrew/opt/llvm@13/bin" >> $GITHUB_PATH
|
||||
TMP_PATH=$(xcrun --show-sdk-path)/user/include
|
||||
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
|
||||
- name: build odin
|
||||
run: make nightly
|
||||
- name: Odin run
|
||||
run: ./odin run examples/demo
|
||||
- name: Copy artifacts
|
||||
- name: Bundle
|
||||
run: |
|
||||
mkdir dist
|
||||
cp odin dist
|
||||
@@ -125,11 +128,16 @@ jobs:
|
||||
cp -r core dist
|
||||
cp -r vendor dist
|
||||
cp -r examples dist
|
||||
dylibbundler -b -x dist/odin -d dist/libs -od -p @executable_path/libs
|
||||
# Zipping so executable permissions are retained, see https://github.com/actions/upload-artifact/issues/38
|
||||
zip -r dist.zip dist
|
||||
- name: Odin run
|
||||
run: ./dist/odin run examples/demo
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: macos_arm_artifacts
|
||||
path: dist
|
||||
path: dist.zip
|
||||
upload_b2:
|
||||
runs-on: [ubuntu-latest]
|
||||
needs: [build_windows, build_macos, build_macos_arm, build_ubuntu]
|
||||
|
||||
61
vendor/egl/egl.odin
vendored
Normal file
61
vendor/egl/egl.odin
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
//+build linux
|
||||
package egl
|
||||
|
||||
NativeDisplayType :: rawptr
|
||||
NativeWindowType :: rawptr
|
||||
Display :: rawptr
|
||||
Surface :: rawptr
|
||||
Config :: rawptr
|
||||
Context :: rawptr
|
||||
|
||||
NO_DISPLAY :: Display(uintptr(0))
|
||||
NO_CONTEXT :: Context(uintptr(0))
|
||||
NO_SURFACE :: Surface(uintptr(0))
|
||||
|
||||
CONTEXT_OPENGL_CORE_PROFILE_BIT :: 0x00000001
|
||||
WINDOW_BIT :: 0x0004
|
||||
OPENGL_BIT :: 0x0008
|
||||
|
||||
BLUE_SIZE :: 0x3022
|
||||
GREEN_SIZE :: 0x3023
|
||||
RED_SIZE :: 0x3024
|
||||
DEPTH_SIZE :: 0x3025
|
||||
STENCIL_SIZE :: 0x3026
|
||||
|
||||
SURFACE_TYPE :: 0x3033
|
||||
NONE :: 0x3038
|
||||
COLOR_BUFFER_TYPE :: 0x303F
|
||||
RENDERABLE_TYPE :: 0x3040
|
||||
CONFORMANT :: 0x3042
|
||||
|
||||
BACK_BUFFER :: 0x3084
|
||||
RENDER_BUFFER :: 0x3086
|
||||
GL_COLORSPACE_SRGB :: 0x3089
|
||||
GL_COLORSPACE_LINEAR :: 0x308A
|
||||
RGB_BUFFER :: 0x308E
|
||||
GL_COLORSPACE :: 0x309D
|
||||
|
||||
CONTEXT_MAJOR_VERSION :: 0x3098
|
||||
CONTEXT_MINOR_VERSION :: 0x30FB
|
||||
CONTEXT_OPENGL_PROFILE_MASK :: 0x30FD
|
||||
|
||||
OPENGL_API :: 0x30A2
|
||||
|
||||
foreign import egl "system:EGL"
|
||||
@(default_calling_convention="c", link_prefix="egl")
|
||||
foreign egl {
|
||||
GetDisplay :: proc(display: NativeDisplayType) -> Display ---
|
||||
Initialize :: proc(display: Display, major: ^i32, minor: ^i32) -> i32 ---
|
||||
BindAPI :: proc(api: u32) -> i32 ---
|
||||
ChooseConfig :: proc(display: Display, attrib_list: ^i32, configs: ^Context, config_size: i32, num_config: ^i32) -> i32 ---
|
||||
CreateWindowSurface :: proc(display: Display, config: Config, native_window: NativeWindowType, attrib_list: ^i32) -> Surface ---
|
||||
CreateContext :: proc(display: Display, config: Config, share_context: Context, attrib_list: ^i32) -> Context ---
|
||||
MakeCurrent :: proc(display: Display, draw: Surface, read: Surface, ctx: Context) -> i32 ---
|
||||
SwapInterval :: proc(display: Display, interval: i32) -> i32 ---
|
||||
SwapBuffers :: proc(display: Display, surface: Surface) -> i32 ---
|
||||
GetProcAddress :: proc(name: cstring) -> rawptr ---
|
||||
}
|
||||
|
||||
gl_set_proc_address :: proc(p: rawptr, name: cstring) {
|
||||
(^rawptr)(p)^ = GetProcAddress(name)
|
||||
}
|
||||
Reference in New Issue
Block a user