mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Remove case sensitivity for libraries on windows
This commit is contained in:
@@ -10,10 +10,6 @@
|
|||||||
#import "utf8.odin";
|
#import "utf8.odin";
|
||||||
|
|
||||||
main :: proc() {
|
main :: proc() {
|
||||||
fmt.println("GOOGOLPLEX");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
foo :: proc(x: ^i32) -> (int, int) {
|
foo :: proc(x: ^i32) -> (int, int) {
|
||||||
fmt.println("^int");
|
fmt.println("^int");
|
||||||
return 123, cast(int)(x^);
|
return 123, cast(int)(x^);
|
||||||
@@ -56,4 +52,3 @@ main :: proc() {
|
|||||||
f = foo;
|
f = foo;
|
||||||
f();
|
f();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|||||||
+23
-23
@@ -1,32 +1,32 @@
|
|||||||
#foreign_system_library "opengl32.lib" when ODIN_OS == "windows";
|
#foreign_system_library lib "opengl32.lib" when ODIN_OS == "windows";
|
||||||
#import win32 "sys/windows.odin" when ODIN_OS == "windows";
|
#import win32 "sys/windows.odin" when ODIN_OS == "windows";
|
||||||
#include "opengl_constants.odin";
|
#include "opengl_constants.odin";
|
||||||
|
|
||||||
Clear :: proc(mask: u32) #foreign opengl32 "glClear";
|
Clear :: proc(mask: u32) #foreign lib "glClear";
|
||||||
ClearColor :: proc(r, g, b, a: f32) #foreign opengl32 "glClearColor";
|
ClearColor :: proc(r, g, b, a: f32) #foreign lib "glClearColor";
|
||||||
Begin :: proc(mode: i32) #foreign opengl32 "glBegin";
|
Begin :: proc(mode: i32) #foreign lib "glBegin";
|
||||||
End :: proc() #foreign opengl32 "glEnd";
|
End :: proc() #foreign lib "glEnd";
|
||||||
Finish :: proc() #foreign opengl32 "glFinish";
|
Finish :: proc() #foreign lib "glFinish";
|
||||||
BlendFunc :: proc(sfactor, dfactor: i32) #foreign opengl32 "glBlendFunc";
|
BlendFunc :: proc(sfactor, dfactor: i32) #foreign lib "glBlendFunc";
|
||||||
Enable :: proc(cap: i32) #foreign opengl32 "glEnable";
|
Enable :: proc(cap: i32) #foreign lib "glEnable";
|
||||||
Disable :: proc(cap: i32) #foreign opengl32 "glDisable";
|
Disable :: proc(cap: i32) #foreign lib "glDisable";
|
||||||
GenTextures :: proc(count: i32, result: ^u32) #foreign opengl32 "glGenTextures";
|
GenTextures :: proc(count: i32, result: ^u32) #foreign lib "glGenTextures";
|
||||||
DeleteTextures:: proc(count: i32, result: ^u32) #foreign opengl32 "glDeleteTextures";
|
DeleteTextures:: proc(count: i32, result: ^u32) #foreign lib "glDeleteTextures";
|
||||||
TexParameteri :: proc(target, pname, param: i32) #foreign opengl32 "glTexParameteri";
|
TexParameteri :: proc(target, pname, param: i32) #foreign lib "glTexParameteri";
|
||||||
TexParameterf :: proc(target: i32, pname: i32, param: f32) #foreign opengl32 "glTexParameterf";
|
TexParameterf :: proc(target: i32, pname: i32, param: f32) #foreign lib "glTexParameterf";
|
||||||
BindTexture :: proc(target: i32, texture: u32) #foreign opengl32 "glBindTexture";
|
BindTexture :: proc(target: i32, texture: u32) #foreign lib "glBindTexture";
|
||||||
LoadIdentity :: proc() #foreign opengl32 "glLoadIdentity";
|
LoadIdentity :: proc() #foreign lib "glLoadIdentity";
|
||||||
Viewport :: proc(x, y, width, height: i32) #foreign opengl32 "glViewport";
|
Viewport :: proc(x, y, width, height: i32) #foreign lib "glViewport";
|
||||||
Ortho :: proc(left, right, bottom, top, near, far: f64) #foreign opengl32 "glOrtho";
|
Ortho :: proc(left, right, bottom, top, near, far: f64) #foreign lib "glOrtho";
|
||||||
Color3f :: proc(r, g, b: f32) #foreign opengl32 "glColor3f";
|
Color3f :: proc(r, g, b: f32) #foreign lib "glColor3f";
|
||||||
Vertex3f :: proc(x, y, z: f32) #foreign opengl32 "glVertex3f";
|
Vertex3f :: proc(x, y, z: f32) #foreign lib "glVertex3f";
|
||||||
TexImage2D :: proc(target, level, internal_format,
|
TexImage2D :: proc(target, level, internal_format,
|
||||||
width, height, border,
|
width, height, border,
|
||||||
format, _type: i32, pixels: rawptr) #foreign opengl32 "glTexImage2D";
|
format, _type: i32, pixels: rawptr) #foreign lib "glTexImage2D";
|
||||||
|
|
||||||
GetError :: proc() -> i32 #foreign opengl32 "glGetError";
|
GetError :: proc() -> i32 #foreign lib "glGetError";
|
||||||
GetString :: proc(name: i32) -> ^byte #foreign opengl32 "glGetString";
|
GetString :: proc(name: i32) -> ^byte #foreign lib "glGetString";
|
||||||
GetIntegerv :: proc(name: i32, v: ^i32) #foreign opengl32 "glGetIntegerv";
|
GetIntegerv :: proc(name: i32, v: ^i32) #foreign lib "glGetIntegerv";
|
||||||
|
|
||||||
|
|
||||||
string_data :: proc(s: string) -> ^u8 #inline { return ^s[0]; }
|
string_data :: proc(s: string) -> ^u8 #inline { return ^s[0]; }
|
||||||
|
|||||||
@@ -294,7 +294,7 @@ WriteBarrier :: proc() #foreign kernel32;
|
|||||||
ReadBarrier :: proc() #foreign kernel32;
|
ReadBarrier :: proc() #foreign kernel32;
|
||||||
|
|
||||||
|
|
||||||
// GDI
|
|
||||||
BITMAPINFOHEADER :: struct #ordered {
|
BITMAPINFOHEADER :: struct #ordered {
|
||||||
size: u32,
|
size: u32,
|
||||||
width, height: i32,
|
width, height: i32,
|
||||||
@@ -405,10 +405,10 @@ WGL_CONTEXT_PROFILE_MASK_ARB :: 0x9126;
|
|||||||
WGL_CONTEXT_CORE_PROFILE_BIT_ARB :: 0x0001;
|
WGL_CONTEXT_CORE_PROFILE_BIT_ARB :: 0x0001;
|
||||||
WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB :: 0x0002;
|
WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB :: 0x0002;
|
||||||
|
|
||||||
wglCreateContext :: proc(hdc: HDC) -> HGLRC #foreign opengl32;
|
wglCreateContext :: proc(hdc: HDC) -> HGLRC #foreign opengl32;
|
||||||
wglMakeCurrent :: proc(hdc: HDC, hglrc: HGLRC) -> BOOL #foreign opengl32;
|
wglMakeCurrent :: proc(hdc: HDC, hglrc: HGLRC) -> BOOL #foreign opengl32;
|
||||||
wglGetProcAddress :: proc(c_str: ^u8) -> PROC #foreign opengl32;
|
wglGetProcAddress :: proc(c_str: ^u8) -> PROC #foreign opengl32;
|
||||||
wglDeleteContext :: proc(hglrc: HGLRC) -> BOOL #foreign opengl32;
|
wglDeleteContext :: proc(hglrc: HGLRC) -> BOOL #foreign opengl32;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5213,7 +5213,11 @@ void ir_add_foreign_library_path(irModule *m, Entity *e) {
|
|||||||
|
|
||||||
for_array(path_index, m->foreign_library_paths) {
|
for_array(path_index, m->foreign_library_paths) {
|
||||||
String path = m->foreign_library_paths.e[path_index];
|
String path = m->foreign_library_paths.e[path_index];
|
||||||
|
#if defined(GB_SYSTEM_WINDOWS)
|
||||||
|
if (str_eq_ignore_case(path, library_path)) {
|
||||||
|
#else
|
||||||
if (str_eq(path, library_path)) {
|
if (str_eq(path, library_path)) {
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user