mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Remove := with var and :: with const
This commit is contained in:
+36
-36
@@ -1,18 +1,18 @@
|
||||
#foreign_system_library "opengl32.lib" when ODIN_OS == "windows";
|
||||
#import . "windows.odin";
|
||||
|
||||
CONTEXT_MAJOR_VERSION_ARB :: 0x2091;
|
||||
CONTEXT_MINOR_VERSION_ARB :: 0x2092;
|
||||
CONTEXT_FLAGS_ARB :: 0x2094;
|
||||
CONTEXT_PROFILE_MASK_ARB :: 0x9126;
|
||||
CONTEXT_FORWARD_COMPATIBLE_BIT_ARB :: 0x0002;
|
||||
CONTEXT_CORE_PROFILE_BIT_ARB :: 0x00000001;
|
||||
CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB :: 0x00000002;
|
||||
const CONTEXT_MAJOR_VERSION_ARB = 0x2091;
|
||||
const CONTEXT_MINOR_VERSION_ARB = 0x2092;
|
||||
const CONTEXT_FLAGS_ARB = 0x2094;
|
||||
const CONTEXT_PROFILE_MASK_ARB = 0x9126;
|
||||
const CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002;
|
||||
const CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001;
|
||||
const CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002;
|
||||
|
||||
Hglrc :: Handle;
|
||||
ColorRef :: u32;
|
||||
const Hglrc = Handle;
|
||||
const ColorRef = u32;
|
||||
|
||||
LayerPlaneDescriptor :: struct {
|
||||
const LayerPlaneDescriptor = struct {
|
||||
size: u16,
|
||||
version: u16,
|
||||
flags: u32,
|
||||
@@ -39,11 +39,11 @@ LayerPlaneDescriptor :: struct {
|
||||
transparent: ColorRef,
|
||||
}
|
||||
|
||||
PointFloat :: struct {
|
||||
const PointFloat = struct {
|
||||
x, y: f32,
|
||||
}
|
||||
|
||||
Glyph_MetricsFloat :: struct {
|
||||
const Glyph_MetricsFloat = struct {
|
||||
black_box_x: f32,
|
||||
black_box_y: f32,
|
||||
glyph_origin: PointFloat,
|
||||
@@ -51,32 +51,32 @@ Glyph_MetricsFloat :: struct {
|
||||
cell_inc_y: f32,
|
||||
}
|
||||
|
||||
CreateContextAttribsARBType :: #type proc(hdc: Hdc, h_share_context: rawptr, attribList: ^i32) -> Hglrc;
|
||||
ChoosePixelFormatARBType :: #type proc(hdc: Hdc, attrib_i_list: ^i32, attrib_f_list: ^f32, max_formats: u32, formats: ^i32, num_formats : ^u32) -> Bool #cc_c;
|
||||
SwapIntervalEXTType :: #type proc(interval: i32) -> bool #cc_c;
|
||||
GetExtensionsStringARBType :: #type proc(Hdc) -> ^u8 #cc_c;
|
||||
const CreateContextAttribsARBType = type proc(hdc: Hdc, h_share_context: rawptr, attribList: ^i32) -> Hglrc;
|
||||
const ChoosePixelFormatARBType = type proc(hdc: Hdc, attrib_i_list: ^i32, attrib_f_list: ^f32, max_formats: u32, formats: ^i32, num_formats : ^u32) -> Bool #cc_c;
|
||||
const SwapIntervalEXTType = type proc(interval: i32) -> bool #cc_c;
|
||||
const GetExtensionsStringARBType = type proc(Hdc) -> ^u8 #cc_c;
|
||||
|
||||
|
||||
create_context_attribs_arb: CreateContextAttribsARBType;
|
||||
choose_pixel_format_arb: ChoosePixelFormatARBType;
|
||||
swap_interval_ext: SwapIntervalEXTType;
|
||||
get_extensions_string_arb: GetExtensionsStringARBType;
|
||||
var create_context_attribs_arb: CreateContextAttribsARBType;
|
||||
var choose_pixel_format_arb: ChoosePixelFormatARBType;
|
||||
var swap_interval_ext: SwapIntervalEXTType;
|
||||
var get_extensions_string_arb: GetExtensionsStringARBType;
|
||||
|
||||
|
||||
|
||||
create_context :: proc(hdc: Hdc) -> Hglrc #foreign opengl32 "wglCreateContext";
|
||||
make_current :: proc(hdc: Hdc, hglrc: Hglrc) -> Bool #foreign opengl32 "wglMakeCurrent";
|
||||
get_proc_address :: proc(c_str: ^u8) -> Proc #foreign opengl32 "wglGetProcAddress";
|
||||
delete_context :: proc(hglrc: Hglrc) -> Bool #foreign opengl32 "wglDeleteContext";
|
||||
copy_context :: proc(src, dst: Hglrc, mask: u32) -> Bool #foreign opengl32 "wglCopyContext";
|
||||
create_layer_context :: proc(hdc: Hdc, layer_plane: i32) -> Hglrc #foreign opengl32 "wglCreateLayerContext";
|
||||
describe_layer_plane :: proc(hdc: Hdc, pixel_format, layer_plane: i32, bytes: u32, pd: ^LayerPlaneDescriptor) -> Bool #foreign opengl32 "wglDescribeLayerPlane";
|
||||
get_current_context :: proc() -> Hglrc #foreign opengl32 "wglGetCurrentContext";
|
||||
get_current_dc :: proc() -> Hdc #foreign opengl32 "wglGetCurrentDC";
|
||||
get_layer_palette_entries :: proc(hdc: Hdc, layer_plane, start, entries: i32, cr: ^ColorRef) -> i32 #foreign opengl32 "wglGetLayerPaletteEntries";
|
||||
realize_layer_palette :: proc(hdc: Hdc, layer_plane: i32, realize: Bool) -> Bool #foreign opengl32 "wglRealizeLayerPalette";
|
||||
set_layer_palette_entries :: proc(hdc: Hdc, layer_plane, start, entries: i32, cr: ^ColorRef) -> i32 #foreign opengl32 "wglSetLayerPaletteEntries";
|
||||
share_lists :: proc(hglrc1, hglrc2: Hglrc) -> Bool #foreign opengl32 "wglShareLists";
|
||||
swap_layer_buffers :: proc(hdc: Hdc, planes: u32) -> Bool #foreign opengl32 "wglSwapLayerBuffers";
|
||||
use_font_bitmaps :: proc(hdc: Hdc, first, count, list_base: u32) -> Bool #foreign opengl32 "wglUseFontBitmaps";
|
||||
use_font_outlines :: proc(hdc: Hdc, first, count, list_base: u32, deviation, extrusion: f32, format: i32, gmf: ^Glyph_MetricsFloat) -> Bool #foreign opengl32 "wglUseFontOutlines";
|
||||
const create_context = proc(hdc: Hdc) -> Hglrc #foreign opengl32 "wglCreateContext";
|
||||
const make_current = proc(hdc: Hdc, hglrc: Hglrc) -> Bool #foreign opengl32 "wglMakeCurrent";
|
||||
const get_proc_address = proc(c_str: ^u8) -> Proc #foreign opengl32 "wglGetProcAddress";
|
||||
const delete_context = proc(hglrc: Hglrc) -> Bool #foreign opengl32 "wglDeleteContext";
|
||||
const copy_context = proc(src, dst: Hglrc, mask: u32) -> Bool #foreign opengl32 "wglCopyContext";
|
||||
const create_layer_context = proc(hdc: Hdc, layer_plane: i32) -> Hglrc #foreign opengl32 "wglCreateLayerContext";
|
||||
const describe_layer_plane = proc(hdc: Hdc, pixel_format, layer_plane: i32, bytes: u32, pd: ^LayerPlaneDescriptor) -> Bool #foreign opengl32 "wglDescribeLayerPlane";
|
||||
const get_current_context = proc() -> Hglrc #foreign opengl32 "wglGetCurrentContext";
|
||||
const get_current_dc = proc() -> Hdc #foreign opengl32 "wglGetCurrentDC";
|
||||
const get_layer_palette_entries = proc(hdc: Hdc, layer_plane, start, entries: i32, cr: ^ColorRef) -> i32 #foreign opengl32 "wglGetLayerPaletteEntries";
|
||||
const realize_layer_palette = proc(hdc: Hdc, layer_plane: i32, realize: Bool) -> Bool #foreign opengl32 "wglRealizeLayerPalette";
|
||||
const set_layer_palette_entries = proc(hdc: Hdc, layer_plane, start, entries: i32, cr: ^ColorRef) -> i32 #foreign opengl32 "wglSetLayerPaletteEntries";
|
||||
const share_lists = proc(hglrc1, hglrc2: Hglrc) -> Bool #foreign opengl32 "wglShareLists";
|
||||
const swap_layer_buffers = proc(hdc: Hdc, planes: u32) -> Bool #foreign opengl32 "wglSwapLayerBuffers";
|
||||
const use_font_bitmaps = proc(hdc: Hdc, first, count, list_base: u32) -> Bool #foreign opengl32 "wglUseFontBitmaps";
|
||||
const use_font_outlines = proc(hdc: Hdc, first, count, list_base: u32, deviation, extrusion: f32, format: i32, gmf: ^Glyph_MetricsFloat) -> Bool #foreign opengl32 "wglUseFontOutlines";
|
||||
|
||||
Reference in New Issue
Block a user