From ad036a00751e719adbcbaad8dcbab50dca77e1ec Mon Sep 17 00:00:00 2001 From: atomchild411 <143453386+atomchild411@users.noreply.github.com> Date: Wed, 30 Sep 2026 01:16:13 -0800 Subject: [PATCH 1/2] hostcall: host services for IRIX programs, through a private system call An IRIX program asks IRIS for something the emulated machine does not have by making an ordinary `syscall` with a number IRIX does not use: 3000-3009 (IRIX's highest in 6.5 is 1234). IRIS answers it in `exec_syscall`, before any exception, and the program resumes at the next instruction; the kernel never runs. On a real machine, or an IRIS built without this, an indirect call to one of these numbers fails with EINVAL (measured on real IRIX), which is how a library finds out it is not running here. The trap answers only user-mode `syscall`s outside a delay slot, and only for a number a service is registered for; everything else goes to IRIX untouched. Results come back the IRIX way (v0, v1, a3), plus one outcome of our own, "need page": IRIS sees the TLB, not IRIX's page tables, so a call that needs a page of the program's memory that is not in the TLB, not paged in, or not yet writable answers ENEEDPAGE with the page. The caller touches it, which makes IRIX fault it in as for any access, and calls again; progress is kept across retries, so a buffer larger than the TLB still gets through. Program memory is read and written through DEBUG translation under the current ASID, user addresses only. iris-hostcall/ holds the numbers, the register protocol, the service registry and a self-test service (3009: ping, byte sum, fill), which is registered whenever the feature is built in. Behind `--features hostcall`, off by default. The first service to use it is host OpenGL, in the next commit. Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 11 +- iris-hostcall/Cargo.toml | 9 + iris-hostcall/src/lib.rs | 454 +++++++++++++++++++++++++++++++++++++++ src/machine.rs | 4 + src/mips_exec.rs | 97 +++++++++ src/mips_exec_test.rs | 57 +++++ 6 files changed, 631 insertions(+), 1 deletion(-) create mode 100644 iris-hostcall/Cargo.toml create mode 100644 iris-hostcall/src/lib.rs diff --git a/Cargo.toml b/Cargo.toml index 116ea07..5eee343 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["iris-gui"] +members = ["iris-gui", "iris-hostcall"] [package] name = "iris" @@ -270,6 +270,14 @@ ultra64 = ["dep:shared_memory", "dep:raw_sync"] # it at runtime with `kind = "daynaport"` in an `[scsi.N]` section. daynaport = [] +# Host services for IRIX programs, reached through the private system calls +# 3000-3009 (iris-hostcall/): the trap in `exec_syscall` and the self-test +# service. The trap answers only user-mode `syscall`s outside a delay slot, +# and only for a number a service is registered for; everything else goes to +# IRIX untouched. Off by default -- a guest that never issues one cannot tell +# the difference. +hostcall = ["dep:iris-hostcall"] + [dependencies] clap = { version = "4", features = ["derive"] } log = "0.4" @@ -310,6 +318,7 @@ libchdman-rs = { version = "0.289", features = ["prebuilt"], optional = true } pcap = { version = "2", optional = true } shared_memory = { version = "0.12", optional = true } raw_sync = { version = "0.1", optional = true } +iris-hostcall = { path = "iris-hostcall", optional = true } [target.'cfg(target_os = "macos")'.dependencies] nokhwa = { version = "0.10", features = ["input-avfoundation"], optional = true } diff --git a/iris-hostcall/Cargo.toml b/iris-hostcall/Cargo.toml new file mode 100644 index 0000000..fc3ecfc --- /dev/null +++ b/iris-hostcall/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "iris-hostcall" +version = "0.1.0" +edition = "2021" +description = "Host services for IRIX programs under IRIS, reached through a private system call" +license = "BSD-3-Clause" + +[dependencies] +parking_lot = "0.12" diff --git a/iris-hostcall/src/lib.rs b/iris-hostcall/src/lib.rs new file mode 100644 index 0000000..f155773 --- /dev/null +++ b/iris-hostcall/src/lib.rs @@ -0,0 +1,454 @@ +//! Host services for IRIX programs, reached through a private system call. +//! +//! An IRIX program asks IRIS for something the emulated machine does not have +//! -- host-accelerated OpenGL, for one -- by making an ordinary `syscall` with a +//! number the IRIX kernel does not use. IRIS sees the instruction before it +//! raises the exception, answers the call itself, and resumes the program at the +//! next instruction. The kernel never runs, so nothing in IRIX changes. +//! +//! **Numbers.** IRIX numbers its calls from 1000; the highest in 6.5 is +//! `linkfollow`, 1234. [`FIRST`]..=[`LAST`] (3000-3009) are ours: 3000 is GL, +//! the rest are reserved for later services. On a real Indy, or IRIS built +//! without this, an indirect call to any of them fails with EINVAL -- measured +//! on real IRIX, not assumed -- which is how a library finds out it is not +//! running here and falls back. +//! +//! **Registers**, the IRIX convention plus one outcome of our own: +//! +//! | outcome | `a3` | `v0` | `v1` | +//! |-----------|------|-------------------|------------------------------| +//! | success | 0 | result | second result | +//! | error | 1 | errno | - | +//! | need page | 1 | [`ENEEDPAGE`] | page address, bit 0 = write | +//! +//! Arguments are in `$4`..`$11` whatever the program's ABI (the caller's stub +//! loads them). Callers should use IRIX's **indirect** form -- `v0` = 1000, +//! the host call's number in `$4`, seven arguments in `$5`..`$11` -- because on +//! a real kernel a *direct* unknown number raises SIGSYS as well as failing +//! with EINVAL, while the indirect form only fails. So a library can probe for +//! IRIS without installing a signal handler. Both forms are answered here. +//! +//! **Need page.** IRIS sees physical memory and the TLB; it cannot walk IRIX's +//! page tables. When a call needs a page of the program's memory that has no +//! TLB entry, is not paged in, or is not yet writable (copy-on-write), the call +//! does nothing and answers [`ENEEDPAGE`] with that page. The caller touches it +//! -- reads a byte, or writes a byte back to itself for a write -- which makes +//! IRIX fault it in exactly as for any other access, and makes the call again. +//! +//! A call cannot simply check every page first: an R4400 TLB holds 48 entries, +//! so faulting in the 49th page of a buffer evicts an earlier one, and a call +//! that insists on all of them at once never succeeds. Progress is kept across +//! retries instead ([`InFlight`]): pages already read are held on the host, +//! pages already written are not written again. Services read and write +//! through [`GuestMemory`] and never see a retry except as `?` on a fault. + +use std::collections::HashSet; + +use parking_lot::Mutex; + +/// The first system call number IRIS answers itself. +pub const FIRST: u32 = 3000; +/// The last. +pub const LAST: u32 = 3009; +/// Host-accelerated OpenGL. +pub const GL: u32 = 3000; +/// A self-test service: see [`SelfTest`]. +pub const SELFTEST: u32 = 3009; + +/// IRIX's indirect system call. +pub const SYS_SYSCALL: u32 = 1000; + +/// `v0` when the call needs the caller to touch a page and call again. +/// Outside IRIX's errno range (its highest is below 1200), so a library that +/// does not know about it reports an unknown error rather than a wrong one. +pub const ENEEDPAGE: u64 = 0x3000; + +/// IRIX's page size on the Indy. +pub const PAGE: u64 = 0x1000; + +/// A page the call could not use as it stands. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct Fault { + /// The page's guest virtual address (page-aligned). + pub page: u64, + /// The call needs to write to it. + pub write: bool, +} + +/// What the emulator provides: one page at a time of the calling process's +/// memory, through the TLB as it stands, changing no CPU state. +pub trait PageAccess { + /// The address space the call runs in (the TLB's ASID), so progress kept + /// for one process is never used for another. + fn space(&self) -> u64; + /// Read the whole page at `page` (page-aligned). + fn read_page(&mut self, page: u64, buf: &mut [u8; PAGE as usize]) -> Result<(), Fault>; + /// Store `data` at `addr`, all within one page. The page must be checked + /// writable (dirty in the TLB) before anything is stored. + fn write_in_page(&mut self, addr: u64, data: &[u8]) -> Result<(), Fault>; +} + +/// The calling program's memory, as services see it: its own virtual +/// addresses, any length. A fault means "the caller must touch this page and +/// call again"; progress made so far is kept (see [`InFlight`]). +pub trait GuestMemory { + fn read(&mut self, addr: u64, buf: &mut [u8]) -> Result<(), Fault>; + fn write(&mut self, addr: u64, data: &[u8]) -> Result<(), Fault>; +} + +/// Progress of one call that has answered need-page at least once, kept until +/// the same call (same address space, number and arguments) completes. +/// +/// Reads are served from pages already copied; writes skip pages already +/// written. Between a need-page answer and the retry the caller only touches +/// the page it was given (a write touch stores a byte back to itself), so what +/// is held stays true. +#[derive(Default)] +pub struct InFlight { + key: (u64, u32, [u64; 8]), + pages: std::collections::HashMap>, + written: HashSet, +} + +struct Memory<'a> { + access: &'a mut dyn PageAccess, + progress: &'a mut InFlight, +} + +impl GuestMemory for Memory<'_> { + fn read(&mut self, addr: u64, buf: &mut [u8]) -> Result<(), Fault> { + let mut done = 0usize; + while done < buf.len() { + let at = addr.checked_add(done as u64).ok_or(Fault { page: 0, write: false })?; + let page = at & !(PAGE - 1); + let off = (at - page) as usize; + let n = (PAGE as usize - off).min(buf.len() - done); + if !self.progress.pages.contains_key(&page) { + let mut p = Box::new([0u8; PAGE as usize]); + self.access.read_page(page, &mut p)?; + self.progress.pages.insert(page, p); + } + buf[done..done + n].copy_from_slice(&self.progress.pages[&page][off..off + n]); + done += n; + } + Ok(()) + } + + fn write(&mut self, addr: u64, data: &[u8]) -> Result<(), Fault> { + let mut done = 0usize; + while done < data.len() { + let at = addr.checked_add(done as u64).ok_or(Fault { page: 0, write: true })?; + let page = at & !(PAGE - 1); + let n = (PAGE - (at - page)) as usize; + let n = n.min(data.len() - done); + if self.progress.written.insert(at) { + if let Err(f) = self.access.write_in_page(at, &data[done..done + n]) { + self.progress.written.remove(&at); + return Err(f); + } + } + done += n; + } + Ok(()) + } +} + +/// What a call answers. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Reply { + Ok(u64, u64), + Err(u64), + NeedPage(Fault), +} + +impl From for Reply { + fn from(f: Fault) -> Self { + Reply::NeedPage(f) + } +} + +/// A host service: one system call number's worth of operations. +/// +/// A call may be run again after a need-page answer with the same arguments, +/// and must come to the same result: act on the host only once the guest +/// memory it needs has been read, and make guest writes last. +pub trait Service: Send { + /// `args` are the call's arguments in order, the first being the + /// operation by convention. + fn call(&mut self, mem: &mut dyn GuestMemory, args: &[u64; 8]) -> Reply; +} + +/// Calls in progress at once. More than one because a process can be switched +/// out between a need-page answer and its retry, and another can start its own. +const IN_FLIGHT: usize = 8; + +struct Registry { + services: [Option>; (LAST - FIRST + 1) as usize], + in_flight: Vec, +} + +static REGISTRY: Mutex = Mutex::new(Registry { + services: [None, None, None, None, None, None, None, None, None, None], + in_flight: Vec::new(), +}); + +/// Answer system call `number` with `service` from now on. +pub fn register(number: u32, service: Box) { + assert!((FIRST..=LAST).contains(&number), "host call {number} is outside {FIRST}..={LAST}"); + REGISTRY.lock().services[(number - FIRST) as usize] = Some(service); +} + +/// Resolve the call number and arguments from `v0` and `$4`..`$11`. `None` if +/// this is not a host call. +pub fn decode(v0: u64, regs: &[u64; 8]) -> Option<(u32, [u64; 8])> { + let n = v0 as u32; + if (FIRST..=LAST).contains(&n) { + return Some((n, *regs)); + } + if n == SYS_SYSCALL && (FIRST..=LAST).contains(&(regs[0] as u32)) { + let mut shifted = [0u64; 8]; + shifted[..7].copy_from_slice(®s[1..]); + return Some((regs[0] as u32, shifted)); + } + None +} + +/// Run host call `number`, or `None` if no service answers it -- in which case +/// the system call goes to IRIX as usual. +pub fn dispatch(number: u32, access: &mut dyn PageAccess, args: &[u64; 8]) -> Option { + let mut guard = REGISTRY.lock(); + let reg = &mut *guard; + let svc = reg.services.get_mut(number.checked_sub(FIRST)? as usize)?.as_mut()?; + let key = (access.space(), number, *args); + // This call's progress, or a fresh slot (the oldest goes when all are used). + let idx = match reg.in_flight.iter().position(|f| f.key == key) { + Some(i) => i, + None => { + if reg.in_flight.len() == IN_FLIGHT { + reg.in_flight.remove(0); + } + reg.in_flight.push(InFlight { key, ..Default::default() }); + reg.in_flight.len() - 1 + } + }; + let reply = svc.call(&mut Memory { access, progress: &mut reg.in_flight[idx] }, args); + if !matches!(reply, Reply::NeedPage(_)) { + reg.in_flight.remove(idx); + } + Some(reply) +} + +/// Registers to set for `reply`: `(v0, v1, a3)`. +pub fn registers(reply: Reply) -> (u64, u64, u64) { + match reply { + Reply::Ok(v0, v1) => (v0, v1, 0), + Reply::Err(errno) => (errno, 0, 1), + Reply::NeedPage(f) => (ENEEDPAGE, f.page | f.write as u64, 1), + } +} + +/// The display a GL service presents finished frames into, registered with +/// [`set_display`] by whoever owns the screen -- the emulated IMPACT board, +/// which composites them into its framebuffer. Kept here, in the crate both +/// sides depend on, so neither depends on the other. +pub trait Display: Send + Sync { + /// Copy a finished frame into X window `window`: `bgra` holds `height` + /// rows, top row first, each `stride` bytes, of `width` pixels in B,G,R,A + /// byte order. Pixels beyond the window are clipped. An unmapped window + /// still takes the frame, as its contents for when it is mapped. Returns + /// false if `window` is not a window this display can draw into (unknown, + /// or input-only), so the caller can hand the pixels back to the program + /// instead. + fn present(&self, window: u32, bgra: &[u8], stride: usize, width: usize, height: usize) -> bool; + + /// The same, for a program that also said where its window is on the + /// screen: `x`, `y` are the window's top-left in root coordinates. A + /// display that composites frames straight into an emulated framebuffer + /// (it cannot know the guest X server's window ids) needs this; one that + /// knows the windows can ignore it, which is what the default does. + fn present_at(&self, window: u32, x: i32, y: i32, bgra: &[u8], stride: usize, width: usize, height: usize) -> bool { + let _ = (x, y); + self.present(window, bgra, stride, width, height) + } +} + +static DISPLAY: parking_lot::RwLock>> = parking_lot::RwLock::new(None); + +/// Make `display` the one GL frames go to. +pub fn set_display(display: std::sync::Arc) { + *DISPLAY.write() = Some(display); +} + +/// The registered display, if any. +pub fn display() -> Option> { + DISPLAY.read().clone() +} + +/// Operations of the [`SELFTEST`] service, used by the IRIX-side test program +/// (iris-guest-tools' hostcall/hostcall_test.c) to prove the path end to end: the trap, the +/// registers, and need-page retries on reads and writes. +pub struct SelfTest; + +impl SelfTest { + /// `(PING, ...)` -> 0x1215, and v1 = how many arguments before the first 0. + pub const PING: u64 = 0; + /// `(SUM, addr, len)` -> the byte sum of `len` bytes at `addr`. + pub const SUM: u64 = 1; + /// `(FILL, addr, len, byte)` -> `len`, after storing `byte` at each. + pub const FILL: u64 = 2; +} + +impl Service for SelfTest { + fn call(&mut self, mem: &mut dyn GuestMemory, args: &[u64; 8]) -> Reply { + // Anything larger is a caller's bug, not a test. + const MAX: u64 = 64 << 20; + match args[0] { + Self::PING => Reply::Ok(0x1215, args.iter().skip(1).take_while(|&&a| a != 0).count() as u64), + Self::SUM => { + let (addr, len) = (args[1], args[2]); + if len > MAX { + return Reply::Err(22); + } + let mut buf = vec![0u8; len as usize]; + match mem.read(addr, &mut buf) { + Ok(()) => Reply::Ok(buf.iter().map(|&b| b as u64).sum(), 0), + Err(f) => f.into(), + } + } + Self::FILL => { + let (addr, len, byte) = (args[1], args[2], args[3] as u8); + if len > MAX { + return Reply::Err(22); + } + match mem.write(addr, &vec![byte; len as usize]) { + Ok(()) => Reply::Ok(len, 0), + Err(f) => f.into(), + } + } + _ => Reply::Err(22), + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + use std::collections::VecDeque; + + /// A process's memory behind a 48-entry TLB that evicts the oldest entry, + /// with some pages not yet present and some copy-on-write. + struct Tlb { + base: u64, + bytes: Vec, + entries: VecDeque, + absent: HashSet, + cow: HashSet, + } + + impl Tlb { + fn new(base: u64, len: usize) -> Self { + Tlb { base, bytes: vec![0; len], entries: VecDeque::new(), absent: HashSet::new(), cow: HashSet::new() } + } + /// What the caller's touch does: IRIX faults the page in (breaking + /// copy-on-write for a write) and the refill handler adds an entry. + fn touch(&mut self, f: Fault) { + self.absent.remove(&f.page); + if f.write { + self.cow.remove(&f.page); + } + if !self.entries.contains(&f.page) { + if self.entries.len() == 48 { + self.entries.pop_front(); + } + self.entries.push_back(f.page); + } + } + fn usable(&self, page: u64, write: bool) -> bool { + self.entries.contains(&page) && !self.absent.contains(&page) && !(write && self.cow.contains(&page)) + } + } + + impl PageAccess for Tlb { + fn space(&self) -> u64 { + 7 + } + fn read_page(&mut self, page: u64, buf: &mut [u8; PAGE as usize]) -> Result<(), Fault> { + if !self.usable(page, false) { + return Err(Fault { page, write: false }); + } + let o = (page - self.base) as usize; + buf.copy_from_slice(&self.bytes[o..o + PAGE as usize]); + Ok(()) + } + fn write_in_page(&mut self, addr: u64, data: &[u8]) -> Result<(), Fault> { + let page = addr & !(PAGE - 1); + if !self.usable(page, true) { + return Err(Fault { page, write: true }); + } + let o = (addr - self.base) as usize; + self.bytes[o..o + data.len()].copy_from_slice(data); + Ok(()) + } + } + + /// The caller's side: call, touch what is asked for, call again. + fn call_with_retries(number: u32, tlb: &mut Tlb, args: &[u64; 8]) -> (Reply, usize) { + let mut retries = 0; + loop { + match dispatch(number, tlb, args).expect("registered") { + Reply::NeedPage(f) => { + tlb.touch(f); + retries += 1; + assert!(retries < 100_000, "no progress"); + } + r => return (r, retries), + } + } + } + + #[test] + fn decode_direct_and_indirect() { + let regs = [1, 2, 3, 4, 5, 6, 7, 8]; + assert_eq!(decode(3000, ®s), Some((3000, regs))); + assert_eq!(decode(1000, &[3009, 2, 3, 4, 5, 6, 7, 8]), Some((3009, [2, 3, 4, 5, 6, 7, 8, 0]))); + assert_eq!(decode(1000, &[1004, 2, 3, 4, 5, 6, 7, 8]), None); + assert_eq!(decode(1234, ®s), None); + assert_eq!(decode(3010, ®s), None); + } + + #[test] + fn need_page_registers() { + let r = registers(Reply::NeedPage(Fault { page: 0x1000_2000, write: true })); + assert_eq!(r, (ENEEDPAGE, 0x1000_2001, 1)); + assert_eq!(registers(Reply::Ok(7, 8)), (7, 8, 0)); + assert_eq!(registers(Reply::Err(22)), (22, 0, 1)); + } + + /// Many more pages than the TLB holds: this is the case that livelocked + /// when a call insisted on every page at once. + #[test] + fn a_buffer_far_larger_than_the_tlb_is_read_and_written() { + register(SELFTEST, Box::new(SelfTest)); + let base = 0x1000_0000u64; + let len = 16usize << 20; + let mut tlb = Tlb::new(base, len); + for (i, b) in tlb.bytes.iter_mut().enumerate() { + *b = (i * 7 + 3) as u8; + } + let want: u64 = tlb.bytes[0x800..0x800 + (len - 0x1000)].iter().map(|&b| b as u64).sum(); + let (r, retries) = call_with_retries(SELFTEST, &mut tlb, &[SelfTest::SUM, base + 0x800, (len - 0x1000) as u64, 0, 0, 0, 0, 0]); + assert_eq!(r, Reply::Ok(want, 0)); + assert!(retries >= 4000, "every page needed faulting in once ({retries})"); + assert!(retries < 4200, "and only about once ({retries})"); + + // Copy-on-write pages across the whole range. + for p in (0..len as u64).step_by(PAGE as usize) { + tlb.cow.insert(base + p); + } + tlb.entries.clear(); + let (r, _) = call_with_retries(SELFTEST, &mut tlb, &[SelfTest::FILL, base + 1, (len - 2) as u64, 9, 0, 0, 0, 0]); + assert_eq!(r, Reply::Ok((len - 2) as u64, 0)); + assert_eq!(tlb.bytes[0], 3, "the byte before the range is untouched"); + assert!(tlb.bytes[1..len - 1].iter().all(|&b| b == 9)); + } +} diff --git a/src/machine.rs b/src/machine.rs index 2da8a8d..a468474 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -238,6 +238,10 @@ fn check_testdev_slot_free(#[cfg(feature = "ultra64")] ultra64_present: bool) { impl Machine { pub fn new(cfg: MachineConfig) -> Self { + // Host calls (iris-hostcall): the self-test service is always there + // when the feature is built in, so a guest can prove the trap works. + #[cfg(feature = "hostcall")] + iris_hostcall::register(iris_hostcall::SELFTEST, Box::new(iris_hostcall::SelfTest)); Self::new_with_testdev(cfg, None) } diff --git a/src/mips_exec.rs b/src/mips_exec.rs index f70a847..f3a37de 100644 --- a/src/mips_exec.rs +++ b/src/mips_exec.rs @@ -5543,7 +5543,39 @@ va={:#018x} phys={:#010x} (code pfn {:#x}, page {:#010x}, word {}/{})", self.core.write_gpr(rd_reg, self.core.pc + 8); self.branch_delay(target) } + /// Answer a host call (system calls 3000-3009, see iris-hostcall) if this + /// `syscall` is one and a service is registered for it. Only from user + /// mode and outside a delay slot; anything else goes to IRIX as usual. + #[cfg(feature = "hostcall")] + fn host_call(&mut self) -> Option { + if self.core.get_privilege_mode() != PrivilegeMode::User || self.core.in_delay_slot { + return None; + } + let v0 = self.core.read_gpr(2); + let n = v0 as u32; + if !(iris_hostcall::FIRST..=iris_hostcall::LAST).contains(&n) && n != iris_hostcall::SYS_SYSCALL { + return None; + } + let mut regs = [0u64; 8]; + for (i, r) in regs.iter_mut().enumerate() { + *r = self.core.read_gpr(4 + i as u32); + } + let (number, args) = iris_hostcall::decode(v0, ®s)?; + let reply = iris_hostcall::dispatch(number, &mut HostMemory { exec: self }, &args)?; + let (rv0, rv1, ra3) = iris_hostcall::registers(reply); + self.core.write_gpr(2, rv0); + self.core.write_gpr(3, rv1); + self.core.write_gpr(7, ra3); + Some(self.handle_exec_complete()) + } + fn exec_syscall(&mut self, _d: &DecodedInstr) -> ExecStatus { + // A host call (iris-hostcall) is answered here and never becomes an + // exception: the program resumes at the next instruction. + #[cfg(feature = "hostcall")] + if let Some(status) = self.host_call() { + return status; + } // Compile-worthy on entry too, symmetric with exec_eret's // syscall_pending-gated trigger on return — see MipsCore's own doc // comment on that field for why neither can rely on the general @@ -14822,6 +14854,71 @@ impl CpuDebug } } +/// A host call's view of the calling program's memory, a page at a time: its +/// virtual addresses, translated through the TLB under the current +/// address-space id with the access actually needed, and no CPU state touched. +/// A page that would fault -- no TLB entry, invalid, or not dirty for a write +/// -- is reported for the caller to fault in (see `iris_hostcall`). +#[cfg(feature = "hostcall")] +struct HostMemory<'a, T: Tlb, C: CpuModel> { + exec: &'a mut MipsExecutor, +} + +#[cfg(feature = "hostcall")] +impl HostMemory<'_, T, C> { + /// Sign-extend like a 32-bit register holds an address. + fn canon(addr: u64) -> u64 { + addr as u32 as i32 as i64 as u64 + } + + /// Can the program itself make this access to `page`? User addresses only + /// -- DEBUG translation runs with kernel privilege, so this range check is + /// what keeps a program from handing us a kernel address -- and the TLB + /// entry must be there, valid, and dirty for a write. + fn usable(&mut self, page: u64, write: bool) -> Result<(), iris_hostcall::Fault> { + let fault = iris_hostcall::Fault { page, write }; + if page >= 0x8000_0000 { + return Err(fault); + } + let access = if write { AccessType::Write } else { AccessType::Read }; + if self.exec.translate_impl::(Self::canon(page), access).is_exception() { + return Err(fault); + } + Ok(()) + } +} + +#[cfg(feature = "hostcall")] +impl iris_hostcall::PageAccess for HostMemory<'_, T, C> { + fn space(&self) -> u64 { + self.exec.core.cp0_entryhi & 0xFF + } + + fn read_page(&mut self, page: u64, buf: &mut [u8; iris_hostcall::PAGE as usize]) -> Result<(), iris_hostcall::Fault> { + self.usable(page, false)?; + for (i, chunk) in buf.chunks_exact_mut(8).enumerate() { + let v = self.exec.read_data_impl::(Self::canon(page + (i as u64) * 8)) + .map_err(|_| iris_hostcall::Fault { page, write: false })?; + // The host buffer is guest bytes: this is the edge where a guest + // word becomes bytes in guest (big-endian) order. + chunk.copy_from_slice(&v.to_be_bytes()); + } + Ok(()) + } + + fn write_in_page(&mut self, addr: u64, data: &[u8]) -> Result<(), iris_hostcall::Fault> { + let page = addr & !(iris_hostcall::PAGE - 1); + debug_assert!(addr + data.len() as u64 <= page + iris_hostcall::PAGE); + self.usable(page, true)?; + for (i, &b) in data.iter().enumerate() { + if self.exec.write_data_impl::(Self::canon(addr + i as u64), b as u64) != EXEC_COMPLETE { + return Err(iris_hostcall::Fault { page, write: true }); + } + } + Ok(()) + } +} + #[cfg(test)] mod xcontext_layout_tests { use super::xcontext_on_miss; diff --git a/src/mips_exec_test.rs b/src/mips_exec_test.rs index 0bc98e1..c3472a3 100644 --- a/src/mips_exec_test.rs +++ b/src/mips_exec_test.rs @@ -3625,6 +3625,63 @@ mod tests { assert_eq!(mem.get_word(addr), 0xDEADBEEF); // Memory unchanged } + /// A host call is answered in place: from user mode, `syscall` with a + /// registered number (here the self-test service through IRIX's indirect + /// form, `v0` = 1000, the number in `$4`) sets `v0`/`v1`/`a3` and moves on + /// to the next instruction with no exception. From kernel mode the same + /// instruction is an ordinary Syscall exception. + #[test] + #[cfg(feature = "hostcall")] + fn host_call_answers_user_syscall_and_leaves_kernel_alone() { + use crate::mips_core::{STATUS_ERL, STATUS_EXL, STATUS_KSU_MASK, STATUS_KSU_SHIFT, KSU_USER}; + iris_hostcall::register(iris_hostcall::SELFTEST, Box::new(iris_hostcall::SelfTest)); + let syscall = make_r(OP_SPECIAL, 0, 0, 0, 0, FUNCT_SYSCALL); + let set_call = |exec: &mut MipsExecutor, args: &[u64]| { + exec.core.write_gpr(2, iris_hostcall::SYS_SYSCALL as u64); + exec.core.write_gpr(4, iris_hostcall::SELFTEST as u64); + for i in 0..7 { + exec.core.write_gpr(5 + i as u32, args.get(i).copied().unwrap_or(0)); + } + }; + + // Kernel mode: an ordinary exception. + let (mut exec, _) = create_executor(); + set_call(&mut exec, &[iris_hostcall::SelfTest::PING, 7]); + let s = exec.exec(syscall); + assert!(s & EXEC_IS_EXCEPTION != 0 && (s >> 2) & 0x1F == EXC_SYS, + "a kernel-mode syscall must stay IRIX's"); + + // User mode: PING answers 0x1215 and the count of arguments before the + // first 0, with a3 = 0 (success) and no exception. + let (mut exec, mem) = create_executor(); + let user = (exec.core.cp0_status & !STATUS_KSU_MASK & !STATUS_EXL & !STATUS_ERL) + | ((KSU_USER as u32) << STATUS_KSU_SHIFT); + exec.set_cp0_status(user); + exec.core.pc = 0x0040_0000; + set_call(&mut exec, &[iris_hostcall::SelfTest::PING, 7, 9]); + let s = exec.exec(syscall); + assert_eq!(s & EXEC_IS_EXCEPTION, 0, "a host call must not raise an exception"); + assert_eq!(exec.core.read_gpr(2), 0x1215); + assert_eq!(exec.core.read_gpr(3), 2); + assert_eq!(exec.core.read_gpr(7), 0); + assert_eq!(exec.core.cp0_status & STATUS_EXL, 0); + + // SUM reads the program's memory through the TLB: the bytes of one + // word at a user address. + mem.set_word(0x0010_0000, 0x0102_0304); + set_call(&mut exec, &[iris_hostcall::SelfTest::SUM, 0x0010_0000, 4]); + let s = exec.exec(syscall); + assert_eq!(s & EXEC_IS_EXCEPTION, 0); + assert_eq!((exec.core.read_gpr(2), exec.core.read_gpr(7)), (10, 0)); + + // A kernel address is refused, not read: the need-page answer, a3 = 1. + set_call(&mut exec, &[iris_hostcall::SelfTest::SUM, 0xFFFF_FFFF_8000_0000, 4]); + let s = exec.exec(syscall); + assert_eq!(s & EXEC_IS_EXCEPTION, 0); + assert_eq!((exec.core.read_gpr(2), exec.core.read_gpr(7)), + (iris_hostcall::ENEEDPAGE, 1)); + } + #[test] fn test_syscall_break() { let (mut exec, _) = create_executor(); From 8c65771037a4fb88a7ab4e0532deda2bbc91d600 Mon Sep 17 00:00:00 2001 From: atomchild411 <143453386+atomchild411@users.noreply.github.com> Date: Wed, 30 Sep 2026 01:20:18 -0800 Subject: [PATCH 2/2] hostgl: host OpenGL for IRIX programs, over host call 3000 IRIX OpenGL programs draw on the host's GPU. They are given a replacement libGL (the iris-guest-tools project, github.com/atomchild411/iris-guest-tools, installed in place of SGI's under the same SONAME) whose entry points encode themselves into a command buffer; the buffer reaches the host in one host call whenever a call needs the host before it returns (a result, memory read or written in place, a swap) or the buffer is full. iris-hostgl replays it on the host's OpenGL: a legacy-profile context per GLX context, a framebuffer object per drawable. SGI extensions the host lacks are done in the fragment stage with shaders. A swap flips the frame on the GPU and presents it: on IMPACT the board composites it into its framebuffer under the window (`ImpactScreen`, `Mgras::composite`); otherwise the pixels go back to the program, which puts them up with XShmPutImage/XPutImage. Program memory is read and written through hostcall's need-page protocol, so buffers larger than the TLB work and nothing in IRIX changes. Both halves of the wire protocol -- this crate's decoder (src/calls.rs) and the guest library's encoders -- are generated by tools/glshim.py from one description, tools/glapi.json, which tools/glapi_from_registry.py builds from the Khronos OpenGL registry (tools/khronos/gl.xml, pinned, Apache-2.0, see its README) plus our annotations of what IRIX 6.5 declares differently. Regenerating from this tree reproduces calls.rs and the published guest encoders byte for byte. A handshake checks the protocol number, so a library and an emulator that disagree refuse each other. The only backend is Apple's CGL: on macOS `--features hostgl` registers the service; elsewhere the crate builds and registers nothing, and the guest library reports that host GL is not available. Co-Authored-By: Claude Opus 5.5 --- Cargo.toml | 9 +- iris-hostgl/Cargo.toml | 15 + iris-hostgl/src/backend/cgl.rs | 318 + iris-hostgl/src/backend/mod.rs | 59 + iris-hostgl/src/calls.rs | 6294 ++ iris-hostgl/src/draw.rs | 465 + iris-hostgl/src/emul.rs | 1846 + iris-hostgl/src/exec.rs | 1460 + iris-hostgl/src/ext.rs | 32 + iris-hostgl/src/gl.rs | 126 + iris-hostgl/src/lib.rs | 102 + iris-hostgl/src/present.rs | 301 + iris-hostgl/src/qos.rs | 93 + iris-hostgl/src/service.rs | 838 + iris-hostgl/src/tests.rs | 1357 + iris-hostgl/tools/glapi.json | 14068 +++++ iris-hostgl/tools/glapi_annotations.json | 5597 ++ iris-hostgl/tools/glapi_from_registry.py | 129 + iris-hostgl/tools/glshim.py | 663 + .../tools/khronos/LICENSE-Apache-2.0.txt | 202 + iris-hostgl/tools/khronos/README.md | 20 + iris-hostgl/tools/khronos/gl.xml | 47772 ++++++++++++++++ src/machine.rs | 7 + src/mgras/mod.rs | 27 + 24 files changed, 81799 insertions(+), 1 deletion(-) create mode 100644 iris-hostgl/Cargo.toml create mode 100644 iris-hostgl/src/backend/cgl.rs create mode 100644 iris-hostgl/src/backend/mod.rs create mode 100644 iris-hostgl/src/calls.rs create mode 100644 iris-hostgl/src/draw.rs create mode 100644 iris-hostgl/src/emul.rs create mode 100644 iris-hostgl/src/exec.rs create mode 100644 iris-hostgl/src/ext.rs create mode 100644 iris-hostgl/src/gl.rs create mode 100644 iris-hostgl/src/lib.rs create mode 100644 iris-hostgl/src/present.rs create mode 100644 iris-hostgl/src/qos.rs create mode 100644 iris-hostgl/src/service.rs create mode 100644 iris-hostgl/src/tests.rs create mode 100644 iris-hostgl/tools/glapi.json create mode 100644 iris-hostgl/tools/glapi_annotations.json create mode 100644 iris-hostgl/tools/glapi_from_registry.py create mode 100644 iris-hostgl/tools/glshim.py create mode 100644 iris-hostgl/tools/khronos/LICENSE-Apache-2.0.txt create mode 100644 iris-hostgl/tools/khronos/README.md create mode 100644 iris-hostgl/tools/khronos/gl.xml diff --git a/Cargo.toml b/Cargo.toml index 5eee343..48a6b0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["iris-gui", "iris-hostcall"] +members = ["iris-gui", "iris-hostcall", "iris-hostgl"] [package] name = "iris" @@ -277,6 +277,12 @@ daynaport = [] # IRIX untouched. Off by default -- a guest that never issues one cannot tell # the difference. hostcall = ["dep:iris-hostcall"] +# Host OpenGL for IRIX programs (iris-hostgl/): host call 3000, answered by +# replaying the replacement libGL's command stream on the host GPU. The IRIX +# side libraries are the iris-guest-tools project +# (github.com/atomchild411/iris-guest-tools). macOS only for now (CGL); on +# other hosts the service is not registered and the guest's libGL says so. +hostgl = ["hostcall", "dep:iris-hostgl"] [dependencies] clap = { version = "4", features = ["derive"] } @@ -319,6 +325,7 @@ pcap = { version = "2", optional = true } shared_memory = { version = "0.12", optional = true } raw_sync = { version = "0.1", optional = true } iris-hostcall = { path = "iris-hostcall", optional = true } +iris-hostgl = { path = "iris-hostgl", optional = true } [target.'cfg(target_os = "macos")'.dependencies] nokhwa = { version = "0.10", features = ["input-avfoundation"], optional = true } diff --git a/iris-hostgl/Cargo.toml b/iris-hostgl/Cargo.toml new file mode 100644 index 0000000..50dd07d --- /dev/null +++ b/iris-hostgl/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "iris-hostgl" +version = "0.1.0" +edition = "2021" +description = "Host OpenGL for IRIX programs under IRIS, through host call 3000" +license = "BSD-3-Clause" + +[dependencies] +iris-hostcall = { path = "../iris-hostcall" } +log = "0.4" + +# The only backend so far is Apple's OpenGL.framework (CGL); elsewhere the +# crate builds and registers nothing. +[target.'cfg(target_os = "macos")'.dependencies] +libc = "0.2" diff --git a/iris-hostgl/src/backend/cgl.rs b/iris-hostgl/src/backend/cgl.rs new file mode 100644 index 0000000..1b8b2bc --- /dev/null +++ b/iris-hostgl/src/backend/cgl.rs @@ -0,0 +1,318 @@ +//! Apple's OpenGL.framework: CGL contexts in the legacy profile, and IOSurface +//! render targets. +//! +//! IOSurface is the one kind of GL-renderable surface on the Mac whose pixels +//! the CPU can also address. A renderbuffer's layout belongs to the driver -- +//! tiled, maybe compressed -- so `glReadPixels` has to untile a whole frame to +//! hand one over; an IOSurface is linear and shared by construction. Render +//! into it through a rectangle texture and its base address is those same +//! pixels, so presenting a frame costs a memcpy rather than a readback. +//! `IRIS_HOSTGL_NOSURFACE=1` turns it off, which is how the two paths are +//! compared. + +use std::ffi::c_void; +use std::sync::OnceLock; + +use super::{Backend, ContextHandle, Surface}; + +#[link(name = "IOSurface", kind = "framework")] +extern "C" { + static kIOSurfaceWidth: *const c_void; + static kIOSurfaceHeight: *const c_void; + static kIOSurfaceBytesPerElement: *const c_void; + static kIOSurfacePixelFormat: *const c_void; + fn IOSurfaceCreate(props: *const c_void) -> *mut c_void; + fn IOSurfaceGetBaseAddress(s: *mut c_void) -> *mut c_void; + fn IOSurfaceGetBytesPerRow(s: *mut c_void) -> usize; + fn IOSurfaceGetHeight(s: *mut c_void) -> usize; + fn IOSurfaceLock(s: *mut c_void, options: u32, seed: *mut u32) -> i32; + fn IOSurfaceUnlock(s: *mut c_void, options: u32, seed: *mut u32) -> i32; +} + +#[link(name = "CoreFoundation", kind = "framework")] +extern "C" { + static kCFTypeDictionaryKeyCallBacks: c_void; + static kCFTypeDictionaryValueCallBacks: c_void; + fn CFDictionaryCreate( + alloc: *const c_void, + keys: *const *const c_void, + values: *const *const c_void, + n: isize, + kcb: *const c_void, + vcb: *const c_void, + ) -> *const c_void; + fn CFNumberCreate(alloc: *const c_void, ty: i32, value: *const c_void) -> *const c_void; + fn CFRelease(v: *const c_void); +} + +#[link(name = "OpenGL", kind = "framework")] +extern "C" { + fn CGLGetCurrentContext() -> *mut c_void; + fn CGLSetCurrentContext(ctx: *mut c_void) -> i32; + fn CGLChoosePixelFormat(attribs: *const i32, pix: *mut *mut c_void, npix: *mut i32) -> i32; + fn CGLCreateContext(pix: *mut c_void, share: *mut c_void, ctx: *mut *mut c_void) -> i32; + fn CGLDestroyContext(ctx: *mut c_void) -> i32; + fn CGLDestroyPixelFormat(pix: *mut c_void) -> i32; + fn CGLTexImageIOSurface2D( + ctx: *mut c_void, + target: u32, + internal_format: u32, + width: u32, + height: u32, + format: u32, + ty: u32, + surface: *mut c_void, + plane: u32, + ) -> i32; + fn glBindTexture(target: u32, texture: u32); + fn glDeleteTextures(n: i32, ids: *const u32); +} + +const GL_TEXTURE_RECTANGLE: u32 = 0x84F5; +const GL_RGBA8: u32 = 0x8058; +const GL_BGRA: u32 = 0x80E1; +const GL_UNSIGNED_INT_8_8_8_8_REV: u32 = 0x8367; +const CF_NUMBER_INT: i32 = 9; // kCFNumberIntType +/// 'BGRA', which is what the X side wants a frame in anyway. +const PIXEL_FORMAT_BGRA: i32 = 0x4247_5241; +/// kIOSurfaceLockReadOnly. +const LOCK_READ_ONLY: u32 = 1; + +// kCGLPFAAccelerated, kCGLPFAOpenGLProfile, kCGLOGLPVersion_Legacy. +const PFA_ACCELERATED: i32 = 73; +const PFA_PROFILE: i32 = 99; +const PROFILE_LEGACY: i32 = 0x1000; + +pub struct Cgl { + /// OpenGL.framework's own image, where entry points are looked up. One + /// for the process: a channel used to `dlopen` its own, which meant a + /// framework reference per GL program run and no matching close. Nothing + /// bad came of it -- the framework is linked anyway, so the count never + /// reached zero -- but a per-run acquisition with no release is the shape + /// of a leak whether or not it bites, and one handle is also one fewer + /// thing that differs between a program that ended politely and one that + /// did not. + framework: *mut c_void, + surfaces: bool, +} + +// SAFETY: `framework` is a dlopen handle, usable from any thread; the service +// that owns the backend is only ever used by one thread at a time. +unsafe impl Send for Cgl {} + +impl Cgl { + pub fn new() -> Cgl { + // Opened once and never closed: dlclose of a framework other code in + // this process is still using is a well known way to crash, and there + // is nothing to gain by it. + static FRAMEWORK: OnceLock = OnceLock::new(); + let framework = *FRAMEWORK.get_or_init(|| { + let path = c"/System/Library/Frameworks/OpenGL.framework/OpenGL"; + // SAFETY: a plain dlopen of a system framework this crate links anyway. + unsafe { libc::dlopen(path.as_ptr(), libc::RTLD_LAZY | libc::RTLD_LOCAL) as usize } + }) as *mut c_void; + let surfaces = std::env::var("IRIS_HOSTGL_NOSURFACE").as_deref() != Ok("1"); + Cgl { framework, surfaces } + } +} + +impl Default for Cgl { + fn default() -> Self { + Cgl::new() + } +} + +impl Backend for Cgl { + fn name(&self) -> &'static str { + "CGL" + } + + fn create_context(&mut self, share: Option) -> Option { + // The legacy profile is the one that still has glBegin, display lists + // and the matrix stack. + let attrs = [PFA_ACCELERATED, PFA_PROFILE, PROFILE_LEGACY, 0]; + let mut pix = std::ptr::null_mut(); + let mut n = 0; + // SAFETY: attribute list is zero-terminated; out pointers are valid. + if unsafe { CGLChoosePixelFormat(attrs.as_ptr(), &mut pix, &mut n) } != 0 || pix.is_null() { + log::warn!("host GL: CGL has no accelerated legacy pixel format"); + return None; + } + let share = share.map_or(std::ptr::null_mut(), |c| c.0 as *mut c_void); + let mut ctx = std::ptr::null_mut(); + // SAFETY: `pix` is a live pixel format, `share` null or a live context. + let r = unsafe { CGLCreateContext(pix, share, &mut ctx) }; + unsafe { CGLDestroyPixelFormat(pix) }; + if r != 0 || ctx.is_null() { + log::warn!("host GL: CGLCreateContext failed ({r})"); + return None; + } + Some(ContextHandle(ctx as usize)) + } + + fn destroy_context(&mut self, ctx: ContextHandle) { + // SAFETY: `ctx` came from create_context and is destroyed once. + unsafe { + if CGLGetCurrentContext() as usize == ctx.0 { + CGLSetCurrentContext(std::ptr::null_mut()); + } + CGLDestroyContext(ctx.0 as *mut c_void); + } + } + + fn make_current(&mut self, ctx: Option) -> bool { + let p = ctx.map_or(std::ptr::null_mut(), |c| c.0 as *mut c_void); + // SAFETY: null or a live context. + unsafe { CGLSetCurrentContext(p) == 0 } + } + + fn current(&self) -> Option { + // SAFETY: a query. + let p = unsafe { CGLGetCurrentContext() }; + (!p.is_null()).then_some(ContextHandle(p as usize)) + } + + fn lookup(&self, name: &str) -> *const c_void { + let Ok(c) = std::ffi::CString::new(name) else { return std::ptr::null() }; + let handle = if self.framework.is_null() { libc::RTLD_DEFAULT } else { self.framework }; + // SAFETY: a symbol lookup; the result is only called through a + // signature generated from the same entry point's declaration. + unsafe { libc::dlsym(handle, c.as_ptr()) as *const c_void } + } + + fn new_surface(&mut self, w: i32, h: i32) -> Option> { + if !self.surfaces { + return None; + } + IoSurface::new(w, h).map(|s| Box::new(s) as Box) + } +} + +/// A linear, CPU-addressable surface the GPU renders into. +struct IoSurface { + iosurface: *mut c_void, + tex: u32, + h: usize, + stride: usize, +} + +// SAFETY: an IOSurfaceRef may be used from any thread; the texture name is +// only used with a context of its share group current. +unsafe impl Send for IoSurface {} +// SAFETY: shared use is `texture` (a name) and `with_pixels`, whose +// IOSurfaceLock/Unlock pair is thread-safe; deleting the texture takes &mut. +unsafe impl Sync for IoSurface {} + +impl IoSurface { + /// A surface `w` by `h`, wrapped as a rectangle texture in the current + /// context. + fn new(w: i32, h: i32) -> Option { + if w <= 0 || h <= 0 { + return None; + } + let num = |v: i32| unsafe { CFNumberCreate(std::ptr::null(), CF_NUMBER_INT, &v as *const i32 as *const c_void) }; + let (vw, vh, vb, vf) = (num(w), num(h), num(4), num(PIXEL_FORMAT_BGRA)); + // SAFETY: CoreFoundation objects made and released here; the key and + // value arrays outlive the dictionary's creation, which retains them. + let surface = unsafe { + let keys = [kIOSurfaceWidth, kIOSurfaceHeight, kIOSurfaceBytesPerElement, kIOSurfacePixelFormat]; + let values = [vw, vh, vb, vf]; + let props = if values.iter().any(|v| v.is_null()) { + std::ptr::null() + } else { + CFDictionaryCreate( + std::ptr::null(), + keys.as_ptr(), + values.as_ptr(), + keys.len() as isize, + &kCFTypeDictionaryKeyCallBacks as *const c_void, + &kCFTypeDictionaryValueCallBacks as *const c_void, + ) + }; + let s = if props.is_null() { std::ptr::null_mut() } else { IOSurfaceCreate(props) }; + for v in values { + if !v.is_null() { + CFRelease(v); + } + } + if !props.is_null() { + CFRelease(props); + } + s + }; + if surface.is_null() { + return None; + } + let tex = crate::internal_texture_name(); + // SAFETY: a context is current (the caller's contract); the texture + // name is ours alone (see internal_texture_name). + let ok = unsafe { + glBindTexture(GL_TEXTURE_RECTANGLE, tex); + let r = CGLTexImageIOSurface2D( + CGLGetCurrentContext(), + GL_TEXTURE_RECTANGLE, + GL_RGBA8, + w as u32, + h as u32, + GL_BGRA, + GL_UNSIGNED_INT_8_8_8_8_REV, + surface, + 0, + ); + glBindTexture(GL_TEXTURE_RECTANGLE, 0); + r == 0 + }; + if !ok { + // SAFETY: as above; the surface is released once. + unsafe { + glDeleteTextures(1, &tex); + CFRelease(surface as *const c_void); + } + return None; + } + // SAFETY: a live surface. + let (stride, height) = unsafe { (IOSurfaceGetBytesPerRow(surface), IOSurfaceGetHeight(surface)) }; + Some(IoSurface { iosurface: surface, tex, h: height.min(h as usize), stride }) + } +} + +impl Surface for IoSurface { + fn texture(&self) -> (u32, u32) { + (GL_TEXTURE_RECTANGLE, self.tex) + } + + fn with_pixels(&self, f: &mut dyn FnMut(&[u8], usize)) -> bool { + let mut seed = 0u32; + // SAFETY: a live surface; locking waits for GPU work outstanding on it. + if unsafe { IOSurfaceLock(self.iosurface, LOCK_READ_ONLY, &mut seed) } != 0 { + return false; + } + let base = unsafe { IOSurfaceGetBaseAddress(self.iosurface) } as *const u8; + let ok = !base.is_null(); + if ok { + // SAFETY: the surface is `stride` bytes a row for `h` rows, and it + // stays locked until `f` returns. + let all = unsafe { std::slice::from_raw_parts(base, self.stride * self.h) }; + f(all, self.stride); + } + unsafe { IOSurfaceUnlock(self.iosurface, LOCK_READ_ONLY, &mut seed) }; + ok + } + + fn delete_texture(&mut self) { + if self.tex != 0 { + // SAFETY: the caller has a context of the share group current. + unsafe { glDeleteTextures(1, &self.tex) }; + self.tex = 0; + } + } +} + +impl Drop for IoSurface { + fn drop(&mut self) { + // The texture is the share group's and goes with it (or was deleted + // with delete_texture); the surface itself is ours to release. + // SAFETY: released exactly once. + unsafe { CFRelease(self.iosurface as *const c_void) }; + } +} diff --git a/iris-hostgl/src/backend/mod.rs b/iris-hostgl/src/backend/mod.rs new file mode 100644 index 0000000..627eecf --- /dev/null +++ b/iris-hostgl/src/backend/mod.rs @@ -0,0 +1,59 @@ +//! What depends on the platform's GL: making contexts, finding entry points, +//! and a render target the CPU can read without a readback. +//! +//! Everything else in the crate -- the call replay, drawables, the swap -- is +//! OpenGL itself (legacy/compatibility profile, EXT_framebuffer_object and +//! EXT_framebuffer_blit), so a second backend (EGL + Zink, say) implements +//! this trait and nothing more. Its GL entry points must then be the ones the +//! `gl` module links: that module names OpenGL.framework today and would +//! grow a `cfg` for the other library. + +use std::ffi::c_void; + +#[cfg(target_os = "macos")] +pub mod cgl; + +/// A GL context, opaque to everything but the backend that made it. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +pub struct ContextHandle(pub usize); + +pub trait Backend: Send { + /// A short name for logs. + fn name(&self) -> &'static str; + + /// A new context with the fixed-function pipeline (legacy profile), + /// sharing objects with `share` if given. Not made current. + fn create_context(&mut self, share: Option) -> Option; + + /// Destroy a context. It is not current on this thread afterwards. + fn destroy_context(&mut self, ctx: ContextHandle); + + /// Make `ctx` current on the calling thread (`None`: no context). + fn make_current(&mut self, ctx: Option) -> bool; + + /// The context current on the calling thread. + fn current(&self) -> Option; + + /// The address of GL entry point `name`, or null if the library has none. + fn lookup(&self, name: &str) -> *const c_void; + + /// A `w` x `h` render target whose pixels the CPU can address directly, + /// wrapped as a texture in the current context; `None` if the platform + /// has no such thing (the swap then reads back with glReadPixels). + fn new_surface(&mut self, w: i32, h: i32) -> Option>; +} + +/// A CPU-addressable render target (see [`Backend::new_surface`]). +pub trait Surface: Send + Sync { + /// The texture that renders into it: (target, name). + fn texture(&self) -> (u32, u32); + + /// Lend the pixels to `f`: BGRA bytes, `stride` bytes a row, rows in the + /// texture's order (row 0 is texture row 0). False if they could not be + /// mapped. The caller has flushed GL first. + fn with_pixels(&self, f: &mut dyn FnMut(&[u8], usize)) -> bool; + + /// Delete the texture. A context of the share group that made it must be + /// current; without one (the group is gone) just drop the surface. + fn delete_texture(&mut self); +} diff --git a/iris-hostgl/src/calls.rs b/iris-hostgl/src/calls.rs new file mode 100644 index 0000000..bb98c3d --- /dev/null +++ b/iris-hostgl/src/calls.rs @@ -0,0 +1,6294 @@ +// Generated by iris-hostgl/tools/glshim.py from tools/glapi.json -- do not edit. +#![allow(clippy::all, dead_code, non_snake_case, unused_parens, unused_variables, unused_mut)] +use super::Exec; +use std::ffi::c_void; + +pub const NAMES: &[&str] = &[ + "glAccum", + "glAlphaFunc", + "glAreTexturesResident", + "glAreTexturesResidentEXT", + "glArrayElement", + "glArrayElementEXT", + "glBegin", + "glBindTexture", + "glBindTextureEXT", + "glBitmap", + "glBlendColor", + "glBlendColorEXT", + "glBlendEquation", + "glBlendEquationEXT", + "glBlendFunc", + "glCallList", + "glCallLists", + "glClear", + "glClearAccum", + "glClearColor", + "glClearDepth", + "glClearIndex", + "glClearStencil", + "glClipPlane", + "glColor3b", + "glColor3bv", + "glColor3d", + "glColor3dv", + "glColor3f", + "glColor3fv", + "glColor3i", + "glColor3iv", + "glColor3s", + "glColor3sv", + "glColor3ub", + "glColor3ubv", + "glColor3ui", + "glColor3uiv", + "glColor3us", + "glColor3usv", + "glColor4b", + "glColor4bv", + "glColor4d", + "glColor4dv", + "glColor4f", + "glColor4fv", + "glColor4i", + "glColor4iv", + "glColor4s", + "glColor4sv", + "glColor4ub", + "glColor4ubv", + "glColor4ui", + "glColor4uiv", + "glColor4us", + "glColor4usv", + "glColorMask", + "glColorMaterial", + "glColorPointer", + "glColorPointerEXT", + "glColorSubTable", + "glColorTable", + "glColorTableParameterfv", + "glColorTableParameterfvSGI", + "glColorTableParameteriv", + "glColorTableParameterivSGI", + "glColorTableSGI", + "glConvolutionFilter1D", + "glConvolutionFilter1DEXT", + "glConvolutionFilter2D", + "glConvolutionFilter2DEXT", + "glConvolutionParameterf", + "glConvolutionParameterfEXT", + "glConvolutionParameterfv", + "glConvolutionParameterfvEXT", + "glConvolutionParameteri", + "glConvolutionParameteriEXT", + "glConvolutionParameteriv", + "glConvolutionParameterivEXT", + "glCopyColorSubTable", + "glCopyColorTable", + "glCopyColorTableSGI", + "glCopyConvolutionFilter1D", + "glCopyConvolutionFilter1DEXT", + "glCopyConvolutionFilter2D", + "glCopyConvolutionFilter2DEXT", + "glCopyPixels", + "glCopyTexImage1D", + "glCopyTexImage1DEXT", + "glCopyTexImage2D", + "glCopyTexImage2DEXT", + "glCopyTexSubImage1D", + "glCopyTexSubImage1DEXT", + "glCopyTexSubImage2D", + "glCopyTexSubImage2DEXT", + "glCopyTexSubImage3D", + "glCopyTexSubImage3DEXT", + "glCullFace", + "glDeformSGIX", + "glDeformationMap3dSGIX", + "glDeformationMap3fSGIX", + "glDeleteLists", + "glDeleteTextures", + "glDeleteTexturesEXT", + "glDepthFunc", + "glDepthMask", + "glDepthRange", + "glDetailTexFuncSGIS", + "glDisable", + "glDisableClientState", + "glDrawArrays", + "glDrawArraysEXT", + "glDrawBuffer", + "glDrawElements", + "glDrawPixels", + "glDrawRangeElements", + "glEdgeFlag", + "glEdgeFlagPointer", + "glEdgeFlagPointerEXT", + "glEdgeFlagv", + "glEnable", + "glEnableClientState", + "glEnd", + "glEndList", + "glEvalCoord1d", + "glEvalCoord1dv", + "glEvalCoord1f", + "glEvalCoord1fv", + "glEvalCoord2d", + "glEvalCoord2dv", + "glEvalCoord2f", + "glEvalCoord2fv", + "glEvalMesh1", + "glEvalMesh2", + "glEvalPoint1", + "glEvalPoint2", + "glFeedbackBuffer", + "glFinish", + "glFlush", + "glFlushRasterSGIX", + "glFogFuncSGIS", + "glFogf", + "glFogfv", + "glFogi", + "glFogiv", + "glFrameZoomSGIX", + "glFrontFace", + "glFrustum", + "glGenLists", + "glGenTextures", + "glGenTexturesEXT", + "glGetBooleanv", + "glGetClipPlane", + "glGetColorTable", + "glGetColorTableParameterfv", + "glGetColorTableParameterfvSGI", + "glGetColorTableParameteriv", + "glGetColorTableParameterivSGI", + "glGetColorTableSGI", + "glGetConvolutionFilter", + "glGetConvolutionFilterEXT", + "glGetConvolutionParameterfv", + "glGetConvolutionParameterfvEXT", + "glGetConvolutionParameteriv", + "glGetConvolutionParameterivEXT", + "glGetDetailTexFuncSGIS", + "glGetDoublev", + "glGetError", + "glGetFloatv", + "glGetHistogram", + "glGetHistogramEXT", + "glGetHistogramParameterfv", + "glGetHistogramParameterfvEXT", + "glGetHistogramParameteriv", + "glGetHistogramParameterivEXT", + "glGetInstrumentsSGIX", + "glGetIntegerv", + "glGetLightfv", + "glGetLightiv", + "glGetListParameterfvSGIX", + "glGetListParameterivSGIX", + "glGetMapdv", + "glGetMapfv", + "glGetMapiv", + "glGetMaterialfv", + "glGetMaterialiv", + "glGetMinmax", + "glGetMinmaxEXT", + "glGetMinmaxParameterfv", + "glGetMinmaxParameterfvEXT", + "glGetMinmaxParameteriv", + "glGetMinmaxParameterivEXT", + "glGetPixelMapfv", + "glGetPixelMapuiv", + "glGetPixelMapusv", + "glGetPointerv", + "glGetPointervEXT", + "glGetPolygonStipple", + "glGetSeparableFilter", + "glGetSeparableFilterEXT", + "glGetSharpenTexFuncSGIS", + "glGetString", + "glGetTexEnvfv", + "glGetTexEnviv", + "glGetTexFilterFuncSGIS", + "glGetTexGendv", + "glGetTexGenfv", + "glGetTexGeniv", + "glGetTexImage", + "glGetTexLevelParameterfv", + "glGetTexLevelParameteriv", + "glGetTexParameterfv", + "glGetTexParameteriv", + "glHint", + "glHistogram", + "glHistogramEXT", + "glIndexMask", + "glIndexPointer", + "glIndexPointerEXT", + "glIndexd", + "glIndexdv", + "glIndexf", + "glIndexfv", + "glIndexi", + "glIndexiv", + "glIndexs", + "glIndexsv", + "glIndexub", + "glIndexubv", + "glInitNames", + "glInstrumentsBufferSGIX", + "glInterleavedArrays", + "glIsEnabled", + "glIsList", + "glIsTexture", + "glIsTextureEXT", + "glLightModelf", + "glLightModelfv", + "glLightModeli", + "glLightModeliv", + "glLightf", + "glLightfv", + "glLighti", + "glLightiv", + "glLineStipple", + "glLineWidth", + "glListBase", + "glListParameterfSGIX", + "glListParameterfvSGIX", + "glListParameteriSGIX", + "glListParameterivSGIX", + "glLoadIdentity", + "glLoadIdentityDeformationMapSGIX", + "glLoadMatrixd", + "glLoadMatrixf", + "glLoadName", + "glLogicOp", + "glMap1d", + "glMap1f", + "glMap2d", + "glMap2f", + "glMapGrid1d", + "glMapGrid1f", + "glMapGrid2d", + "glMapGrid2f", + "glMaterialf", + "glMaterialfv", + "glMateriali", + "glMaterialiv", + "glMatrixMode", + "glMinmax", + "glMinmaxEXT", + "glMultMatrixd", + "glMultMatrixf", + "glNewList", + "glNormal3b", + "glNormal3bv", + "glNormal3d", + "glNormal3dv", + "glNormal3f", + "glNormal3fv", + "glNormal3i", + "glNormal3iv", + "glNormal3s", + "glNormal3sv", + "glNormalPointer", + "glNormalPointerEXT", + "glOrtho", + "glPassThrough", + "glPixelMapfv", + "glPixelMapuiv", + "glPixelMapusv", + "glPixelStoref", + "glPixelStorei", + "glPixelTexGenSGIX", + "glPixelTransferf", + "glPixelTransferi", + "glPixelZoom", + "glPointParameterfSGIS", + "glPointParameterfvSGIS", + "glPointSize", + "glPollInstrumentsSGIX", + "glPolygonMode", + "glPolygonOffset", + "glPolygonOffsetEXT", + "glPolygonStipple", + "glPopAttrib", + "glPopClientAttrib", + "glPopMatrix", + "glPopName", + "glPrioritizeTextures", + "glPrioritizeTexturesEXT", + "glPushAttrib", + "glPushClientAttrib", + "glPushMatrix", + "glPushName", + "glRasterPos2d", + "glRasterPos2dv", + "glRasterPos2f", + "glRasterPos2fv", + "glRasterPos2i", + "glRasterPos2iv", + "glRasterPos2s", + "glRasterPos2sv", + "glRasterPos3d", + "glRasterPos3dv", + "glRasterPos3f", + "glRasterPos3fv", + "glRasterPos3i", + "glRasterPos3iv", + "glRasterPos3s", + "glRasterPos3sv", + "glRasterPos4d", + "glRasterPos4dv", + "glRasterPos4f", + "glRasterPos4fv", + "glRasterPos4i", + "glRasterPos4iv", + "glRasterPos4s", + "glRasterPos4sv", + "glReadBuffer", + "glReadInstrumentsSGIX", + "glReadPixels", + "glRectd", + "glRectdv", + "glRectf", + "glRectfv", + "glRecti", + "glRectiv", + "glRects", + "glRectsv", + "glReferencePlaneSGIX", + "glRenderMode", + "glResetHistogram", + "glResetHistogramEXT", + "glResetMinmax", + "glResetMinmaxEXT", + "glRotated", + "glRotatef", + "glSampleMaskSGIS", + "glSamplePatternSGIS", + "glScaled", + "glScalef", + "glScissor", + "glSelectBuffer", + "glSeparableFilter2D", + "glSeparableFilter2DEXT", + "glShadeModel", + "glSharpenTexFuncSGIS", + "glSpriteParameterfSGIX", + "glSpriteParameterfvSGIX", + "glSpriteParameteriSGIX", + "glSpriteParameterivSGIX", + "glStartInstrumentsSGIX", + "glStencilFunc", + "glStencilMask", + "glStencilOp", + "glStopInstrumentsSGIX", + "glTagSampleBufferSGIX", + "glTexCoord1d", + "glTexCoord1dv", + "glTexCoord1f", + "glTexCoord1fv", + "glTexCoord1i", + "glTexCoord1iv", + "glTexCoord1s", + "glTexCoord1sv", + "glTexCoord2d", + "glTexCoord2dv", + "glTexCoord2f", + "glTexCoord2fv", + "glTexCoord2i", + "glTexCoord2iv", + "glTexCoord2s", + "glTexCoord2sv", + "glTexCoord3d", + "glTexCoord3dv", + "glTexCoord3f", + "glTexCoord3fv", + "glTexCoord3i", + "glTexCoord3iv", + "glTexCoord3s", + "glTexCoord3sv", + "glTexCoord4d", + "glTexCoord4dv", + "glTexCoord4f", + "glTexCoord4fv", + "glTexCoord4i", + "glTexCoord4iv", + "glTexCoord4s", + "glTexCoord4sv", + "glTexCoordPointer", + "glTexCoordPointerEXT", + "glTexEnvf", + "glTexEnvfv", + "glTexEnvi", + "glTexEnviv", + "glTexFilterFuncSGIS", + "glTexGend", + "glTexGendv", + "glTexGenf", + "glTexGenfv", + "glTexGeni", + "glTexGeniv", + "glTexImage1D", + "glTexImage2D", + "glTexImage3D", + "glTexImage3DEXT", + "glTexImage4DSGIS", + "glTexParameterf", + "glTexParameterfv", + "glTexParameteri", + "glTexParameteriv", + "glTexSubImage1D", + "glTexSubImage1DEXT", + "glTexSubImage2D", + "glTexSubImage2DEXT", + "glTexSubImage3D", + "glTexSubImage3DEXT", + "glTexSubImage4DSGIS", + "glTranslated", + "glTranslatef", + "glVertex2d", + "glVertex2dv", + "glVertex2f", + "glVertex2fv", + "glVertex2i", + "glVertex2iv", + "glVertex2s", + "glVertex2sv", + "glVertex3d", + "glVertex3dv", + "glVertex3f", + "glVertex3fv", + "glVertex3i", + "glVertex3iv", + "glVertex3s", + "glVertex3sv", + "glVertex4d", + "glVertex4dv", + "glVertex4f", + "glVertex4fv", + "glVertex4i", + "glVertex4iv", + "glVertex4s", + "glVertex4sv", + "glVertexPointer", + "glVertexPointerEXT", + "glViewport", + "glActiveTextureARB", + "glClientActiveTextureARB", + "glMultiTexCoord1dARB", + "glMultiTexCoord1dvARB", + "glMultiTexCoord1fARB", + "glMultiTexCoord1fvARB", + "glMultiTexCoord1iARB", + "glMultiTexCoord1ivARB", + "glMultiTexCoord1sARB", + "glMultiTexCoord1svARB", + "glMultiTexCoord2dARB", + "glMultiTexCoord2dvARB", + "glMultiTexCoord2fARB", + "glMultiTexCoord2fvARB", + "glMultiTexCoord2iARB", + "glMultiTexCoord2ivARB", + "glMultiTexCoord2sARB", + "glMultiTexCoord2svARB", + "glMultiTexCoord3dARB", + "glMultiTexCoord3dvARB", + "glMultiTexCoord3fARB", + "glMultiTexCoord3fvARB", + "glMultiTexCoord3iARB", + "glMultiTexCoord3ivARB", + "glMultiTexCoord3sARB", + "glMultiTexCoord3svARB", + "glMultiTexCoord4dARB", + "glMultiTexCoord4dvARB", + "glMultiTexCoord4fARB", + "glMultiTexCoord4fvARB", + "glMultiTexCoord4iARB", + "glMultiTexCoord4ivARB", + "glMultiTexCoord4sARB", + "glMultiTexCoord4svARB", + "glSelectTextureSGIS", + "glMTexCoord2fSGIS", + "glMTexCoord2fvSGIS", +]; + +pub fn size_ColorTableParameterfvSGI(pname: u32) -> usize { + match pname { + 0x80d6 => 4, + 0x80d7 => 4, + _ => 1, + } +} +pub fn size_ColorTableParameterivSGI(pname: u32) -> usize { + match pname { + 0x80d6 => 4, + 0x80d7 => 4, + _ => 1, + } +} +pub fn size_ConvolutionParameterfvEXT(pname: u32) -> usize { + match pname { + 0x8013 => 1, + 0x8014 => 4, + 0x8015 => 4, + _ => 1, + } +} +pub fn size_ConvolutionParameterivEXT(pname: u32) -> usize { + match pname { + 0x8013 => 1, + 0x8014 => 4, + 0x8015 => 4, + _ => 1, + } +} +pub fn size_Fogfv(pname: u32) -> usize { + match pname { + 0xb61 => 1, + 0xb62 => 1, + 0xb63 => 1, + 0xb64 => 1, + 0xb65 => 1, + 0xb66 => 4, + 0x8199 => 4, + _ => 1, + } +} +pub fn size_Fogiv(pname: u32) -> usize { + match pname { + 0xb61 => 1, + 0xb62 => 1, + 0xb63 => 1, + 0xb64 => 1, + 0xb65 => 1, + 0xb66 => 4, + 0x8199 => 4, + _ => 1, + } +} +pub fn size_GetTexParameterfv(pname: u32) -> usize { + match pname { + 0x8174 => 3, + _ => 1, + } +} +pub fn size_GetTexParameteriv(pname: u32) -> usize { + match pname { + 0x8174 => 3, + _ => 1, + } +} +pub fn size_LightModelfv(pname: u32) -> usize { + match pname { + 0xb51 => 1, + 0xb52 => 1, + 0xb53 => 4, + _ => 1, + } +} +pub fn size_LightModeliv(pname: u32) -> usize { + match pname { + 0xb51 => 1, + 0xb52 => 1, + 0xb53 => 4, + _ => 1, + } +} +pub fn size_Lightfv(pname: u32) -> usize { + match pname { + 0x1200 => 4, + 0x1201 => 4, + 0x1202 => 4, + 0x1203 => 4, + 0x1204 => 3, + 0x1205 => 1, + 0x1206 => 1, + 0x1207 => 1, + 0x1208 => 1, + 0x1209 => 1, + _ => 1, + } +} +pub fn size_Lightiv(pname: u32) -> usize { + match pname { + 0x1200 => 4, + 0x1201 => 4, + 0x1202 => 4, + 0x1203 => 4, + 0x1204 => 3, + 0x1205 => 1, + 0x1206 => 1, + 0x1207 => 1, + 0x1208 => 1, + 0x1209 => 1, + _ => 1, + } +} +pub fn size_Materialfv(pname: u32) -> usize { + match pname { + 0x1200 => 4, + 0x1201 => 4, + 0x1202 => 4, + 0x1600 => 4, + 0x1601 => 1, + 0x1602 => 4, + 0x1603 => 3, + _ => 1, + } +} +pub fn size_Materialiv(pname: u32) -> usize { + match pname { + 0x1200 => 4, + 0x1201 => 4, + 0x1202 => 4, + 0x1600 => 4, + 0x1601 => 1, + 0x1602 => 4, + 0x1603 => 3, + _ => 1, + } +} +pub fn size_PixelTransformParameterfvSGI(pname: u32) -> usize { + match pname { + 0x8013 => 1, + 0x8014 => 4, + 0x8015 => 4, + 0x8017 => 1, + 0x8018 => 1, + 0x8019 => 1, + 0x801a => 1, + 0x801b => 1, + _ => 1, + } +} +pub fn size_PixelTransformParameterivSGI(pname: u32) -> usize { + match pname { + 0x8013 => 1, + 0x8014 => 4, + 0x8015 => 4, + 0x8017 => 1, + 0x8018 => 1, + 0x8019 => 1, + 0x801a => 1, + 0x801b => 1, + _ => 1, + } +} +pub fn size_PointParameterfvSGIS(pname: u32) -> usize { + match pname { + 0x8126 => 1, + 0x8127 => 1, + 0x8128 => 1, + 0x8129 => 3, + _ => 1, + } +} +pub fn size_SpriteParameterfvSGIX(pname: u32) -> usize { + match pname { + 0x8149 => 1, + 0x814a => 3, + 0x814b => 3, + _ => 1, + } +} +pub fn size_SpriteParameterivSGIX(pname: u32) -> usize { + match pname { + 0x8149 => 1, + 0x814a => 3, + 0x814b => 3, + _ => 1, + } +} +pub fn size_TexEnvfv(pname: u32) -> usize { + match pname { + 0x2200 => 1, + 0x2201 => 4, + _ => 1, + } +} +pub fn size_TexEnviv(pname: u32) -> usize { + match pname { + 0x2200 => 1, + 0x2201 => 4, + _ => 1, + } +} +pub fn size_TexGendv(pname: u32) -> usize { + match pname { + 0x2500 => 1, + 0x2501 => 4, + 0x2502 => 4, + _ => 1, + } +} +pub fn size_TexGenfv(pname: u32) -> usize { + match pname { + 0x2500 => 1, + 0x2501 => 4, + 0x2502 => 4, + _ => 1, + } +} +pub fn size_TexGeniv(pname: u32) -> usize { + match pname { + 0x2500 => 1, + 0x2501 => 4, + 0x2502 => 4, + _ => 1, + } +} +pub fn size_TexParameterfv(pname: u32) -> usize { + match pname { + 0x1004 => 4, + 0x2800 => 1, + 0x2801 => 1, + 0x2802 => 1, + 0x2803 => 1, + 0x8072 => 1, + 0x809a => 1, + 0x809b => 1, + 0x8124 => 1, + 0x8125 => 1, + 0x813a => 1, + 0x813b => 1, + 0x813c => 1, + 0x813d => 1, + 0x8171 => 2, + 0x8172 => 1, + 0x8173 => 2, + 0x8174 => 3, + 0x8179 => 4, + 0x817a => 4, + 0x819a => 1, + 0x819b => 1, + _ => 1, + } +} +pub fn size_TexParameteriv(pname: u32) -> usize { + match pname { + 0x1004 => 4, + 0x2800 => 1, + 0x2801 => 1, + 0x2802 => 1, + 0x2803 => 1, + 0x8072 => 1, + 0x809a => 1, + 0x809b => 1, + 0x8124 => 1, + 0x8125 => 1, + 0x813a => 1, + 0x813b => 1, + 0x813c => 1, + 0x813d => 1, + 0x8171 => 2, + 0x8172 => 1, + 0x8173 => 2, + 0x8174 => 3, + 0x8179 => 4, + 0x817a => 4, + 0x819a => 1, + 0x819b => 1, + _ => 1, + } +} +pub fn get_count(pname: u32) -> usize { + match pname { + 0xb00 => 4, // GL_CURRENT_COLOR + 0xb02 => 3, // GL_CURRENT_NORMAL + 0xb03 => 4, // GL_CURRENT_TEXTURE_COORDS + 0xb04 => 4, // GL_CURRENT_RASTER_COLOR + 0xb06 => 4, // GL_CURRENT_RASTER_TEXTURE_COORDS + 0xb07 => 4, // GL_CURRENT_RASTER_POSITION + 0xb12 => 2, // GL_POINT_SIZE_RANGE + 0xb22 => 2, // GL_LINE_WIDTH_RANGE + 0xb40 => 2, // GL_POLYGON_MODE + 0xb53 => 4, // GL_LIGHT_MODEL_AMBIENT + 0xb66 => 4, // GL_FOG_COLOR + 0xb70 => 2, // GL_DEPTH_RANGE + 0xb80 => 4, // GL_ACCUM_CLEAR_VALUE + 0xba2 => 4, // GL_VIEWPORT + 0xba6 => 16, // GL_MODELVIEW_MATRIX + 0xba7 => 16, // GL_PROJECTION_MATRIX + 0xba8 => 16, // GL_TEXTURE_MATRIX + 0xc10 => 4, // GL_SCISSOR_BOX + 0xc22 => 4, // GL_COLOR_CLEAR_VALUE + 0xc23 => 4, // GL_COLOR_WRITEMASK + 0xd3a => 2, // GL_MAX_VIEWPORT_DIMS + 0xdd0 => 2, // GL_MAP1_GRID_DOMAIN + 0xdd2 => 4, // GL_MAP2_GRID_DOMAIN + 0xdd3 => 2, // GL_MAP2_GRID_SEGMENTS + 0x8005 => 4, // GL_BLEND_COLOR_EXT + 0x80b1 => 16, // GL_COLOR_MATRIX_SGI + 0x8129 => 3, // GL_DISTANCE_ATTENUATION_SGIS + 0x814a => 3, // GL_SPRITE_AXIS_SGIX + 0x814b => 3, // GL_SPRITE_TRANSLATION_SGIX + 0x817e => 4, // GL_REFERENCE_PLANE_EQUATION_SGIX + 0x8199 => 4, // GL_FOG_OFFSET_VALUE_SGIX + _ => 1, + } +} + +/// Run command `op`, whose bytes (header included) are `c`. +pub fn run(x: &mut Exec, op: usize, c: &[u8]) -> Option { + match op { + 0 => { // glAccum + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + x.resolve_read(); + let f = x.func(0)?; + let g: extern "C" fn(u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 1 => { // glAlphaFunc + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let f = x.func(1)?; + let g: extern "C" fn(u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 2 => { // glAreTexturesResident + let a0 = x.i32(c, 4) as i32; + let n1 = x.count((((a0 as i64)) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let a2 = x.addr(c, 20); + let c2 = (((a0 as i64)) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as u8; n2.max(1) + 16]; + let f = x.func(2)?; + let g: extern "C" fn(i32, *const u32, *mut u8) -> u8 = unsafe { std::mem::transmute(f) }; + let r = g(a0, x.ptr_of(v1), o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(r as u64) + } + 3 => { // glAreTexturesResidentEXT + let a0 = x.i32(c, 4) as i32; + let n1 = x.count((((a0 as i64)) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let a2 = x.addr(c, 20); + let c2 = (((a0 as i64)) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as u8; n2.max(1) + 16]; + let f = x.func(3)?; + let g: extern "C" fn(i32, *const u32, *mut u8) -> u8 = unsafe { std::mem::transmute(f) }; + let r = g(a0, x.ptr_of(v1), o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(r as u64) + } + 6 => { // glBegin + let a0 = x.i32(c, 4) as u32; + x.begin(a0); Some(0) + } + 7 => { // glBindTexture + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + x.bind_texture(a0, a1); Some(0) + } + 8 => { // glBindTextureEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + x.bind_texture(a0, a1); Some(0) + } + 9 => { // glBitmap + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let a4 = x.f32(c, 20); + let a5 = x.f32(c, 24); + let a6 = x.addr(c, 28); + let p6 = x.image(a6, &[a0 as i32, a1 as i32], 0u32 as u32, 0u32 as u32, true, false)?; + let f = x.func(9)?; + let g: extern "C" fn(i32, i32, f32, f32, f32, f32, *const u8) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_height(a1 as i32) as i32, a2, a3, a4, a5, p6 as *const u8); + x.image_done(); + Some(0) + } + 10 => { // glBlendColor + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(10)?; + let g: extern "C" fn(f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 11 => { // glBlendColorEXT + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(11)?; + let g: extern "C" fn(f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 12 => { // glBlendEquation + let a0 = x.i32(c, 4) as u32; + let f = x.func(12)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 13 => { // glBlendEquationEXT + let a0 = x.i32(c, 4) as u32; + let f = x.func(13)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 14 => { // glBlendFunc + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let f = x.func(14)?; + let g: extern "C" fn(u32, u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 15 => { // glCallList + let a0 = x.i32(c, 4) as u32; + let f = x.func(15)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 16 => { // glCallLists + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count((((a0 as i64)) as i64).max(0) as usize)?; + let w2 = x.arr_typed_padded(c, 12, a1 as u32, n2)?; + let v2 = &w2[..]; + let a2 = 0u64; + let f = x.func(16)?; + let g: extern "C" fn(i32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2) as *const c_void); + x.image_done(); + Some(0) + } + 17 => { // glClear + let a0 = x.i32(c, 4) as u32; + let f = x.func(17)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 18 => { // glClearAccum + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(18)?; + let g: extern "C" fn(f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 19 => { // glClearColor + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(19)?; + let g: extern "C" fn(f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 20 => { // glClearDepth + let a0 = x.f64(c, 8); + let f = x.func(20)?; + let g: extern "C" fn(f64) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 21 => { // glClearIndex + let a0 = x.f32(c, 4); + let f = x.func(21)?; + let g: extern "C" fn(f32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 22 => { // glClearStencil + let a0 = x.i32(c, 4) as i32; + let f = x.func(22)?; + let g: extern "C" fn(i32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 23 => { // glClipPlane + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((4) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(23)?; + let g: extern "C" fn(u32, *const f64) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 24 => { // glColor3b + let a0 = x.i32(c, 4) as i8; + let a1 = x.i32(c, 8) as i8; + let a2 = x.i32(c, 12) as i8; + let f = x.func(24)?; + let g: extern "C" fn(i8, i8, i8) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 25 => { // glColor3bv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(25)?; + let g: extern "C" fn(*const i8) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 26 => { // glColor3d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let f = x.func(26)?; + let g: extern "C" fn(f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 27 => { // glColor3dv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(27)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 28 => { // glColor3f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let f = x.func(28)?; + let g: extern "C" fn(f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 29 => { // glColor3fv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(29)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 30 => { // glColor3i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(30)?; + let g: extern "C" fn(i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 31 => { // glColor3iv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(31)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 32 => { // glColor3s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let f = x.func(32)?; + let g: extern "C" fn(i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 33 => { // glColor3sv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(33)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 34 => { // glColor3ub + let a0 = x.i32(c, 4) as u8; + let a1 = x.i32(c, 8) as u8; + let a2 = x.i32(c, 12) as u8; + let f = x.func(34)?; + let g: extern "C" fn(u8, u8, u8) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 35 => { // glColor3ubv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(35)?; + let g: extern "C" fn(*const u8) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 36 => { // glColor3ui + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u32; + let f = x.func(36)?; + let g: extern "C" fn(u32, u32, u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 37 => { // glColor3uiv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(37)?; + let g: extern "C" fn(*const u32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 38 => { // glColor3us + let a0 = x.i32(c, 4) as u16; + let a1 = x.i32(c, 8) as u16; + let a2 = x.i32(c, 12) as u16; + let f = x.func(38)?; + let g: extern "C" fn(u16, u16, u16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 39 => { // glColor3usv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(39)?; + let g: extern "C" fn(*const u16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 40 => { // glColor4b + let a0 = x.i32(c, 4) as i8; + let a1 = x.i32(c, 8) as i8; + let a2 = x.i32(c, 12) as i8; + let a3 = x.i32(c, 16) as i8; + let f = x.func(40)?; + let g: extern "C" fn(i8, i8, i8, i8) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 41 => { // glColor4bv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(41)?; + let g: extern "C" fn(*const i8) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 42 => { // glColor4d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let a3 = x.f64(c, 32); + let f = x.func(42)?; + let g: extern "C" fn(f64, f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 43 => { // glColor4dv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(43)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 44 => { // glColor4f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(44)?; + let g: extern "C" fn(f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 45 => { // glColor4fv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(45)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 46 => { // glColor4i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let f = x.func(46)?; + let g: extern "C" fn(i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 47 => { // glColor4iv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(47)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 48 => { // glColor4s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let a3 = x.i32(c, 16) as i16; + let f = x.func(48)?; + let g: extern "C" fn(i16, i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 49 => { // glColor4sv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(49)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 50 => { // glColor4ub + let a0 = x.i32(c, 4) as u8; + let a1 = x.i32(c, 8) as u8; + let a2 = x.i32(c, 12) as u8; + let a3 = x.i32(c, 16) as u8; + let f = x.func(50)?; + let g: extern "C" fn(u8, u8, u8, u8) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 51 => { // glColor4ubv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(51)?; + let g: extern "C" fn(*const u8) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 52 => { // glColor4ui + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as u32; + let f = x.func(52)?; + let g: extern "C" fn(u32, u32, u32, u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 53 => { // glColor4uiv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(53)?; + let g: extern "C" fn(*const u32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 54 => { // glColor4us + let a0 = x.i32(c, 4) as u16; + let a1 = x.i32(c, 8) as u16; + let a2 = x.i32(c, 12) as u16; + let a3 = x.i32(c, 16) as u16; + let f = x.func(54)?; + let g: extern "C" fn(u16, u16, u16, u16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 55 => { // glColor4usv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(55)?; + let g: extern "C" fn(*const u16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 56 => { // glColorMask + let a0 = x.i32(c, 4) as u8; + let a1 = x.i32(c, 8) as u8; + let a2 = x.i32(c, 12) as u8; + let a3 = x.i32(c, 16) as u8; + let f = x.func(56)?; + let g: extern "C" fn(u8, u8, u8, u8) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 57 => { // glColorMaterial + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let f = x.func(57)?; + let g: extern "C" fn(u32, u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 58 => { // glColorPointer + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.addr(c, 16); + x.array_pointer(2, a0 as i32, a1 as u32, a2 as i32, a3); Some(0) + } + 59 => { // glColorPointerEXT + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.addr(c, 20); + x.array_pointer(2, a0 as i32, a1 as u32, a2 as i32, a4); Some(0) + } + 60 => { // glColorSubTable + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.addr(c, 24); + let p5 = x.image(a5, &[a2 as i32], a3 as u32, a4 as u32, false, false)?; + let f = x.func(60)?; + let g: extern "C" fn(u32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, x.gl_format(a3), x.gl_type(a3, a4), p5 as *const c_void); + x.image_done(); + Some(0) + } + 61 => { // glColorTable + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.addr(c, 24); + let p5 = x.image(a5, &[a2 as i32], a3 as u32, a4 as u32, false, false)?; + if !x.color_table(a0, a2, p5 as *const u8, a3, a4) { + let f = x.func(61)?; + let g: extern "C" fn(u32, u32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, x.gl_format(a3), x.gl_type(a3, a4), p5 as *const c_void); + } + x.image_done(); + Some(0) + } + 62 => { // glColorTableParameterfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_ColorTableParameterfvSGI(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(62)?; + let g: extern "C" fn(u32, u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 63 => { // glColorTableParameterfvSGI + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_ColorTableParameterfvSGI(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(63)?; + let g: extern "C" fn(u32, u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 64 => { // glColorTableParameteriv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_ColorTableParameterivSGI(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(64)?; + let g: extern "C" fn(u32, u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 65 => { // glColorTableParameterivSGI + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_ColorTableParameterivSGI(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(65)?; + let g: extern "C" fn(u32, u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 66 => { // glColorTableSGI + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.addr(c, 24); + let p5 = x.image(a5, &[a2 as i32], a3 as u32, a4 as u32, false, false)?; + if !x.color_table(a0, a2, p5 as *const u8, a3, a4) { + let f = x.func(66)?; + let g: extern "C" fn(u32, u32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, x.gl_format(a3), x.gl_type(a3, a4), p5 as *const c_void); + } + x.image_done(); + Some(0) + } + 67 => { // glConvolutionFilter1D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.addr(c, 24); + let p5 = x.image(a5, &[a2 as i32], a3 as u32, a4 as u32, false, false)?; + let f = x.func(67)?; + let g: extern "C" fn(u32, u32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, x.gl_format(a3), x.gl_type(a3, a4), p5 as *const c_void); + x.image_done(); + Some(0) + } + 68 => { // glConvolutionFilter1DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.addr(c, 24); + let p5 = x.image(a5, &[a2 as i32], a3 as u32, a4 as u32, false, false)?; + let f = x.func(68)?; + let g: extern "C" fn(u32, u32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, x.gl_format(a3), x.gl_type(a3, a4), p5 as *const c_void); + x.image_done(); + Some(0) + } + 69 => { // glConvolutionFilter2D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.i32(c, 24) as u32; + let a6 = x.addr(c, 28); + let p6 = x.image(a6, &[a2 as i32, a3 as i32], a4 as u32, a5 as u32, false, false)?; + let f = x.func(69)?; + let g: extern "C" fn(u32, u32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, x.gl_height(a3 as i32) as i32, x.gl_format(a4), x.gl_type(a4, a5), p6 as *const c_void); + x.image_done(); + Some(0) + } + 70 => { // glConvolutionFilter2DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.i32(c, 24) as u32; + let a6 = x.addr(c, 28); + let p6 = x.image(a6, &[a2 as i32, a3 as i32], a4 as u32, a5 as u32, false, false)?; + let f = x.func(70)?; + let g: extern "C" fn(u32, u32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, x.gl_height(a3 as i32) as i32, x.gl_format(a4), x.gl_type(a4, a5), p6 as *const c_void); + x.image_done(); + Some(0) + } + 71 => { // glConvolutionParameterf + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.f32(c, 12); + let f = x.func(71)?; + let g: extern "C" fn(u32, u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 72 => { // glConvolutionParameterfEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.f32(c, 12); + let f = x.func(72)?; + let g: extern "C" fn(u32, u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 73 => { // glConvolutionParameterfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_ConvolutionParameterfvEXT(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(73)?; + let g: extern "C" fn(u32, u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 74 => { // glConvolutionParameterfvEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_ConvolutionParameterfvEXT(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(74)?; + let g: extern "C" fn(u32, u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 75 => { // glConvolutionParameteri + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(75)?; + let g: extern "C" fn(u32, u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 76 => { // glConvolutionParameteriEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(76)?; + let g: extern "C" fn(u32, u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 77 => { // glConvolutionParameteriv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_ConvolutionParameterivEXT(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(77)?; + let g: extern "C" fn(u32, u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 78 => { // glConvolutionParameterivEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_ConvolutionParameterivEXT(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(78)?; + let g: extern "C" fn(u32, u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 79 => { // glCopyColorSubTable + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + x.resolve_read(); + let f = x.func(79)?; + let g: extern "C" fn(u32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4); + x.image_done(); + Some(0) + } + 80 => { // glCopyColorTable + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + x.resolve_read(); + let f = x.func(80)?; + let g: extern "C" fn(u32, u32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, a3, a4); + x.image_done(); + Some(0) + } + 81 => { // glCopyColorTableSGI + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + x.resolve_read(); + let f = x.func(81)?; + let g: extern "C" fn(u32, u32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, a3, a4); + x.image_done(); + Some(0) + } + 82 => { // glCopyConvolutionFilter1D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + x.resolve_read(); + let f = x.func(82)?; + let g: extern "C" fn(u32, u32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, a3, a4); + x.image_done(); + Some(0) + } + 83 => { // glCopyConvolutionFilter1DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + x.resolve_read(); + let f = x.func(83)?; + let g: extern "C" fn(u32, u32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, a3, a4); + x.image_done(); + Some(0) + } + 84 => { // glCopyConvolutionFilter2D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + x.resolve_read(); + let f = x.func(84)?; + let g: extern "C" fn(u32, u32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, a3, a4, a5); + x.image_done(); + Some(0) + } + 85 => { // glCopyConvolutionFilter2DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + x.resolve_read(); + let f = x.func(85)?; + let g: extern "C" fn(u32, u32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, a3, a4, a5); + x.image_done(); + Some(0) + } + 86 => { // glCopyPixels + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as u32; + x.resolve_read(); + let f = x.func(86)?; + let g: extern "C" fn(i32, i32, i32, i32, u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4); + x.image_done(); + Some(0) + } + 87 => { // glCopyTexImage1D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + x.resolve_read(); + let f = x.func(87)?; + let g: extern "C" fn(u32, i32, u32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_internal(a2 as i32) as u32, a3, a4, a5, a6); + x.image_done(); + Some(0) + } + 88 => { // glCopyTexImage1DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + x.resolve_read(); + let f = x.func(88)?; + let g: extern "C" fn(u32, i32, u32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_internal(a2 as i32) as u32, a3, a4, a5, a6); + x.image_done(); + Some(0) + } + 89 => { // glCopyTexImage2D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as i32; + x.resolve_read(); + let f = x.func(89)?; + let g: extern "C" fn(u32, i32, u32, i32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_internal(a2 as i32) as u32, a3, a4, a5, a6, a7); + x.image_done(); + Some(0) + } + 90 => { // glCopyTexImage2DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as i32; + x.resolve_read(); + let f = x.func(90)?; + let g: extern "C" fn(u32, i32, u32, i32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_internal(a2 as i32) as u32, a3, a4, a5, a6, a7); + x.image_done(); + Some(0) + } + 91 => { // glCopyTexSubImage1D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + x.resolve_read(); + let f = x.func(91)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5); + x.image_done(); + Some(0) + } + 92 => { // glCopyTexSubImage1DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + x.resolve_read(); + let f = x.func(92)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5); + x.image_done(); + Some(0) + } + 93 => { // glCopyTexSubImage2D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as i32; + x.resolve_read(); + let f = x.func(93)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, a6, a7); + x.image_done(); + Some(0) + } + 94 => { // glCopyTexSubImage2DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as i32; + x.resolve_read(); + let f = x.func(94)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, a6, a7); + x.image_done(); + Some(0) + } + 95 => { // glCopyTexSubImage3D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as i32; + let a8 = x.i32(c, 36) as i32; + x.resolve_read(); + let f = x.func(95)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, a6, a7, a8); + x.image_done(); + Some(0) + } + 96 => { // glCopyTexSubImage3DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as i32; + let a8 = x.i32(c, 36) as i32; + x.resolve_read(); + let f = x.func(96)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, a6, a7, a8); + x.image_done(); + Some(0) + } + 97 => { // glCullFace + let a0 = x.i32(c, 4) as u32; + let f = x.func(97)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 98 => { // glDeformSGIX + let a0 = x.i32(c, 4) as u32; + let f = x.func(98)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 99 => { // glDeformationMap3dSGIX + let a0 = x.i32(c, 4) as u32; + let a1 = x.f64(c, 8); + let a2 = x.f64(c, 16); + let a3 = x.i32(c, 24) as i32; + let a4 = x.i32(c, 28) as i32; + let a5 = x.f64(c, 32); + let a6 = x.f64(c, 40); + let a7 = x.i32(c, 48) as i32; + let a8 = x.i32(c, 52) as i32; + let a9 = x.f64(c, 56); + let a10 = x.f64(c, 64); + let a11 = x.i32(c, 72) as i32; + let a12 = x.i32(c, 76) as i32; + let n13 = x.count((if a4 > 0 && a8 > 0 && a12 > 0 { ((a4 as i64 - 1) * (a3 as i64) + (a8 as i64 - 1) * (a7 as i64) + (a12 as i64 - 1) * (a11 as i64) + super::exec::map_components(a0 as u32)).max(0) as usize } else { 0 }))?; + let w13 = x.arr_padded::(c, 80, n13)?; + let v13 = &w13[..n13]; + let a13 = 0u64; + let f = x.func(99)?; + let g: extern "C" fn(u32, f64, f64, i32, i32, f64, f64, i32, i32, f64, f64, i32, i32, *const f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, x.ptr_of(v13)); + x.image_done(); + Some(0) + } + 100 => { // glDeformationMap3fSGIX + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.f32(c, 24); + let a6 = x.f32(c, 28); + let a7 = x.i32(c, 32) as i32; + let a8 = x.i32(c, 36) as i32; + let a9 = x.f32(c, 40); + let a10 = x.f32(c, 44); + let a11 = x.i32(c, 48) as i32; + let a12 = x.i32(c, 52) as i32; + let n13 = x.count((if a4 > 0 && a8 > 0 && a12 > 0 { ((a4 as i64 - 1) * (a3 as i64) + (a8 as i64 - 1) * (a7 as i64) + (a12 as i64 - 1) * (a11 as i64) + super::exec::map_components(a0 as u32)).max(0) as usize } else { 0 }))?; + let w13 = x.arr_padded::(c, 56, n13)?; + let v13 = &w13[..n13]; + let a13 = 0u64; + let f = x.func(100)?; + let g: extern "C" fn(u32, f32, f32, i32, i32, f32, f32, i32, i32, f32, f32, i32, i32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, x.ptr_of(v13)); + x.image_done(); + Some(0) + } + 101 => { // glDeleteLists + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let f = x.func(101)?; + let g: extern "C" fn(u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 102 => { // glDeleteTextures + let a0 = x.i32(c, 4) as i32; + let n1 = x.count((((a0 as i64)) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(102)?; + let g: extern "C" fn(i32, *const u32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 103 => { // glDeleteTexturesEXT + let a0 = x.i32(c, 4) as i32; + let n1 = x.count((((a0 as i64)) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(103)?; + let g: extern "C" fn(i32, *const u32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 104 => { // glDepthFunc + let a0 = x.i32(c, 4) as u32; + let f = x.func(104)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 105 => { // glDepthMask + let a0 = x.i32(c, 4) as u8; + let f = x.func(105)?; + let g: extern "C" fn(u8) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 106 => { // glDepthRange + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let f = x.func(106)?; + let g: extern "C" fn(f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 107 => { // glDetailTexFuncSGIS + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let n2 = x.count((((a1 as i64)*2) as i64).max(0) as usize)?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + x.detail_func(&v2); Some(0) + } + 108 => { // glDisable + let a0 = x.i32(c, 4) as u32; + x.set_enable(a0, false); Some(0) + } + 109 => { // glDisableClientState + let a0 = x.i32(c, 4) as u32; + x.client_state(a0, false); Some(0) + } + 110 => { // glDrawArrays + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + x.draw_arrays(a0, a1, a2); Some(0) + } + 111 => { // glDrawArraysEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + x.draw_arrays(a0, a1, a2); Some(0) + } + 112 => { // glDrawBuffer + let a0 = x.i32(c, 4) as u32; + x.color_buffer(true, a0); Some(0) + } + 113 => { // glDrawElements + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.addr(c, 16); + x.draw_elements(a0, a1, a2, a3); Some(0) + } + 114 => { // glDrawPixels + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.addr(c, 20); + let p4 = x.image(a4, &[a0 as i32, a1 as i32], a2 as u32, a3 as u32, false, false)?; + if !x.draw_pixels(a0, a1, a2, a3, p4 as *const c_void) { + let f = x.func(114)?; + let g: extern "C" fn(i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_height(a1 as i32) as i32, x.gl_format(a2), x.gl_type(a2, a3), p4 as *const c_void); + } + x.image_done(); + Some(0) + } + 115 => { // glDrawRangeElements + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.addr(c, 24); + x.draw_elements(a0, a3, a4, a5); Some(0) + } + 116 => { // glEdgeFlag + let a0 = x.i32(c, 4) as u8; + let f = x.func(116)?; + let g: extern "C" fn(u8) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 117 => { // glEdgeFlagPointer + let a0 = x.i32(c, 4) as i32; + let a1 = x.addr(c, 8); + x.array_pointer(5, 1 as i32, 0x1401 as u32, a0 as i32, a1); Some(0) + } + 118 => { // glEdgeFlagPointerEXT + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.addr(c, 12); + x.array_pointer(5, 1 as i32, 0x1401 as u32, a0 as i32, a2); Some(0) + } + 119 => { // glEdgeFlagv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(119)?; + let g: extern "C" fn(*const u8) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 120 => { // glEnable + let a0 = x.i32(c, 4) as u32; + x.set_enable(a0, true); Some(0) + } + 121 => { // glEnableClientState + let a0 = x.i32(c, 4) as u32; + x.client_state(a0, true); Some(0) + } + 122 => { // glEnd + x.end(); Some(0) + } + 123 => { // glEndList + let f = x.func(123)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 124 => { // glEvalCoord1d + let a0 = x.f64(c, 8); + let f = x.func(124)?; + let g: extern "C" fn(f64) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 125 => { // glEvalCoord1dv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(125)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 126 => { // glEvalCoord1f + let a0 = x.f32(c, 4); + let f = x.func(126)?; + let g: extern "C" fn(f32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 127 => { // glEvalCoord1fv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(127)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 128 => { // glEvalCoord2d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let f = x.func(128)?; + let g: extern "C" fn(f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 129 => { // glEvalCoord2dv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(129)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 130 => { // glEvalCoord2f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let f = x.func(130)?; + let g: extern "C" fn(f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 131 => { // glEvalCoord2fv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(131)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 132 => { // glEvalMesh1 + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(132)?; + let g: extern "C" fn(u32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 133 => { // glEvalMesh2 + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let f = x.func(133)?; + let g: extern "C" fn(u32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4); + x.image_done(); + Some(0) + } + 134 => { // glEvalPoint1 + let a0 = x.i32(c, 4) as i32; + let f = x.func(134)?; + let g: extern "C" fn(i32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 135 => { // glEvalPoint2 + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let f = x.func(135)?; + let g: extern "C" fn(i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 136 => { // glFeedbackBuffer + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + x.feedback_buffer(a0, a1, a2); Some(0) + } + 139 => { // glFlushRasterSGIX + let f = x.func(139)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 140 => { // glFogFuncSGIS + let a0 = x.i32(c, 4) as i32; + let n1 = x.count((((a0 as i64)*2) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + x.fog_func(&v1); Some(0) + } + 141 => { // glFogf + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + if !x.fog(a0, &[a1]) { + let f = x.func(141)?; + let g: extern "C" fn(u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + } + x.image_done(); + Some(0) + } + 142 => { // glFogfv + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(size_Fogfv(a0 as u32))?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + if !x.fog(a0, &v1) { + let f = x.func(142)?; + let g: extern "C" fn(u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + } + x.image_done(); + Some(0) + } + 143 => { // glFogi + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + if !x.fog(a0, &[a1 as f32]) { + let f = x.func(143)?; + let g: extern "C" fn(u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + } + x.image_done(); + Some(0) + } + 144 => { // glFogiv + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(size_Fogiv(a0 as u32))?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(144)?; + let g: extern "C" fn(u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 145 => { // glFrameZoomSGIX + let a0 = x.i32(c, 4) as i32; + let f = x.func(145)?; + let g: extern "C" fn(i32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 146 => { // glFrontFace + let a0 = x.i32(c, 4) as u32; + let f = x.func(146)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 147 => { // glFrustum + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let a3 = x.f64(c, 32); + let a4 = x.f64(c, 40); + let a5 = x.f64(c, 48); + let f = x.func(147)?; + let g: extern "C" fn(f64, f64, f64, f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5); + x.image_done(); + Some(0) + } + 148 => { // glGenLists + let a0 = x.i32(c, 4) as i32; + let f = x.func(148)?; + let g: extern "C" fn(i32) -> u32 = unsafe { std::mem::transmute(f) }; + let r = g(a0); + x.image_done(); + Some(r as u64) + } + 149 => { // glGenTextures + let a0 = x.i32(c, 4) as i32; + let a1 = x.addr(c, 8); + let c1 = (((a0 as i64)) as i64).max(0) as usize; + let n1 = x.count(c1)?; + let mut o1 = vec![0 as u32; n1.max(1) + 16]; + let f = x.func(149)?; + let g: extern "C" fn(i32, *mut u32) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 150 => { // glGenTexturesEXT + let a0 = x.i32(c, 4) as i32; + let a1 = x.addr(c, 8); + let c1 = (((a0 as i64)) as i64).max(0) as usize; + let n1 = x.count(c1)?; + let mut o1 = vec![0 as u32; n1.max(1) + 16]; + let f = x.func(150)?; + let g: extern "C" fn(i32, *mut u32) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 151 => { // glGetBooleanv + let a0 = x.i32(c, 4) as u32; + let a1 = x.addr(c, 8); + let c1 = get_count(a0 as u32); + let n1 = x.count(c1)?; + let mut o1 = vec![0 as u8; n1.max(1) + 16]; + let f = x.func(151)?; + let g: extern "C" fn(u32, *mut u8) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.get_limit(a0, &mut o1); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 152 => { // glGetClipPlane + let a0 = x.i32(c, 4) as u32; + let a1 = x.addr(c, 8); + let c1 = ((4) as i64).max(0) as usize; + let n1 = x.count(c1)?; + let mut o1 = vec![0 as f64; n1.max(1) + 16]; + let f = x.func(152)?; + let g: extern "C" fn(u32, *mut f64) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 153 => { // glGetColorTable + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.addr(c, 16); + let d3 = x.dims_from("ColorTable", &[a0 as i32]); + let p3 = x.image(a3, &d3, a1 as u32, a2 as u32, false, true)?; + let f = x.func(153)?; + let g: extern "C" fn(u32, u32, u32, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_format(a1), x.gl_type(a1, a2), p3 as *mut c_void); + x.image_done(); + Some(0) + } + 154 => { // glGetColorTableParameterfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_ColorTableParameterfvSGI(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(154)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 155 => { // glGetColorTableParameterfvSGI + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_ColorTableParameterfvSGI(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(155)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 156 => { // glGetColorTableParameteriv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_ColorTableParameterivSGI(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(156)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 157 => { // glGetColorTableParameterivSGI + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_ColorTableParameterivSGI(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(157)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 158 => { // glGetColorTableSGI + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.addr(c, 16); + let d3 = x.dims_from("ColorTable", &[a0 as i32]); + let p3 = x.image(a3, &d3, a1 as u32, a2 as u32, false, true)?; + let f = x.func(158)?; + let g: extern "C" fn(u32, u32, u32, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_format(a1), x.gl_type(a1, a2), p3 as *mut c_void); + x.image_done(); + Some(0) + } + 159 => { // glGetConvolutionFilter + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.addr(c, 16); + let d3 = x.dims_from("ConvolutionFilter", &[a0 as i32]); + let p3 = x.image(a3, &d3, a1 as u32, a2 as u32, false, true)?; + let f = x.func(159)?; + let g: extern "C" fn(u32, u32, u32, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_format(a1), x.gl_type(a1, a2), p3 as *mut c_void); + x.image_done(); + Some(0) + } + 160 => { // glGetConvolutionFilterEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.addr(c, 16); + let d3 = x.dims_from("ConvolutionFilter", &[a0 as i32]); + let p3 = x.image(a3, &d3, a1 as u32, a2 as u32, false, true)?; + let f = x.func(160)?; + let g: extern "C" fn(u32, u32, u32, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_format(a1), x.gl_type(a1, a2), p3 as *mut c_void); + x.image_done(); + Some(0) + } + 161 => { // glGetConvolutionParameterfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_ConvolutionParameterfvEXT(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(161)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 162 => { // glGetConvolutionParameterfvEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_ConvolutionParameterfvEXT(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(162)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 163 => { // glGetConvolutionParameteriv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_ConvolutionParameterivEXT(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(163)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 164 => { // glGetConvolutionParameterivEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_ConvolutionParameterivEXT(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(164)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 165 => { // glGetDetailTexFuncSGIS + let a0 = x.i32(c, 4) as u32; + let a1 = x.addr(c, 8); + let c1 = { x.unsupported(165); 0 }; + let n1 = x.count(c1)?; + let mut o1 = vec![0 as f32; n1.max(1) + 16]; + let f = x.func(165)?; + let g: extern "C" fn(u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 166 => { // glGetDoublev + let a0 = x.i32(c, 4) as u32; + let a1 = x.addr(c, 8); + let c1 = get_count(a0 as u32); + let n1 = x.count(c1)?; + let mut o1 = vec![0 as f64; n1.max(1) + 16]; + let f = x.func(166)?; + let g: extern "C" fn(u32, *mut f64) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.get_limit(a0, &mut o1); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 167 => { // glGetError + Some(x.get_error() as u64) + } + 168 => { // glGetFloatv + let a0 = x.i32(c, 4) as u32; + let a1 = x.addr(c, 8); + let c1 = get_count(a0 as u32); + let n1 = x.count(c1)?; + let mut o1 = vec![0 as f32; n1.max(1) + 16]; + let f = x.func(168)?; + let g: extern "C" fn(u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.get_limit(a0, &mut o1); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 169 => { // glGetHistogram + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u8; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.addr(c, 20); + let d4 = x.dims_from("Histogram", &[a0 as i32]); + let p4 = x.image(a4, &d4, a2 as u32, a3 as u32, false, true)?; + let f = x.func(169)?; + let g: extern "C" fn(u32, u8, u32, u32, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_format(a2), x.gl_type(a2, a3), p4 as *mut c_void); + x.image_done(); + Some(0) + } + 170 => { // glGetHistogramEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u8; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.addr(c, 20); + let d4 = x.dims_from("Histogram", &[a0 as i32]); + let p4 = x.image(a4, &d4, a2 as u32, a3 as u32, false, true)?; + let f = x.func(170)?; + let g: extern "C" fn(u32, u8, u32, u32, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_format(a2), x.gl_type(a2, a3), p4 as *mut c_void); + x.image_done(); + Some(0) + } + 171 => { // glGetHistogramParameterfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = ((1) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(171)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 172 => { // glGetHistogramParameterfvEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = ((1) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(172)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 173 => { // glGetHistogramParameteriv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = ((1) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(173)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 174 => { // glGetHistogramParameterivEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = ((1) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(174)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 175 => { // glGetInstrumentsSGIX + let f = x.func(175)?; + let g: extern "C" fn() -> i32 = unsafe { std::mem::transmute(f) }; + let r = g(); + x.image_done(); + Some(r as u64) + } + 176 => { // glGetIntegerv + let a0 = x.i32(c, 4) as u32; + let a1 = x.addr(c, 8); + let c1 = get_count(a0 as u32); + let n1 = x.count(c1)?; + let mut o1 = vec![0 as i32; n1.max(1) + 16]; + let f = x.func(176)?; + let g: extern "C" fn(u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.get_limit(a0, &mut o1); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 177 => { // glGetLightfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_Lightfv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(177)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 178 => { // glGetLightiv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_Lightiv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(178)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 179 => { // glGetListParameterfvSGIX + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = ((1) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(179)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 180 => { // glGetListParameterivSGIX + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = ((1) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(180)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 181 => { // glGetMapdv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = x.mapquery_count(a0 as u32, a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f64; n2.max(1) + 16]; + let f = x.func(181)?; + let g: extern "C" fn(u32, u32, *mut f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 182 => { // glGetMapfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = x.mapquery_count(a0 as u32, a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(182)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 183 => { // glGetMapiv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = x.mapquery_count(a0 as u32, a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(183)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 184 => { // glGetMaterialfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_Materialfv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(184)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 185 => { // glGetMaterialiv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_Materialiv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(185)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 186 => { // glGetMinmax + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u8; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.addr(c, 20); + let d4 = x.dims_from("Minmax", &[a0 as i32]); + let p4 = x.image(a4, &d4, a2 as u32, a3 as u32, false, true)?; + let f = x.func(186)?; + let g: extern "C" fn(u32, u8, u32, u32, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_format(a2), x.gl_type(a2, a3), p4 as *mut c_void); + x.image_done(); + Some(0) + } + 187 => { // glGetMinmaxEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u8; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.addr(c, 20); + let d4 = x.dims_from("Minmax", &[a0 as i32]); + let p4 = x.image(a4, &d4, a2 as u32, a3 as u32, false, true)?; + let f = x.func(187)?; + let g: extern "C" fn(u32, u8, u32, u32, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_format(a2), x.gl_type(a2, a3), p4 as *mut c_void); + x.image_done(); + Some(0) + } + 188 => { // glGetMinmaxParameterfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = ((1) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(188)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 189 => { // glGetMinmaxParameterfvEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = ((1) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(189)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 190 => { // glGetMinmaxParameteriv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = ((1) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(190)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 191 => { // glGetMinmaxParameterivEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = ((1) as i64).max(0) as usize; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(191)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 192 => { // glGetPixelMapfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.addr(c, 8); + let c1 = x.pixelmap_size(a0 as u32); + let n1 = x.count(c1)?; + let mut o1 = vec![0 as f32; n1.max(1) + 16]; + let f = x.func(192)?; + let g: extern "C" fn(u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 193 => { // glGetPixelMapuiv + let a0 = x.i32(c, 4) as u32; + let a1 = x.addr(c, 8); + let c1 = x.pixelmap_size(a0 as u32); + let n1 = x.count(c1)?; + let mut o1 = vec![0 as u32; n1.max(1) + 16]; + let f = x.func(193)?; + let g: extern "C" fn(u32, *mut u32) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 194 => { // glGetPixelMapusv + let a0 = x.i32(c, 4) as u32; + let a1 = x.addr(c, 8); + let c1 = x.pixelmap_size(a0 as u32); + let n1 = x.count(c1)?; + let mut o1 = vec![0 as u16; n1.max(1) + 16]; + let f = x.func(194)?; + let g: extern "C" fn(u32, *mut u16) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 197 => { // glGetPolygonStipple + let a0 = x.addr(c, 4); + let p0 = x.image(a0, &[32, 32], 0u32 as u32, 0u32 as u32, true, true)?; + let f = x.func(197)?; + let g: extern "C" fn(*mut u8) = unsafe { std::mem::transmute(f) }; + g(p0 as *mut u8); + x.image_done(); + Some(0) + } + 198 => { // glGetSeparableFilter + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.addr(c, 16); + let d3 = x.dims_from("SeparableFilter.row", &[a0 as i32]); + let p3 = x.image(a3, &d3, a1 as u32, a2 as u32, false, true)?; + let a4 = x.addr(c, 24); + let d4 = x.dims_from("SeparableFilter.column", &[a0 as i32]); + let p4 = x.image(a4, &d4, a1 as u32, a2 as u32, false, true)?; + let a5 = x.addr(c, 32); + let d5 = x.dims_from("SeparableFilter.span", &[a0 as i32]); + let p5 = x.image(a5, &d5, a1 as u32, a2 as u32, false, true)?; + let f = x.func(198)?; + let g: extern "C" fn(u32, u32, u32, *mut c_void, *mut c_void, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_format(a1), x.gl_type(a1, a2), p3 as *mut c_void, p4 as *mut c_void, p5 as *mut c_void); + x.image_done(); + Some(0) + } + 199 => { // glGetSeparableFilterEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.addr(c, 16); + let d3 = x.dims_from("SeparableFilter.row", &[a0 as i32]); + let p3 = x.image(a3, &d3, a1 as u32, a2 as u32, false, true)?; + let a4 = x.addr(c, 24); + let d4 = x.dims_from("SeparableFilter.column", &[a0 as i32]); + let p4 = x.image(a4, &d4, a1 as u32, a2 as u32, false, true)?; + let a5 = x.addr(c, 32); + let d5 = x.dims_from("SeparableFilter.span", &[a0 as i32]); + let p5 = x.image(a5, &d5, a1 as u32, a2 as u32, false, true)?; + let f = x.func(199)?; + let g: extern "C" fn(u32, u32, u32, *mut c_void, *mut c_void, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_format(a1), x.gl_type(a1, a2), p3 as *mut c_void, p4 as *mut c_void, p5 as *mut c_void); + x.image_done(); + Some(0) + } + 200 => { // glGetSharpenTexFuncSGIS + let a0 = x.i32(c, 4) as u32; + let a1 = x.addr(c, 8); + let c1 = { x.unsupported(200); 0 }; + let n1 = x.count(c1)?; + let mut o1 = vec![0 as f32; n1.max(1) + 16]; + let f = x.func(200)?; + let g: extern "C" fn(u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, o1.as_mut_ptr()); + x.put::(a1, &o1[..n1])?; + x.image_done(); + Some(0) + } + 202 => { // glGetTexEnvfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_TexEnvfv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(202)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 203 => { // glGetTexEnviv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_TexEnviv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(203)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 204 => { // glGetTexFilterFuncSGIS + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = { x.unsupported(204); 0 }; + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(204)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 205 => { // glGetTexGendv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_TexGendv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f64; n2.max(1) + 16]; + let f = x.func(205)?; + let g: extern "C" fn(u32, u32, *mut f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 206 => { // glGetTexGenfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_TexGenfv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + let f = x.func(206)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 207 => { // glGetTexGeniv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_TexGeniv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(207)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 208 => { // glGetTexImage + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as u32; + let a4 = x.addr(c, 20); + let d4 = x.dims_from("TexImage", &[a0 as i32, a1 as i32]); + let p4 = x.image(a4, &d4, a2 as u32, a3 as u32, false, true)?; + let f = x.func(208)?; + let g: extern "C" fn(u32, i32, u32, u32, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_format(a2), x.gl_type(a2, a3), p4 as *mut c_void); + x.image_done(); + Some(0) + } + 209 => { // glGetTexLevelParameterfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.addr(c, 16); + let c3 = ((1) as i64).max(0) as usize; + let n3 = x.count(c3)?; + let mut o3 = vec![0 as f32; n3.max(1) + 16]; + let f = x.func(209)?; + let g: extern "C" fn(u32, i32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, o3.as_mut_ptr()); + x.put::(a3, &o3[..n3])?; + x.image_done(); + Some(0) + } + 210 => { // glGetTexLevelParameteriv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.addr(c, 16); + let c3 = ((1) as i64).max(0) as usize; + let n3 = x.count(c3)?; + let mut o3 = vec![0 as i32; n3.max(1) + 16]; + let f = x.func(210)?; + let g: extern "C" fn(u32, i32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, o3.as_mut_ptr()); + x.put::(a3, &o3[..n3])?; + x.image_done(); + Some(0) + } + 211 => { // glGetTexParameterfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_TexParameterfv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as f32; n2.max(1) + 16]; + if !x.get_tex_parameter(a1, &mut o2) { + let f = x.func(211)?; + let g: extern "C" fn(u32, u32, *mut f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + } + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 212 => { // glGetTexParameteriv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.addr(c, 12); + let c2 = size_TexParameteriv(a1 as u32); + let n2 = x.count(c2)?; + let mut o2 = vec![0 as i32; n2.max(1) + 16]; + let f = x.func(212)?; + let g: extern "C" fn(u32, u32, *mut i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, o2.as_mut_ptr()); + x.put::(a2, &o2[..n2])?; + x.image_done(); + Some(0) + } + 213 => { // glHint + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let f = x.func(213)?; + let g: extern "C" fn(u32, u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 214 => { // glHistogram + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as u8; + let f = x.func(214)?; + let g: extern "C" fn(u32, i32, u32, u8) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_internal(a2 as i32) as u32, a3); + x.image_done(); + Some(0) + } + 215 => { // glHistogramEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as u8; + let f = x.func(215)?; + let g: extern "C" fn(u32, i32, u32, u8) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_internal(a2 as i32) as u32, a3); + x.image_done(); + Some(0) + } + 216 => { // glIndexMask + let a0 = x.i32(c, 4) as u32; + let f = x.func(216)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 217 => { // glIndexPointer + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.addr(c, 12); + x.array_pointer(3, 1 as i32, a0 as u32, a1 as i32, a2); Some(0) + } + 218 => { // glIndexPointerEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.addr(c, 16); + x.array_pointer(3, 1 as i32, a0 as u32, a1 as i32, a3); Some(0) + } + 219 => { // glIndexd + let a0 = x.f64(c, 8); + let f = x.func(219)?; + let g: extern "C" fn(f64) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 220 => { // glIndexdv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(220)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 221 => { // glIndexf + let a0 = x.f32(c, 4); + let f = x.func(221)?; + let g: extern "C" fn(f32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 222 => { // glIndexfv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(222)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 223 => { // glIndexi + let a0 = x.i32(c, 4) as i32; + let f = x.func(223)?; + let g: extern "C" fn(i32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 224 => { // glIndexiv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(224)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 225 => { // glIndexs + let a0 = x.i32(c, 4) as i16; + let f = x.func(225)?; + let g: extern "C" fn(i16) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 226 => { // glIndexsv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(226)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 227 => { // glIndexub + let a0 = x.i32(c, 4) as u8; + let f = x.func(227)?; + let g: extern "C" fn(u8) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 228 => { // glIndexubv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(228)?; + let g: extern "C" fn(*const u8) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 229 => { // glInitNames + let f = x.func(229)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 230 => { // glInstrumentsBufferSGIX + let a0 = x.i32(c, 4) as i32; + let a1 = x.addr(c, 8); + let f = x.func(230)?; + let g: extern "C" fn(i32, u64) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 231 => { // glInterleavedArrays + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.addr(c, 12); + x.interleaved(a0, a1, a2); Some(0) + } + 232 => { // glIsEnabled + let a0 = x.i32(c, 4) as u32; + Some(x.is_enabled(a0) as u64) + } + 233 => { // glIsList + let a0 = x.i32(c, 4) as u32; + let f = x.func(233)?; + let g: extern "C" fn(u32) -> u8 = unsafe { std::mem::transmute(f) }; + let r = g(a0); + x.image_done(); + Some(r as u64) + } + 234 => { // glIsTexture + let a0 = x.i32(c, 4) as u32; + let f = x.func(234)?; + let g: extern "C" fn(u32) -> u8 = unsafe { std::mem::transmute(f) }; + let r = g(a0); + x.image_done(); + Some(r as u64) + } + 235 => { // glIsTextureEXT + let a0 = x.i32(c, 4) as u32; + let f = x.func(235)?; + let g: extern "C" fn(u32) -> u8 = unsafe { std::mem::transmute(f) }; + let r = g(a0); + x.image_done(); + Some(r as u64) + } + 236 => { // glLightModelf + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let f = x.func(236)?; + let g: extern "C" fn(u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 237 => { // glLightModelfv + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(size_LightModelfv(a0 as u32))?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(237)?; + let g: extern "C" fn(u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 238 => { // glLightModeli + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let f = x.func(238)?; + let g: extern "C" fn(u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 239 => { // glLightModeliv + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(size_LightModeliv(a0 as u32))?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(239)?; + let g: extern "C" fn(u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 240 => { // glLightf + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.f32(c, 12); + let f = x.func(240)?; + let g: extern "C" fn(u32, u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 241 => { // glLightfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_Lightfv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(241)?; + let g: extern "C" fn(u32, u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 242 => { // glLighti + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(242)?; + let g: extern "C" fn(u32, u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 243 => { // glLightiv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_Lightiv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(243)?; + let g: extern "C" fn(u32, u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 244 => { // glLineStipple + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as u16; + let f = x.func(244)?; + let g: extern "C" fn(i32, u16) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 245 => { // glLineWidth + let a0 = x.f32(c, 4); + let f = x.func(245)?; + let g: extern "C" fn(f32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 246 => { // glListBase + let a0 = x.i32(c, 4) as u32; + let f = x.func(246)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 247 => { // glListParameterfSGIX + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.f32(c, 12); + let f = x.func(247)?; + let g: extern "C" fn(u32, u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 248 => { // glListParameterfvSGIX + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(((1) as i64).max(0) as usize)?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(248)?; + let g: extern "C" fn(u32, u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 249 => { // glListParameteriSGIX + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(249)?; + let g: extern "C" fn(u32, u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 250 => { // glListParameterivSGIX + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(((1) as i64).max(0) as usize)?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(250)?; + let g: extern "C" fn(u32, u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 251 => { // glLoadIdentity + let f = x.func(251)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 252 => { // glLoadIdentityDeformationMapSGIX + let a0 = x.i32(c, 4) as u32; + let f = x.func(252)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 253 => { // glLoadMatrixd + let n0 = x.count(((16) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(253)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 254 => { // glLoadMatrixf + let n0 = x.count(((16) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(254)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 255 => { // glLoadName + let a0 = x.i32(c, 4) as u32; + let f = x.func(255)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 256 => { // glLogicOp + let a0 = x.i32(c, 4) as u32; + let f = x.func(256)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 257 => { // glMap1d + let a0 = x.i32(c, 4) as u32; + let a1 = x.f64(c, 8); + let a2 = x.f64(c, 16); + let a3 = x.i32(c, 24) as i32; + let a4 = x.i32(c, 28) as i32; + let n5 = x.count((if a4 > 0 { ((a4 as i64 - 1) * (a3 as i64) + super::exec::map_components(a0 as u32)).max(0) as usize } else { 0 }))?; + let w5 = x.arr_padded::(c, 32, n5)?; + let v5 = &w5[..n5]; + let a5 = 0u64; + let f = x.func(257)?; + let g: extern "C" fn(u32, f64, f64, i32, i32, *const f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, x.ptr_of(v5)); + x.image_done(); + Some(0) + } + 258 => { // glMap1f + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let n5 = x.count((if a4 > 0 { ((a4 as i64 - 1) * (a3 as i64) + super::exec::map_components(a0 as u32)).max(0) as usize } else { 0 }))?; + let w5 = x.arr_padded::(c, 24, n5)?; + let v5 = &w5[..n5]; + let a5 = 0u64; + let f = x.func(258)?; + let g: extern "C" fn(u32, f32, f32, i32, i32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, x.ptr_of(v5)); + x.image_done(); + Some(0) + } + 259 => { // glMap2d + let a0 = x.i32(c, 4) as u32; + let a1 = x.f64(c, 8); + let a2 = x.f64(c, 16); + let a3 = x.i32(c, 24) as i32; + let a4 = x.i32(c, 28) as i32; + let a5 = x.f64(c, 32); + let a6 = x.f64(c, 40); + let a7 = x.i32(c, 48) as i32; + let a8 = x.i32(c, 52) as i32; + let n9 = x.count((if a4 > 0 && a8 > 0 { ((a4 as i64 - 1) * (a3 as i64) + (a8 as i64 - 1) * (a7 as i64) + super::exec::map_components(a0 as u32)).max(0) as usize } else { 0 }))?; + let w9 = x.arr_padded::(c, 56, n9)?; + let v9 = &w9[..n9]; + let a9 = 0u64; + let f = x.func(259)?; + let g: extern "C" fn(u32, f64, f64, i32, i32, f64, f64, i32, i32, *const f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, a6, a7, a8, x.ptr_of(v9)); + x.image_done(); + Some(0) + } + 260 => { // glMap2f + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.f32(c, 24); + let a6 = x.f32(c, 28); + let a7 = x.i32(c, 32) as i32; + let a8 = x.i32(c, 36) as i32; + let n9 = x.count((if a4 > 0 && a8 > 0 { ((a4 as i64 - 1) * (a3 as i64) + (a8 as i64 - 1) * (a7 as i64) + super::exec::map_components(a0 as u32)).max(0) as usize } else { 0 }))?; + let w9 = x.arr_padded::(c, 40, n9)?; + let v9 = &w9[..n9]; + let a9 = 0u64; + let f = x.func(260)?; + let g: extern "C" fn(u32, f32, f32, i32, i32, f32, f32, i32, i32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, a6, a7, a8, x.ptr_of(v9)); + x.image_done(); + Some(0) + } + 261 => { // glMapGrid1d + let a0 = x.i32(c, 4) as i32; + let a1 = x.f64(c, 8); + let a2 = x.f64(c, 16); + let f = x.func(261)?; + let g: extern "C" fn(i32, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 262 => { // glMapGrid1f + let a0 = x.i32(c, 4) as i32; + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let f = x.func(262)?; + let g: extern "C" fn(i32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 263 => { // glMapGrid2d + let a0 = x.i32(c, 4) as i32; + let a1 = x.f64(c, 8); + let a2 = x.f64(c, 16); + let a3 = x.i32(c, 24) as i32; + let a4 = x.f64(c, 32); + let a5 = x.f64(c, 40); + let f = x.func(263)?; + let g: extern "C" fn(i32, f64, f64, i32, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5); + x.image_done(); + Some(0) + } + 264 => { // glMapGrid2f + let a0 = x.i32(c, 4) as i32; + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.i32(c, 16) as i32; + let a4 = x.f32(c, 20); + let a5 = x.f32(c, 24); + let f = x.func(264)?; + let g: extern "C" fn(i32, f32, f32, i32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5); + x.image_done(); + Some(0) + } + 265 => { // glMaterialf + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.f32(c, 12); + let f = x.func(265)?; + let g: extern "C" fn(u32, u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 266 => { // glMaterialfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_Materialfv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(266)?; + let g: extern "C" fn(u32, u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 267 => { // glMateriali + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(267)?; + let g: extern "C" fn(u32, u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 268 => { // glMaterialiv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_Materialiv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(268)?; + let g: extern "C" fn(u32, u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 269 => { // glMatrixMode + let a0 = x.i32(c, 4) as u32; + let f = x.func(269)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 270 => { // glMinmax + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u8; + let f = x.func(270)?; + let g: extern "C" fn(u32, u32, u8) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2); + x.image_done(); + Some(0) + } + 271 => { // glMinmaxEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u8; + let f = x.func(271)?; + let g: extern "C" fn(u32, u32, u8) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2); + x.image_done(); + Some(0) + } + 272 => { // glMultMatrixd + let n0 = x.count(((16) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(272)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 273 => { // glMultMatrixf + let n0 = x.count(((16) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(273)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 274 => { // glNewList + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let f = x.func(274)?; + let g: extern "C" fn(u32, u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 275 => { // glNormal3b + let a0 = x.i32(c, 4) as i8; + let a1 = x.i32(c, 8) as i8; + let a2 = x.i32(c, 12) as i8; + let f = x.func(275)?; + let g: extern "C" fn(i8, i8, i8) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 276 => { // glNormal3bv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(276)?; + let g: extern "C" fn(*const i8) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 277 => { // glNormal3d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let f = x.func(277)?; + let g: extern "C" fn(f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 278 => { // glNormal3dv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(278)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 279 => { // glNormal3f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let f = x.func(279)?; + let g: extern "C" fn(f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 280 => { // glNormal3fv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(280)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 281 => { // glNormal3i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(281)?; + let g: extern "C" fn(i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 282 => { // glNormal3iv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(282)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 283 => { // glNormal3s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let f = x.func(283)?; + let g: extern "C" fn(i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 284 => { // glNormal3sv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(284)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 285 => { // glNormalPointer + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.addr(c, 12); + x.array_pointer(1, 3 as i32, a0 as u32, a1 as i32, a2); Some(0) + } + 286 => { // glNormalPointerEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.addr(c, 16); + x.array_pointer(1, 3 as i32, a0 as u32, a1 as i32, a3); Some(0) + } + 287 => { // glOrtho + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let a3 = x.f64(c, 32); + let a4 = x.f64(c, 40); + let a5 = x.f64(c, 48); + let f = x.func(287)?; + let g: extern "C" fn(f64, f64, f64, f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5); + x.image_done(); + Some(0) + } + 288 => { // glPassThrough + let a0 = x.f32(c, 4); + let f = x.func(288)?; + let g: extern "C" fn(f32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 289 => { // glPixelMapfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let n2 = x.count((((a1 as i64)) as i64).max(0) as usize)?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(289)?; + let g: extern "C" fn(u32, i32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 290 => { // glPixelMapuiv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let n2 = x.count((((a1 as i64)) as i64).max(0) as usize)?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(290)?; + let g: extern "C" fn(u32, i32, *const u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 291 => { // glPixelMapusv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let n2 = x.count((((a1 as i64)) as i64).max(0) as usize)?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(291)?; + let g: extern "C" fn(u32, i32, *const u16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 292 => { // glPixelStoref + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + x.pixel_store(a0, a1); Some(0) + } + 293 => { // glPixelStorei + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + x.pixel_store(a0, a1 as f32); Some(0) + } + 294 => { // glPixelTexGenSGIX + let a0 = x.i32(c, 4) as u32; + x.pixel_tex_gen(a0); Some(0) + } + 295 => { // glPixelTransferf + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let f = x.func(295)?; + let g: extern "C" fn(u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 296 => { // glPixelTransferi + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let f = x.func(296)?; + let g: extern "C" fn(u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 297 => { // glPixelZoom + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let f = x.func(297)?; + let g: extern "C" fn(f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 298 => { // glPointParameterfSGIS + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let f = x.func(298)?; + let g: extern "C" fn(u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 299 => { // glPointParameterfvSGIS + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(size_PointParameterfvSGIS(a0 as u32))?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(299)?; + let g: extern "C" fn(u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 300 => { // glPointSize + let a0 = x.f32(c, 4); + let f = x.func(300)?; + let g: extern "C" fn(f32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 301 => { // glPollInstrumentsSGIX + let a0 = x.addr(c, 4); + let c0 = ((1) as i64).max(0) as usize; + let n0 = x.count(c0)?; + let mut o0 = vec![0 as i32; n0.max(1) + 16]; + let f = x.func(301)?; + let g: extern "C" fn(*mut i32) -> i32 = unsafe { std::mem::transmute(f) }; + let r = g(o0.as_mut_ptr()); + x.put::(a0, &o0[..n0])?; + x.image_done(); + Some(r as u64) + } + 302 => { // glPolygonMode + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let f = x.func(302)?; + let g: extern "C" fn(u32, u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 303 => { // glPolygonOffset + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let f = x.func(303)?; + let g: extern "C" fn(f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 304 => { // glPolygonOffsetEXT + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + x.polygon_offset_ext(a0, a1); Some(0) + } + 305 => { // glPolygonStipple + let a0 = x.addr(c, 4); + let p0 = x.image(a0, &[32, 32], 0u32 as u32, 0u32 as u32, true, false)?; + let f = x.func(305)?; + let g: extern "C" fn(*const u8) = unsafe { std::mem::transmute(f) }; + g(p0 as *const u8); + x.image_done(); + Some(0) + } + 306 => { // glPopAttrib + let f = x.func(306)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 307 => { // glPopClientAttrib + let f = x.func(307)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 308 => { // glPopMatrix + let f = x.func(308)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 309 => { // glPopName + let f = x.func(309)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 310 => { // glPrioritizeTextures + let a0 = x.i32(c, 4) as i32; + let n1 = x.count((((a0 as i64)) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let n2 = x.count((((a0 as i64)) as i64).max(0) as usize)?; + let w2 = x.arr_padded::(c, 20, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(310)?; + let g: extern "C" fn(i32, *const u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1), x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 311 => { // glPrioritizeTexturesEXT + let a0 = x.i32(c, 4) as i32; + let n1 = x.count((((a0 as i64)) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let n2 = x.count((((a0 as i64)) as i64).max(0) as usize)?; + let w2 = x.arr_padded::(c, 20, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(311)?; + let g: extern "C" fn(i32, *const u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1), x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 312 => { // glPushAttrib + let a0 = x.i32(c, 4) as u32; + let f = x.func(312)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 313 => { // glPushClientAttrib + let a0 = x.i32(c, 4) as u32; + let f = x.func(313)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 314 => { // glPushMatrix + let f = x.func(314)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 315 => { // glPushName + let a0 = x.i32(c, 4) as u32; + let f = x.func(315)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 316 => { // glRasterPos2d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let f = x.func(316)?; + let g: extern "C" fn(f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 317 => { // glRasterPos2dv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(317)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 318 => { // glRasterPos2f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let f = x.func(318)?; + let g: extern "C" fn(f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 319 => { // glRasterPos2fv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(319)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 320 => { // glRasterPos2i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let f = x.func(320)?; + let g: extern "C" fn(i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 321 => { // glRasterPos2iv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(321)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 322 => { // glRasterPos2s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let f = x.func(322)?; + let g: extern "C" fn(i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 323 => { // glRasterPos2sv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(323)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 324 => { // glRasterPos3d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let f = x.func(324)?; + let g: extern "C" fn(f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 325 => { // glRasterPos3dv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(325)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 326 => { // glRasterPos3f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let f = x.func(326)?; + let g: extern "C" fn(f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 327 => { // glRasterPos3fv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(327)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 328 => { // glRasterPos3i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(328)?; + let g: extern "C" fn(i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 329 => { // glRasterPos3iv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(329)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 330 => { // glRasterPos3s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let f = x.func(330)?; + let g: extern "C" fn(i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 331 => { // glRasterPos3sv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(331)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 332 => { // glRasterPos4d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let a3 = x.f64(c, 32); + let f = x.func(332)?; + let g: extern "C" fn(f64, f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 333 => { // glRasterPos4dv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(333)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 334 => { // glRasterPos4f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(334)?; + let g: extern "C" fn(f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 335 => { // glRasterPos4fv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(335)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 336 => { // glRasterPos4i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let f = x.func(336)?; + let g: extern "C" fn(i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 337 => { // glRasterPos4iv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(337)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 338 => { // glRasterPos4s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let a3 = x.i32(c, 16) as i16; + let f = x.func(338)?; + let g: extern "C" fn(i16, i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 339 => { // glRasterPos4sv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(339)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 340 => { // glReadBuffer + let a0 = x.i32(c, 4) as u32; + x.color_buffer(false, a0); Some(0) + } + 341 => { // glReadInstrumentsSGIX + let a0 = x.i32(c, 4) as i32; + let f = x.func(341)?; + let g: extern "C" fn(i32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 342 => { // glReadPixels + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.i32(c, 24) as u32; + let a6 = x.addr(c, 28); + let p6 = x.image(a6, &[a2 as i32, a3 as i32], a4 as u32, a5 as u32, false, true)?; + x.resolve_read(); + let f = x.func(342)?; + let g: extern "C" fn(i32, i32, i32, i32, u32, u32, *mut c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, x.gl_format(a4), x.gl_type(a4, a5), p6 as *mut c_void); + x.image_done(); + Some(0) + } + 343 => { // glRectd + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let a3 = x.f64(c, 32); + let f = x.func(343)?; + let g: extern "C" fn(f64, f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 344 => { // glRectdv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let n1 = x.count(((2) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 16, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(344)?; + let g: extern "C" fn(*const f64, *const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0), x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 345 => { // glRectf + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(345)?; + let g: extern "C" fn(f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 346 => { // glRectfv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let n1 = x.count(((2) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 16, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(346)?; + let g: extern "C" fn(*const f32, *const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0), x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 347 => { // glRecti + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let f = x.func(347)?; + let g: extern "C" fn(i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 348 => { // glRectiv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let n1 = x.count(((2) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 16, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(348)?; + let g: extern "C" fn(*const i32, *const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0), x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 349 => { // glRects + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let a3 = x.i32(c, 16) as i16; + let f = x.func(349)?; + let g: extern "C" fn(i16, i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 350 => { // glRectsv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let n1 = x.count(((2) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 16, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(350)?; + let g: extern "C" fn(*const i16, *const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0), x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 351 => { // glReferencePlaneSGIX + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + x.reference_plane(&v0); Some(0) + } + 352 => { // glRenderMode + let a0 = x.i32(c, 4) as u32; + Some(x.render_mode(a0) as u32 as u64) + } + 353 => { // glResetHistogram + let a0 = x.i32(c, 4) as u32; + let f = x.func(353)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 354 => { // glResetHistogramEXT + let a0 = x.i32(c, 4) as u32; + let f = x.func(354)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 355 => { // glResetMinmax + let a0 = x.i32(c, 4) as u32; + let f = x.func(355)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 356 => { // glResetMinmaxEXT + let a0 = x.i32(c, 4) as u32; + let f = x.func(356)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 357 => { // glRotated + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let a3 = x.f64(c, 32); + let f = x.func(357)?; + let g: extern "C" fn(f64, f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 358 => { // glRotatef + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(358)?; + let g: extern "C" fn(f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 359 => { // glSampleMaskSGIS + let a0 = x.f32(c, 4); + let a1 = x.i32(c, 8) as u8; + let f = x.func(359)?; + let g: extern "C" fn(f32, u8) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 360 => { // glSamplePatternSGIS + let a0 = x.i32(c, 4) as u32; + let f = x.func(360)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 361 => { // glScaled + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let f = x.func(361)?; + let g: extern "C" fn(f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 362 => { // glScalef + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let f = x.func(362)?; + let g: extern "C" fn(f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 363 => { // glScissor + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let f = x.func(363)?; + let g: extern "C" fn(i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 364 => { // glSelectBuffer + let a0 = x.i32(c, 4) as i32; + let a1 = x.addr(c, 8); + x.select_buffer(a0, a1); Some(0) + } + 365 => { // glSeparableFilter2D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.i32(c, 24) as u32; + let a6 = x.addr(c, 28); + let p6 = x.image(a6, &[a2 as i32], a4 as u32, a5 as u32, false, false)?; + let a7 = x.addr(c, 36); + let p7 = x.image(a7, &[a3 as i32], a4 as u32, a5 as u32, false, false)?; + let f = x.func(365)?; + let g: extern "C" fn(u32, u32, i32, i32, u32, u32, *const c_void, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, a3, x.gl_format(a4), x.gl_type(a4, a5), p6 as *const c_void, p7 as *const c_void); + x.image_done(); + Some(0) + } + 366 => { // glSeparableFilter2DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.i32(c, 24) as u32; + let a6 = x.addr(c, 28); + let p6 = x.image(a6, &[a2 as i32], a4 as u32, a5 as u32, false, false)?; + let a7 = x.addr(c, 36); + let p7 = x.image(a7, &[a3 as i32], a4 as u32, a5 as u32, false, false)?; + let f = x.func(366)?; + let g: extern "C" fn(u32, u32, i32, i32, u32, u32, *const c_void, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, x.gl_internal(a1 as i32) as u32, a2, a3, x.gl_format(a4), x.gl_type(a4, a5), p6 as *const c_void, p7 as *const c_void); + x.image_done(); + Some(0) + } + 367 => { // glShadeModel + let a0 = x.i32(c, 4) as u32; + let f = x.func(367)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 368 => { // glSharpenTexFuncSGIS + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let n2 = x.count((((a1 as i64)*2) as i64).max(0) as usize)?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + x.sharpen_func(&v2); Some(0) + } + 369 => { // glSpriteParameterfSGIX + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + x.sprite_parameter(a0, &[a1 as f32]); Some(0) + } + 370 => { // glSpriteParameterfvSGIX + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(size_SpriteParameterfvSGIX(a0 as u32))?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + x.sprite_parameter(a0, &v1); Some(0) + } + 371 => { // glSpriteParameteriSGIX + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + x.sprite_parameter(a0, &[a1 as f32]); Some(0) + } + 372 => { // glSpriteParameterivSGIX + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(size_SpriteParameterivSGIX(a0 as u32))?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + x.sprite_parameter(a0, &v1.iter().map(|v| *v as f32).collect::>()); Some(0) + } + 373 => { // glStartInstrumentsSGIX + let f = x.func(373)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 374 => { // glStencilFunc + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let f = x.func(374)?; + let g: extern "C" fn(u32, i32, u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 375 => { // glStencilMask + let a0 = x.i32(c, 4) as u32; + let f = x.func(375)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 376 => { // glStencilOp + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as u32; + let f = x.func(376)?; + let g: extern "C" fn(u32, u32, u32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 377 => { // glStopInstrumentsSGIX + let a0 = x.i32(c, 4) as i32; + let f = x.func(377)?; + let g: extern "C" fn(i32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 378 => { // glTagSampleBufferSGIX + let f = x.func(378)?; + let g: extern "C" fn() = unsafe { std::mem::transmute(f) }; + g(); + x.image_done(); + Some(0) + } + 379 => { // glTexCoord1d + let a0 = x.f64(c, 8); + let f = x.func(379)?; + let g: extern "C" fn(f64) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 380 => { // glTexCoord1dv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(380)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 381 => { // glTexCoord1f + let a0 = x.f32(c, 4); + let f = x.func(381)?; + let g: extern "C" fn(f32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 382 => { // glTexCoord1fv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(382)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 383 => { // glTexCoord1i + let a0 = x.i32(c, 4) as i32; + let f = x.func(383)?; + let g: extern "C" fn(i32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 384 => { // glTexCoord1iv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(384)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 385 => { // glTexCoord1s + let a0 = x.i32(c, 4) as i16; + let f = x.func(385)?; + let g: extern "C" fn(i16) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 386 => { // glTexCoord1sv + let n0 = x.count(((1) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(386)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 387 => { // glTexCoord2d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let f = x.func(387)?; + let g: extern "C" fn(f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 388 => { // glTexCoord2dv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(388)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 389 => { // glTexCoord2f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let f = x.func(389)?; + let g: extern "C" fn(f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 390 => { // glTexCoord2fv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(390)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 391 => { // glTexCoord2i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let f = x.func(391)?; + let g: extern "C" fn(i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 392 => { // glTexCoord2iv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(392)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 393 => { // glTexCoord2s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let f = x.func(393)?; + let g: extern "C" fn(i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 394 => { // glTexCoord2sv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(394)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 395 => { // glTexCoord3d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let f = x.func(395)?; + let g: extern "C" fn(f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 396 => { // glTexCoord3dv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(396)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 397 => { // glTexCoord3f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let f = x.func(397)?; + let g: extern "C" fn(f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 398 => { // glTexCoord3fv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(398)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 399 => { // glTexCoord3i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(399)?; + let g: extern "C" fn(i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 400 => { // glTexCoord3iv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(400)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 401 => { // glTexCoord3s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let f = x.func(401)?; + let g: extern "C" fn(i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 402 => { // glTexCoord3sv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(402)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 403 => { // glTexCoord4d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let a3 = x.f64(c, 32); + let f = x.func(403)?; + let g: extern "C" fn(f64, f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 404 => { // glTexCoord4dv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(404)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 405 => { // glTexCoord4f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(405)?; + let g: extern "C" fn(f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 406 => { // glTexCoord4fv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(406)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 407 => { // glTexCoord4i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let f = x.func(407)?; + let g: extern "C" fn(i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 408 => { // glTexCoord4iv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(408)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 409 => { // glTexCoord4s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let a3 = x.i32(c, 16) as i16; + let f = x.func(409)?; + let g: extern "C" fn(i16, i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 410 => { // glTexCoord4sv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(410)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 411 => { // glTexCoordPointer + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.addr(c, 16); + x.array_pointer(4, a0 as i32, a1 as u32, a2 as i32, a3); Some(0) + } + 412 => { // glTexCoordPointerEXT + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.addr(c, 20); + x.array_pointer(4, a0 as i32, a1 as u32, a2 as i32, a4); Some(0) + } + 413 => { // glTexEnvf + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.f32(c, 12); + x.tex_env(a0, a1, a2 as u32); Some(0) + } + 414 => { // glTexEnvfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_TexEnvfv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(414)?; + let g: extern "C" fn(u32, u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 415 => { // glTexEnvi + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + x.tex_env(a0, a1, a2 as u32); Some(0) + } + 416 => { // glTexEnviv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_TexEnviv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(416)?; + let g: extern "C" fn(u32, u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 417 => { // glTexFilterFuncSGIS + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let n3 = x.count((((a2 as i64)) as i64).max(0) as usize)?; + let w3 = x.arr_padded::(c, 16, n3)?; + let v3 = &w3[..n3]; + let a3 = 0u64; + if !x.tex_filter_func(a1, &v3) { + let f = x.func(417)?; + let g: extern "C" fn(u32, u32, i32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, x.ptr_of(v3)); + } + x.image_done(); + Some(0) + } + 418 => { // glTexGend + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.f64(c, 16); + let f = x.func(418)?; + let g: extern "C" fn(u32, u32, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 419 => { // glTexGendv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_TexGendv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(419)?; + let g: extern "C" fn(u32, u32, *const f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 420 => { // glTexGenf + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.f32(c, 12); + let f = x.func(420)?; + let g: extern "C" fn(u32, u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 421 => { // glTexGenfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_TexGenfv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(421)?; + let g: extern "C" fn(u32, u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 422 => { // glTexGeni + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(422)?; + let g: extern "C" fn(u32, u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 423 => { // glTexGeniv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_TexGeniv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(423)?; + let g: extern "C" fn(u32, u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 424 => { // glTexImage1D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as u32; + let a6 = x.i32(c, 28) as u32; + let a7 = x.addr(c, 32); + let p7 = x.image(a7, &[a3 as i32], a5 as u32, a6 as u32, false, false)?; + let f = x.func(424)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_internal(a2 as i32) as i32, a3, a4, x.gl_format(a5), x.gl_type(a5, a6), p7 as *const c_void); + x.image_done(); + Some(0) + } + 425 => { // glTexImage2D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as u32; + let a7 = x.i32(c, 32) as u32; + let a8 = x.addr(c, 36); + let p8 = x.image(a8, &[a3 as i32, a4 as i32], a6 as u32, a7 as u32, false, false)?; + if !x.tex_image_2d(a0, a1, a2, a3, a4, a5, x.gl_format(a6), x.gl_type(a6, a7), p8 as *const c_void) { + let f = x.func(425)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_internal(a2 as i32) as i32, a3, x.gl_height(a4 as i32) as i32, a5, x.gl_format(a6), x.gl_type(a6, a7), p8 as *const c_void); + } + x.image_done(); + Some(0) + } + 426 => { // glTexImage3D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as u32; + let a8 = x.i32(c, 36) as u32; + let a9 = x.addr(c, 40); + let p9 = x.image(a9, &[a3 as i32, a4 as i32, a5 as i32], a7 as u32, a8 as u32, false, false)?; + let f = x.func(426)?; + let g: extern "C" fn(u32, i32, u32, i32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_internal(a2 as i32) as u32, a3, x.gl_height(a4 as i32) as i32, a5, a6, x.gl_format(a7), x.gl_type(a7, a8), p9 as *const c_void); + x.image_done(); + Some(0) + } + 427 => { // glTexImage3DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as u32; + let a8 = x.i32(c, 36) as u32; + let a9 = x.addr(c, 40); + let p9 = x.image(a9, &[a3 as i32, a4 as i32, a5 as i32], a7 as u32, a8 as u32, false, false)?; + let f = x.func(427)?; + let g: extern "C" fn(u32, i32, u32, i32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.gl_internal(a2 as i32) as u32, a3, x.gl_height(a4 as i32) as i32, a5, a6, x.gl_format(a7), x.gl_type(a7, a8), p9 as *const c_void); + x.image_done(); + Some(0) + } + 428 => { // glTexImage4DSGIS + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as u32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as i32; + let a8 = x.i32(c, 36) as u32; + let a9 = x.i32(c, 40) as u32; + let a10 = x.addr(c, 44); + let p10 = x.image(a10, &[a3 as i32, a4 as i32, a5 as i32, a6 as i32], a8 as u32, a9 as u32, false, false)?; + let internal = x.gl_internal(a2 as i32); +let fmt = x.gl_format(a8); +let ty = x.gl_type(a8, a9); +x.tex_image_4d(a1, internal, a3, a4, a5, a6, a7, fmt, ty, p10 as *const c_void); +Some(0) + } + 429 => { // glTexParameterf + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.f32(c, 12); + if !x.tex_parameter(a1, &[a2]) { + let f = x.func(429)?; + let g: extern "C" fn(u32, u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + } + x.image_done(); + Some(0) + } + 430 => { // glTexParameterfv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_TexParameterfv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + if !x.tex_parameter(a1, &v2) { + let f = x.func(430)?; + let g: extern "C" fn(u32, u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + } + x.image_done(); + Some(0) + } + 431 => { // glTexParameteri + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + if !x.tex_parameter(a1, &[a2 as f32]) { + let f = x.func(431)?; + let g: extern "C" fn(u32, u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + } + x.image_done(); + Some(0) + } + 432 => { // glTexParameteriv + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as u32; + let n2 = x.count(size_TexParameteriv(a1 as u32))?; + let w2 = x.arr_padded::(c, 12, n2)?; + let v2 = &w2[..n2]; + let a2 = 0u64; + let f = x.func(432)?; + let g: extern "C" fn(u32, u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, x.ptr_of(v2)); + x.image_done(); + Some(0) + } + 433 => { // glTexSubImage1D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.i32(c, 24) as u32; + let a6 = x.addr(c, 28); + let p6 = x.image(a6, &[a3 as i32], a4 as u32, a5 as u32, false, false)?; + let f = x.func(433)?; + let g: extern "C" fn(u32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, x.gl_format(a4), x.gl_type(a4, a5), p6 as *const c_void); + x.image_done(); + Some(0) + } + 434 => { // glTexSubImage1DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as u32; + let a5 = x.i32(c, 24) as u32; + let a6 = x.addr(c, 28); + let p6 = x.image(a6, &[a3 as i32], a4 as u32, a5 as u32, false, false)?; + let f = x.func(434)?; + let g: extern "C" fn(u32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, x.gl_format(a4), x.gl_type(a4, a5), p6 as *const c_void); + x.image_done(); + Some(0) + } + 435 => { // glTexSubImage2D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as u32; + let a7 = x.i32(c, 32) as u32; + let a8 = x.addr(c, 36); + let p8 = x.image(a8, &[a4 as i32, a5 as i32], a6 as u32, a7 as u32, false, false)?; + let f = x.func(435)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, x.gl_height(a5 as i32) as i32, x.gl_format(a6), x.gl_type(a6, a7), p8 as *const c_void); + x.image_done(); + Some(0) + } + 436 => { // glTexSubImage2DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as u32; + let a7 = x.i32(c, 32) as u32; + let a8 = x.addr(c, 36); + let p8 = x.image(a8, &[a4 as i32, a5 as i32], a6 as u32, a7 as u32, false, false)?; + let f = x.func(436)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, x.gl_height(a5 as i32) as i32, x.gl_format(a6), x.gl_type(a6, a7), p8 as *const c_void); + x.image_done(); + Some(0) + } + 437 => { // glTexSubImage3D + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as i32; + let a8 = x.i32(c, 36) as u32; + let a9 = x.i32(c, 40) as u32; + let a10 = x.addr(c, 44); + let p10 = x.image(a10, &[a5 as i32, a6 as i32, a7 as i32], a8 as u32, a9 as u32, false, false)?; + let f = x.func(437)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, x.gl_height(a6 as i32) as i32, a7, x.gl_format(a8), x.gl_type(a8, a9), p10 as *const c_void); + x.image_done(); + Some(0) + } + 438 => { // glTexSubImage3DEXT + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as i32; + let a8 = x.i32(c, 36) as u32; + let a9 = x.i32(c, 40) as u32; + let a10 = x.addr(c, 44); + let p10 = x.image(a10, &[a5 as i32, a6 as i32, a7 as i32], a8 as u32, a9 as u32, false, false)?; + let f = x.func(438)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, x.gl_height(a6 as i32) as i32, a7, x.gl_format(a8), x.gl_type(a8, a9), p10 as *const c_void); + x.image_done(); + Some(0) + } + 439 => { // glTexSubImage4DSGIS + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let a5 = x.i32(c, 24) as i32; + let a6 = x.i32(c, 28) as i32; + let a7 = x.i32(c, 32) as i32; + let a8 = x.i32(c, 36) as i32; + let a9 = x.i32(c, 40) as i32; + let a10 = x.i32(c, 44) as u32; + let a11 = x.i32(c, 48) as u32; + let a12 = x.addr(c, 52); + let p12 = x.image(a12, &[a6 as i32, a7 as i32, a8 as i32, a9 as i32], a10 as u32, a11 as u32, false, false)?; + let f = x.func(439)?; + let g: extern "C" fn(u32, i32, i32, i32, i32, i32, i32, i32, i32, i32, u32, u32, *const c_void) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4, a5, a6, x.gl_height(a7 as i32) as i32, a8, a9, x.gl_format(a10), x.gl_type(a10, a11), p12 as *const c_void); + x.image_done(); + Some(0) + } + 440 => { // glTranslated + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let f = x.func(440)?; + let g: extern "C" fn(f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 441 => { // glTranslatef + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let f = x.func(441)?; + let g: extern "C" fn(f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 442 => { // glVertex2d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let f = x.func(442)?; + let g: extern "C" fn(f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 443 => { // glVertex2dv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(443)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 444 => { // glVertex2f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let f = x.func(444)?; + let g: extern "C" fn(f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 445 => { // glVertex2fv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(445)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 446 => { // glVertex2i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let f = x.func(446)?; + let g: extern "C" fn(i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 447 => { // glVertex2iv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(447)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 448 => { // glVertex2s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let f = x.func(448)?; + let g: extern "C" fn(i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 449 => { // glVertex2sv + let n0 = x.count(((2) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(449)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 450 => { // glVertex3d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let f = x.func(450)?; + let g: extern "C" fn(f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 451 => { // glVertex3dv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(451)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 452 => { // glVertex3f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let f = x.func(452)?; + let g: extern "C" fn(f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 453 => { // glVertex3fv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(453)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 454 => { // glVertex3i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(454)?; + let g: extern "C" fn(i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 455 => { // glVertex3iv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(455)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 456 => { // glVertex3s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let f = x.func(456)?; + let g: extern "C" fn(i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 457 => { // glVertex3sv + let n0 = x.count(((3) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(457)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 458 => { // glVertex4d + let a0 = x.f64(c, 8); + let a1 = x.f64(c, 16); + let a2 = x.f64(c, 24); + let a3 = x.f64(c, 32); + let f = x.func(458)?; + let g: extern "C" fn(f64, f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 459 => { // glVertex4dv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(459)?; + let g: extern "C" fn(*const f64) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 460 => { // glVertex4f + let a0 = x.f32(c, 4); + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(460)?; + let g: extern "C" fn(f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 461 => { // glVertex4fv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(461)?; + let g: extern "C" fn(*const f32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 462 => { // glVertex4i + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let f = x.func(462)?; + let g: extern "C" fn(i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 463 => { // glVertex4iv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(463)?; + let g: extern "C" fn(*const i32) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 464 => { // glVertex4s + let a0 = x.i32(c, 4) as i16; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let a3 = x.i32(c, 16) as i16; + let f = x.func(464)?; + let g: extern "C" fn(i16, i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 465 => { // glVertex4sv + let n0 = x.count(((4) as i64).max(0) as usize)?; + let w0 = x.arr_padded::(c, 4, n0)?; + let v0 = &w0[..n0]; + let a0 = 0u64; + let f = x.func(465)?; + let g: extern "C" fn(*const i16) = unsafe { std::mem::transmute(f) }; + g(x.ptr_of(v0)); + x.image_done(); + Some(0) + } + 466 => { // glVertexPointer + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.addr(c, 16); + x.array_pointer(0, a0 as i32, a1 as u32, a2 as i32, a3); Some(0) + } + 467 => { // glVertexPointerEXT + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as u32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.addr(c, 20); + x.array_pointer(0, a0 as i32, a1 as u32, a2 as i32, a4); Some(0) + } + 468 => { // glViewport + let a0 = x.i32(c, 4) as i32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let f = x.func(468)?; + let g: extern "C" fn(i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 469 => { // glActiveTextureARB + let a0 = x.i32(c, 4) as u32; + let f = x.func(469)?; + let g: extern "C" fn(u32) = unsafe { std::mem::transmute(f) }; + g(a0); + x.image_done(); + Some(0) + } + 470 => { // glClientActiveTextureARB + let a0 = x.i32(c, 4) as u32; + x.client_active_texture(a0); Some(0) + } + 471 => { // glMultiTexCoord1dARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.f64(c, 8); + let f = x.func(471)?; + let g: extern "C" fn(u32, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 472 => { // glMultiTexCoord1dvARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((1) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(472)?; + let g: extern "C" fn(u32, *const f64) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 473 => { // glMultiTexCoord1fARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let f = x.func(473)?; + let g: extern "C" fn(u32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 474 => { // glMultiTexCoord1fvARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((1) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(474)?; + let g: extern "C" fn(u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 475 => { // glMultiTexCoord1iARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let f = x.func(475)?; + let g: extern "C" fn(u32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 476 => { // glMultiTexCoord1ivARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((1) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(476)?; + let g: extern "C" fn(u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 477 => { // glMultiTexCoord1sARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i16; + let f = x.func(477)?; + let g: extern "C" fn(u32, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1); + x.image_done(); + Some(0) + } + 478 => { // glMultiTexCoord1svARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((1) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(478)?; + let g: extern "C" fn(u32, *const i16) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 479 => { // glMultiTexCoord2dARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.f64(c, 8); + let a2 = x.f64(c, 16); + let f = x.func(479)?; + let g: extern "C" fn(u32, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 480 => { // glMultiTexCoord2dvARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((2) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(480)?; + let g: extern "C" fn(u32, *const f64) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 481 => { // glMultiTexCoord2fARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let f = x.func(481)?; + let g: extern "C" fn(u32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 482 => { // glMultiTexCoord2fvARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((2) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(482)?; + let g: extern "C" fn(u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 483 => { // glMultiTexCoord2iARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let f = x.func(483)?; + let g: extern "C" fn(u32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 484 => { // glMultiTexCoord2ivARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((2) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(484)?; + let g: extern "C" fn(u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 485 => { // glMultiTexCoord2sARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let f = x.func(485)?; + let g: extern "C" fn(u32, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2); + x.image_done(); + Some(0) + } + 486 => { // glMultiTexCoord2svARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((2) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(486)?; + let g: extern "C" fn(u32, *const i16) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 487 => { // glMultiTexCoord3dARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.f64(c, 8); + let a2 = x.f64(c, 16); + let a3 = x.f64(c, 24); + let f = x.func(487)?; + let g: extern "C" fn(u32, f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 488 => { // glMultiTexCoord3dvARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((3) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(488)?; + let g: extern "C" fn(u32, *const f64) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 489 => { // glMultiTexCoord3fARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let f = x.func(489)?; + let g: extern "C" fn(u32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 490 => { // glMultiTexCoord3fvARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((3) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(490)?; + let g: extern "C" fn(u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 491 => { // glMultiTexCoord3iARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let f = x.func(491)?; + let g: extern "C" fn(u32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 492 => { // glMultiTexCoord3ivARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((3) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(492)?; + let g: extern "C" fn(u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 493 => { // glMultiTexCoord3sARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let a3 = x.i32(c, 16) as i16; + let f = x.func(493)?; + let g: extern "C" fn(u32, i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3); + x.image_done(); + Some(0) + } + 494 => { // glMultiTexCoord3svARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((3) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(494)?; + let g: extern "C" fn(u32, *const i16) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 495 => { // glMultiTexCoord4dARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.f64(c, 8); + let a2 = x.f64(c, 16); + let a3 = x.f64(c, 24); + let a4 = x.f64(c, 32); + let f = x.func(495)?; + let g: extern "C" fn(u32, f64, f64, f64, f64) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4); + x.image_done(); + Some(0) + } + 496 => { // glMultiTexCoord4dvARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((4) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(496)?; + let g: extern "C" fn(u32, *const f64) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 497 => { // glMultiTexCoord4fARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + let a3 = x.f32(c, 16); + let a4 = x.f32(c, 20); + let f = x.func(497)?; + let g: extern "C" fn(u32, f32, f32, f32, f32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4); + x.image_done(); + Some(0) + } + 498 => { // glMultiTexCoord4fvARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((4) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(498)?; + let g: extern "C" fn(u32, *const f32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 499 => { // glMultiTexCoord4iARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i32; + let a2 = x.i32(c, 12) as i32; + let a3 = x.i32(c, 16) as i32; + let a4 = x.i32(c, 20) as i32; + let f = x.func(499)?; + let g: extern "C" fn(u32, i32, i32, i32, i32) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4); + x.image_done(); + Some(0) + } + 500 => { // glMultiTexCoord4ivARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((4) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(500)?; + let g: extern "C" fn(u32, *const i32) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 501 => { // glMultiTexCoord4sARB + let a0 = x.i32(c, 4) as u32; + let a1 = x.i32(c, 8) as i16; + let a2 = x.i32(c, 12) as i16; + let a3 = x.i32(c, 16) as i16; + let a4 = x.i32(c, 20) as i16; + let f = x.func(501)?; + let g: extern "C" fn(u32, i16, i16, i16, i16) = unsafe { std::mem::transmute(f) }; + g(a0, a1, a2, a3, a4); + x.image_done(); + Some(0) + } + 502 => { // glMultiTexCoord4svARB + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((4) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + let f = x.func(502)?; + let g: extern "C" fn(u32, *const i16) = unsafe { std::mem::transmute(f) }; + g(a0, x.ptr_of(v1)); + x.image_done(); + Some(0) + } + 503 => { // glSelectTextureSGIS + let a0 = x.i32(c, 4) as u32; + x.select_texture(a0); Some(0) + } + 504 => { // glMTexCoord2fSGIS + let a0 = x.i32(c, 4) as u32; + let a1 = x.f32(c, 8); + let a2 = x.f32(c, 12); + x.mtex_coord2f(a0, a1, a2); Some(0) + } + 505 => { // glMTexCoord2fvSGIS + let a0 = x.i32(c, 4) as u32; + let n1 = x.count(((2) as i64).max(0) as usize)?; + let w1 = x.arr_padded::(c, 8, n1)?; + let v1 = &w1[..n1]; + let a1 = 0u64; + x.mtex_coord2f(a0, v1[0], v1[1]); Some(0) + } + _ => { x.unsupported(op); Some(0) } + } +} diff --git a/iris-hostgl/src/draw.rs b/iris-hostgl/src/draw.rs new file mode 100644 index 0000000..929aa16 --- /dev/null +++ b/iris-hostgl/src/draw.rs @@ -0,0 +1,465 @@ +//! Drawables: where a context's pixels live, and how a finished frame leaves. +//! +//! Every drawable -- an X window, a GLX pixmap, a pbuffer -- is a framebuffer +//! object of its own, so a program that draws into a window, then a pbuffer, +//! then the window again finds each as it left it. Framebuffer objects belong +//! to a share group, so drawables are kept per group (see service.rs) and +//! built with one of the group's contexts current. + +use std::collections::HashMap; +use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; +use std::sync::Arc; +use std::ffi::c_void; + +use crate::backend::{Backend, Surface}; +use crate::gl::*; + +pub struct Draw { + pub fbo: u32, + color: u32, + /// Depth and stencil, packed; or depth alone if the host would not make + /// the packed format complete. + depth: u32, + /// The frame turned the right way up for X, read back from here. Several + /// when they are surfaces, so that a frame can be read on the presenting + /// thread while the next one is drawn (see `swap`). + flips: Vec, + /// The flip target the next swap tries first. + next_flip: AtomicUsize, + /// A multisampled drawable cannot be read: its samples are resolved into + /// this one first (GLX_SGIS_multisample). + resolve_fbo: u32, + resolve_color: u32, + pub samples: i32, + pub w: i32, + pub h: i32, +} + +/// A flip target: a framebuffer object whose colour is a CPU-addressable +/// surface where the platform gives one, a renderbuffer where it does not. +struct Flip { + fbo: u32, + surface: Option>, + color: u32, + /// Queued for or being read on the presenting thread: not to be drawn + /// into until that is done. + busy: Arc, +} + +/// Flip targets a drawable with surfaces gets: one being drawn, one queued, +/// one being presented. +const FLIPS: usize = 3; + +impl Flip { + /// A flip target `w` x `h`; a context of the group must be current. + /// Leaves its framebuffer bound. + unsafe fn new(backend: &mut dyn Backend, w: i32, h: i32) -> Flip { + let mut f = Flip { fbo: 0, surface: None, color: 0, busy: Arc::new(AtomicBool::new(false)) }; + glGenFramebuffersEXT(1, &mut f.fbo); + glBindFramebufferEXT(GL_FRAMEBUFFER, f.fbo); + f.surface = backend.new_surface(w, h).map(Arc::from); + if let Some(sf) = &f.surface { + let (target, tex) = sf.texture(); + glFramebufferTexture2DEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, target, tex, 0); + } + if f.surface.is_none() || glCheckFramebufferStatusEXT(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE { + // No surface, or one the driver will not render into. + f.drop_surface(); + glGenRenderbuffersEXT(1, &mut f.color); + glBindRenderbufferEXT(GL_RENDERBUFFER, f.color); + glRenderbufferStorageEXT(GL_RENDERBUFFER, GL_RGBA8, w, h); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, f.color); + } + f + } + + fn drop_surface(&mut self) { + if let Some(mut sf) = self.surface.take() { + // Only this drawable holds it once the presenter has drained. + if let Some(s) = Arc::get_mut(&mut sf) { + s.delete_texture(); + } + } + } + + /// Delete its objects; the presenter must have drained. + unsafe fn delete(mut self) { + self.drop_surface(); + if self.color != 0 { + glDeleteRenderbuffersEXT(1, &self.color); + } + if self.fbo != 0 { + glDeleteFramebuffersEXT(1, &self.fbo); + } + } +} + +/// Where a drawable's pixels are read from: itself, or its resolve buffer. +pub fn read_source(d: &Draw) -> u32 { + if d.samples > 1 { + d.resolve_fbo + } else { + d.fbo + } +} + +/// Resolve a multisampled drawable into the buffer reads come from. GL will +/// not read a multisampled framebuffer, and a resolve cannot flip, so this is +/// a plain same-rectangle blit. Leaves the resolve buffer bound for reading +/// and drawing bound where it was -- which is another drawable when the +/// program reads from one and draws into another (make_current_read). +pub fn resolve(d: &Draw) { + if d.samples <= 1 { + return; + } + // SAFETY: framebuffer objects of the current share group. + unsafe { + let mut drawing = 0i32; + glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &mut drawing); + glBindFramebufferEXT(GL_READ_FRAMEBUFFER, d.fbo); + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, d.resolve_fbo); + glBlitFramebufferEXT(0, 0, d.w, d.h, 0, 0, d.w, d.h, GL_COLOR_BUFFER_BIT, GL_NEAREST); + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, drawing as u32); + glBindFramebufferEXT(GL_READ_FRAMEBUFFER, d.resolve_fbo); + } +} + +/// Bind `draw` for drawing and `read` for reading, when both exist. +pub fn bind(draws: &HashMap, draw: u32, read: u32) { + let (Some(d), Some(r)) = (draws.get(&draw), draws.get(&read)) else { return }; + // SAFETY: framebuffer objects of the current share group. + unsafe { + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, d.fbo); + glBindFramebufferEXT(GL_READ_FRAMEBUFFER, read_source(r)); + } +} + +/// Delete a drawable's objects. A context of its share group must be current. +pub fn delete(mut d: Draw) { + // The presenting thread may still be reading one of its surfaces. + crate::present::drain(); + // SAFETY: names of the current share group; zero names are ignored by GL. + unsafe { + for f in std::mem::take(&mut d.flips) { + f.delete(); + } + for rb in [d.color, d.depth, d.resolve_color] { + if rb != 0 { + glDeleteRenderbuffersEXT(1, &rb); + } + } + for fb in [d.fbo, d.resolve_fbo] { + if fb != 0 { + glDeleteFramebuffersEXT(1, &fb); + } + } + } +} + +/// A drawable's framebuffer object, made or resized to `w` x `h` with +/// `samples` samples a pixel. A context of the group must be current; this +/// leaves the drawable bound, so the caller puts the current bindings back. +pub fn ensure(draws: &mut HashMap, backend: &mut dyn Backend, id: u32, w: i32, h: i32, samples: i32) { + let d = draws.entry(id).or_insert_with(|| Draw { + fbo: 0, + color: 0, + depth: 0, + flips: Vec::new(), + next_flip: AtomicUsize::new(0), + resolve_fbo: 0, + resolve_color: 0, + samples: 0, + w: 0, + h: 0, + }); + if d.fbo != 0 && d.w == w && d.h == h && d.samples == samples { + return; + } + log::debug!("host GL: drawable {id:#x} {} at {w}x{h}, {samples} samples", if d.fbo == 0 { "made" } else { "remade" }); + // SAFETY: GL object management in the current context. + unsafe { + if d.fbo == 0 { + glGenFramebuffersEXT(1, &mut d.fbo); + } + if !d.flips.is_empty() { + // The presenting thread may still be reading the old ones. + crate::present::drain(); + for f in std::mem::take(&mut d.flips) { + f.delete(); + } + } + for rb in [&mut d.color, &mut d.depth, &mut d.resolve_color] { + if *rb != 0 { + glDeleteRenderbuffersEXT(1, rb); + *rb = 0; + } + } + + // The flip targets are what frames are read out of, so they are the + // ones that want to be addressable: surfaces if the platform will + // give them (several, see FLIPS), one renderbuffer if not. + let first = Flip::new(backend, w, h); + let rotate = first.surface.is_some(); + d.flips.push(first); + if rotate { + for _ in 1..FLIPS { + let f = Flip::new(backend, w, h); + if f.surface.is_none() { + f.delete(); + break; + } + d.flips.push(f); + } + } + d.next_flip.store(0, Ordering::Relaxed); + + let storage = |fmt: u32| { + if samples > 1 { + glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, samples, fmt, w, h); + } else { + glRenderbufferStorageEXT(GL_RENDERBUFFER, fmt, w, h); + } + }; + glBindFramebufferEXT(GL_FRAMEBUFFER, d.fbo); + glGenRenderbuffersEXT(1, &mut d.color); + glBindRenderbufferEXT(GL_RENDERBUFFER, d.color); + storage(GL_RGBA8); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, d.color); + // GLX says every visual has an 8-bit stencil buffer (glXGetConfig in + // the shim), so there is one: packed with the depth buffer. + glGenRenderbuffersEXT(1, &mut d.depth); + glBindRenderbufferEXT(GL_RENDERBUFFER, d.depth); + storage(GL_DEPTH24_STENCIL8); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, d.depth); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, d.depth); + if glCheckFramebufferStatusEXT(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE { + const GL_DEPTH_COMPONENT24: u32 = 0x81A6; + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); + glBindRenderbufferEXT(GL_RENDERBUFFER, d.depth); + storage(GL_DEPTH_COMPONENT24); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, d.depth); + } + if samples > 1 { + // What reads of this drawable come from. + if d.resolve_fbo == 0 { + glGenFramebuffersEXT(1, &mut d.resolve_fbo); + } + glBindFramebufferEXT(GL_FRAMEBUFFER, d.resolve_fbo); + glGenRenderbuffersEXT(1, &mut d.resolve_color); + glBindRenderbufferEXT(GL_RENDERBUFFER, d.resolve_color); + glRenderbufferStorageEXT(GL_RENDERBUFFER, GL_RGBA8, w, h); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, d.resolve_color); + glBindFramebufferEXT(GL_FRAMEBUFFER, d.fbo); + } + glBindRenderbufferEXT(GL_RENDERBUFFER, 0); + d.w = w; + d.h = h; + d.samples = samples; + // A framebuffer that is not complete draws nothing, and the error it + // leaves is read by whatever asks next -- so it is taken here. + let status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER); + let err = glGetError(); + if status != GL_FRAMEBUFFER_COMPLETE || err != 0 { + log::warn!( + "host GL: drawable {id:#x} at {w}x{h} with {samples} samples is not usable (status {status:#x}, error {err:#x})" + ); + } + } +} + +/// The current frame of drawable `d` (X window `window`), `w` x `h` as the +/// caller's window is now. +/// +/// Presented straight into the window when a display is registered and knows +/// it -- `None` then. Otherwise the pixels for the program to put up itself: +/// `w` x `h` rows top first, each pixel the bytes A R G B, which is X's +/// big-endian 0x00RRGGBB with the pad byte a depth 24 image ignores -- or, +/// with `abgr`, A B G R (0x00BBGGRR), for a visual whose red is the low byte +/// (IMPACT's 24-bit visuals are all that way). +/// +/// Only the part both the drawable and the window have is read: the drawable +/// may still be the size it was before the window was resized, but the rows +/// are packed at the caller's width whatever happens (packing at the +/// drawable's width shears every row by the difference). +/// Where a finished frame goes. +#[derive(Clone, Copy, PartialEq, Eq, Debug)] +pub enum Sink { + /// Presented before the swap returns, as it always was. The answer is + /// recorded, so the drawable's later swaps know whether they may go the + /// other way. + Now, + /// Handed to the presenting thread, and the swap returns (see + /// `present.rs`). Refused -- and the frame then handed back to the program + /// like any unpresentable one -- for a drawable not yet known to present. + Queued, +} + +/// Hand a frame to `d`: at a screen position when the program gave one. +pub(crate) fn present_to( + d: &dyn iris_hostcall::Display, + window: u32, + at: Option<(i32, i32)>, + bgra: &[u8], + stride: usize, + w: usize, + h: usize, +) -> bool { + match at { + Some((x, y)) => d.present_at(window, x, y, bgra, stride, w, h), + None => d.present(window, bgra, stride, w, h), + } +} + +impl Sink { + /// True if the frame has been dealt with and the program needs no pixels. + fn deliver(self, window: u32, at: Option<(i32, i32)>, bgra: &[u8], stride: usize, w: usize, h: usize) -> bool { + match self { + Sink::Now => { + let ok = match iris_hostcall::display() { + Some(d) => present_to(d.as_ref(), window, at, bgra, stride, w, h), + None => false, + }; + crate::present::note(window, ok); + ok + } + Sink::Queued if crate::present::presents(window) => { + crate::present::queue(window, at, bgra, stride, w, h); + true + } + // Not a drawable we have seen present. Whether presenting works is + // only known afterwards, and an asynchronous swap has returned by + // then -- so present this one now, which answers the question, and + // let the next swap of this drawable be the fast one. A drawable + // that cannot be presented into stays here for ever and behaves + // exactly as it did before any of this. + Sink::Queued => Sink::Now.deliver(window, at, bgra, stride, w, h), + } + } +} + +pub fn swap(d: &Draw, window: u32, at: Option<(i32, i32)>, w: i32, h: i32, sink: Sink, abgr: bool) -> Option> { + let (w, h) = (w.max(0), h.max(0)); + let (rw, rh) = (w.min(d.w), h.min(d.h)); + let mut frame = vec![0u8; w as usize * h as usize * 4]; + if rw <= 0 || rh <= 0 { + return Some(frame); + } + let (rw, rh, wu) = (rw as usize, rh as usize, w as usize); + let mut presented = false; + // SAFETY: GL in the current context, which owns `d`; buffers sized for + // what is read into them. + unsafe { + // The program's state that a blit and a readback would honour. + let scissor = glIsEnabled(GL_SCISSOR_TEST) != 0; + let names = [GL_PACK_ALIGNMENT, GL_PACK_ROW_LENGTH, GL_PACK_SKIP_ROWS, GL_PACK_SKIP_PIXELS, GL_PACK_SWAP_BYTES, GL_PACK_LSB_FIRST]; + let mut pack = [0i32; 6]; + for (v, &n) in pack.iter_mut().zip(names.iter()) { + glGetIntegerv(n, v); + } + if scissor { + glDisable(GL_SCISSOR_TEST); + } + for (&n, &v) in names.iter().zip([1, 0, 0, 0, 0, 0].iter()) { + glPixelStorei(n, v); + } + + // A multisampled drawable is resolved before the flip: a resolve + // cannot flip, and a flip cannot resolve. + resolve(d); + // A flip target the presenting thread is not reading; with every one + // in use, wait for it (the guest is that far ahead of the display). + let n = d.flips.len().max(1); + let start = d.next_flip.load(Ordering::Relaxed); + let pick = (0..n).map(|i| (start + i) % n).find(|&i| !d.flips[i].busy.load(Ordering::Acquire)); + let idx = match pick { + Some(i) => i, + None => { + crate::present::drain(); + start % n + } + }; + let flip = &d.flips[idx]; + d.next_flip.store((idx + 1) % n, Ordering::Relaxed); + glBindFramebufferEXT(GL_READ_FRAMEBUFFER, read_source(d)); + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, flip.fbo); + glBlitFramebufferEXT(0, 0, rw as i32, rh as i32, 0, rh as i32, rw as i32, 0, GL_COLOR_BUFFER_BIT, GL_NEAREST); + + // Queued: the presenting thread maps the surface -- which waits for + // the GPU to finish the frame -- and presents it, and the swap + // returns now. Mapping it here stopped the whole emulated machine for + // that wait on every frame (powerflip: over half the CPU thread's + // time in IOSurfaceLock). + if let (Some(sf), Sink::Queued) = (&flip.surface, sink) { + if crate::present::presents(window) { + glFlush(); + flip.busy.store(true, Ordering::Release); + crate::present::queue_surface(window, at, sf.clone(), flip.busy.clone(), rw, rh); + for (&n, &v) in names.iter().zip(pack.iter()) { + glPixelStorei(n, v); + } + if scissor { + glEnable(GL_SCISSOR_TEST); + } + return None; + } + } + + // Copy BGRA rows (top first, `stride` bytes each) into the frame the + // program gets back, turning each pixel's bytes round. + let mut hand_back = |bgra: &[u8], stride: usize| { + for y in 0..rh { + let (src, dst) = (y * stride, y * wu * 4); + for x in 0..rw { + let (i, o) = (src + x * 4, dst + x * 4); + frame[o] = bgra[i + 3]; + if abgr { + frame[o + 1] = bgra[i]; + frame[o + 2] = bgra[i + 1]; + frame[o + 3] = bgra[i + 2]; + } else { + frame[o + 1] = bgra[i + 2]; + frame[o + 2] = bgra[i + 1]; + frame[o + 3] = bgra[i]; + } + } + } + }; + match &flip.surface { + // The blit has already put the frame where the CPU can see it. + // Submitted, not finished: locking the surface waits for the GPU + // work outstanding on it, so a flush is enough. + Some(sf) => { + glFlush(); + let mut done = false; + let mapped = sf.with_pixels(&mut |px, stride| { + presented = sink.deliver(window, at, px, stride, rw, rh); + if !presented && px.len() >= stride * rh && stride >= rw * 4 { + hand_back(px, stride); + } + done = true; + }); + if !mapped || !done { + log::warn!("host GL: a frame's surface could not be mapped"); + } + } + None => { + glBindFramebufferEXT(GL_READ_FRAMEBUFFER, flip.fbo); + glReadBuffer(GL_COLOR_ATTACHMENT0); + let mut bgra = vec![0u8; rw * rh * 4]; + glReadPixels(0, 0, rw as i32, rh as i32, GL_BGRA, GL_UNSIGNED_BYTE, bgra.as_mut_ptr() as *mut c_void); + presented = sink.deliver(window, at, &bgra, rw * 4, rw, rh); + if !presented { + hand_back(&bgra, rw * 4); + } + } + } + + for (&n, &v) in names.iter().zip(pack.iter()) { + glPixelStorei(n, v); + } + if scissor { + glEnable(GL_SCISSOR_TEST); + } + } + (!presented).then_some(frame) +} diff --git a/iris-hostgl/src/emul.rs b/iris-hostgl/src/emul.rs new file mode 100644 index 0000000..cf00209 --- /dev/null +++ b/iris-hostgl/src/emul.rs @@ -0,0 +1,1846 @@ +//! The SGI OpenGL extensions the Mac's OpenGL does not have. +//! +//! A high-end SGI's GL had texturing and fog features that no later hardware +//! kept: a colour table between the texel and the fragment, detail and sharpen +//! textures, a four-tap filter, fog by a table of the program's own points, a +//! depth taken from a plane. The Mac has none of them, and refuses even their +//! enumerants. +//! +//! They are done here in the fragment stage. IRIX's own fixed-function +//! pipeline is left alone -- matrices, lighting, the fog the program set up, +//! the vertex path -- and when one of these features is switched on, a +//! fragment shader replaces only the last step, reading that same fixed state +//! through GLSL's built-ins (`gl_TexCoord`, `gl_Color`, `gl_Fog`). When none +//! is on, no shader is bound and nothing about a program's rendering changes. +//! +//! Each shader is built for the state it must reproduce -- whether texturing +//! is on, the texture environment's mode, whether fog is on -- and kept, so a +//! program that turns a feature on and off pays for the build once. + +use std::collections::HashMap; +use std::ffi::{c_void, CString}; + +#[link(name = "OpenGL", kind = "framework")] +extern "C" { + fn glCreateShader(kind: u32) -> u32; + fn glShaderSource(s: u32, count: i32, strings: *const *const i8, lengths: *const i32); + fn glCompileShader(s: u32); + fn glGetShaderiv(s: u32, pname: u32, out: *mut i32); + fn glGetShaderInfoLog(s: u32, max: i32, len: *mut i32, log: *mut i8); + fn glCreateProgram() -> u32; + fn glAttachShader(p: u32, s: u32); + fn glLinkProgram(p: u32); + fn glGetProgramiv(p: u32, pname: u32, out: *mut i32); + fn glGetProgramInfoLog(p: u32, max: i32, len: *mut i32, log: *mut i8); + fn glUseProgram(p: u32); + fn glGetUniformLocation(p: u32, name: *const i8) -> i32; + fn glUniform1i(loc: i32, v: i32); + fn glUniform4f(loc: i32, a: f32, b: f32, c: f32, d: f32); + fn glUniform1f(loc: i32, v: f32); + fn glActiveTexture(unit: u32); + fn glGenTextures(n: i32, out: *mut u32); + fn glBindTexture(target: u32, tex: u32); + fn glTexImage1D(target: u32, level: i32, internal: i32, w: i32, border: i32, format: u32, ty: u32, data: *const c_void); + fn glTexImage2D(target: u32, level: i32, internal: i32, w: i32, h: i32, border: i32, format: u32, ty: u32, data: *const c_void); + fn glTexImage3D(target: u32, level: i32, internal: i32, w: i32, h: i32, d: i32, border: i32, format: u32, ty: u32, data: *const c_void); + fn glTexSubImage2D(target: u32, level: i32, x: i32, y: i32, w: i32, h: i32, format: u32, ty: u32, data: *const c_void); + fn glPushMatrix(); + fn glPopMatrix(); + fn glTranslatef(x: f32, y: f32, z: f32); + fn glMultMatrixf(m: *const f32); + fn glGetFloatv(pname: u32, out: *mut f32); + fn glMatrixMode(mode: u32); + fn glLoadIdentity(); + fn glOrtho(l: f64, r: f64, b: f64, t: f64, n: f64, f: f64); + fn glBegin(mode: u32); + fn glEnd(); + fn glTexCoord2f(s: f32, t: f32); + fn glVertex2f(x: f32, y: f32); + fn glTexParameteri(target: u32, pname: u32, v: i32); + fn glGetTexLevelParameteriv(target: u32, level: i32, pname: u32, out: *mut i32); + fn glUniform2f(loc: i32, a: f32, b: f32); + fn glGetIntegerv(pname: u32, out: *mut i32); + fn glGetDoublev(pname: u32, out: *mut f64); +} + +const FRAGMENT_SHADER: u32 = 0x8B30; +const COMPILE_STATUS: u32 = 0x8B81; +const LINK_STATUS: u32 = 0x8B82; +const GL_TEXTURE_1D: u32 = 0x0DE0; +const GL_TEXTURE0: u32 = 0x84C0; +const GL_TEXTURE1: u32 = 0x84C1; +const GL_RGBA: u32 = 0x1908; +const GL_UNSIGNED_BYTE: u32 = 0x1401; +const GL_TEXTURE_MIN_FILTER: u32 = 0x2801; +const GL_TEXTURE_MAG_FILTER: u32 = 0x2800; +const GL_TEXTURE_WRAP_S: u32 = 0x2802; +const GL_LINEAR: i32 = 0x2601; +const GL_CLAMP_TO_EDGE: i32 = 0x812F; +const GL_ACTIVE_TEXTURE: u32 = 0x84E0; + +/// The state the shader has to reproduce, and the features it adds. +pub const GL_TEXTURE_2D: u32 = 0x0DE1; +pub const GL_FOG: u32 = 0x0B60; +/// SGI_texture_color_table. +pub const GL_TEXTURE_COLOR_TABLE_SGI: u32 = 0x80BC; +/// SGIX_texture_scale_bias: what a texel is multiplied by and added to after +/// the filter, kept per texture as the extension defines it. +pub const GL_POST_TEXTURE_FILTER_SCALE_SGIX: u32 = 0x817A; +pub const GL_POST_TEXTURE_FILTER_BIAS_SGIX: u32 = 0x8179; +/// SGIS_fog_function: fog by a table of the program's own points, and +/// SGIX_fog_offset: fog shifted towards the eye. +pub const GL_FOG_FUNC_SGIS: u32 = 0x812A; +pub const GL_FOG_OFFSET_SGIX: u32 = 0x8198; +/// SGIX_reference_plane: a plane that gives the fragment its depth. +/// SGIS_texture_filter4: a four-tap filter with weights the program gives. +pub const GL_FILTER4_SGIS: u32 = 0x8146; +/// SGIS_sharpen_texture: magnification that extrapolates away from level 1. +const GL_LINEAR_SHARPEN_SGIS: u32 = 0x80AD; +const GL_LINEAR_SHARPEN_ALPHA_SGIS: u32 = 0x80AE; +const GL_LINEAR_SHARPEN_COLOR_SGIS: u32 = 0x80AF; +const GL_TEXTURE4: u32 = 0x84C4; +const GL_TEXTURE5: u32 = 0x84C5; +/// SGIS_detail_texture: a second texture added in by level-of-detail. +pub const GL_DETAIL_TEXTURE_2D_SGIS: u32 = 0x8095; +const GL_LINEAR_DETAIL_SGIS: u32 = 0x8097; +const GL_LINEAR_DETAIL_ALPHA_SGIS: u32 = 0x8098; +const GL_LINEAR_DETAIL_COLOR_SGIS: u32 = 0x8099; +const GL_DETAIL_TEXTURE_LEVEL_SGIS: u32 = 0x809A; +const GL_DETAIL_TEXTURE_MODE_SGIS: u32 = 0x809B; +const GL_ADD_ENUM: u32 = 0x0104; +/// SGIS_texture_select: internal formats that hold two or four textures' +/// worth of components, one group of which is selected per texture. +const GL_DUAL_ALPHA4_SGIS: u32 = 0x8110; +const GL_DUAL_LUMINANCE_ALPHA8_SGIS: u32 = 0x811D; +const GL_QUAD_ALPHA4_SGIS: u32 = 0x811E; +const GL_QUAD_INTENSITY8_SGIS: u32 = 0x8123; +const GL_DUAL_TEXTURE_SELECT_SGIS: u32 = 0x8124; +/// SGIS_texture4D: a fourth texture axis, kept as slabs of a 3D texture. +pub const GL_TEXTURE_4D_SGIS: u32 = 0x8134; +/// SGIX_sprite: geometry turned to face the eye before the modelview. +/// SGIX_pixel_texture: a transferred pixel's colour used as texture +/// coordinates, so an image can index a lookup table held as a texture. +/// SGIX_clipmap: a virtual texture far larger than memory, of which a window +/// around a moving centre is resident. +const GL_LINEAR_CLIPMAP_LINEAR_SGIX: u32 = 0x8170; +const GL_TEXTURE_CLIPMAP_CENTER_SGIX: u32 = 0x8171; +const GL_TEXTURE_CLIPMAP_FRAME_SGIX: u32 = 0x8172; +const GL_TEXTURE_CLIPMAP_OFFSET_SGIX: u32 = 0x8173; +const GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: u32 = 0x8174; +const GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX: u32 = 0x8175; +const GL_TEXTURE_CLIPMAP_DEPTH_SGIX: u32 = 0x8176; +const GL_LINEAR_MIPMAP_LINEAR: i32 = 0x2703; +pub const GL_PIXEL_TEX_GEN_SGIX: u32 = 0x8139; +const GL_TEXTURE8: u32 = 0x84C8; +const GL_CURRENT_RASTER_POSITION: u32 = 0x0B07; +const GL_CURRENT_RASTER_COLOR: u32 = 0x0B04; +const GL_VIEWPORT_ENUM: u32 = 0x0BA2; +pub const GL_SPRITE_SGIX: u32 = 0x8148; +const GL_SPRITE_MODE_SGIX: u32 = 0x8149; +const GL_SPRITE_AXIS_SGIX: u32 = 0x814A; +const GL_SPRITE_TRANSLATION_SGIX: u32 = 0x814B; +const GL_SPRITE_AXIAL_SGIX: u32 = 0x814C; +const GL_SPRITE_EYE_ALIGNED_SGIX: u32 = 0x814E; +const GL_TEXTURE_3D: u32 = 0x806F; +const GL_TEXTURE7: u32 = 0x84C7; +const GL_QUAD_TEXTURE_SELECT_SGIS: u32 = 0x8125; +pub const GL_TEXTURE_FILTER4_SIZE_SGIS: u32 = 0x8147; +const GL_NEAREST: i32 = 0x2600; +const GL_LUMINANCE: u32 = 0x1909; +const GL_LUMINANCE32F_ARB: i32 = 0x8818; +const GL_FLOAT: u32 = 0x1406; +const GL_TEXTURE_WIDTH: u32 = 0x1000; +const GL_TEXTURE_HEIGHT: u32 = 0x1001; +const GL_TEXTURE3: u32 = 0x84C3; +pub const GL_REFERENCE_PLANE_SGIX: u32 = 0x817D; +pub const GL_REFERENCE_PLANE_EQUATION_SGIX: u32 = 0x817E; +const GL_MODELVIEW_MATRIX: u32 = 0x0BA6; +const GL_PROJECTION_MATRIX: u32 = 0x0BA7; +const GL_VIEWPORT: u32 = 0x0BA2; +pub const GL_FOG_OFFSET_VALUE_SGIX: u32 = 0x8199; +const GL_FOG_MODE: u32 = 0x0B65; +const GL_LINEAR_FOG: u32 = 0x2601; +const GL_EXP_FOG: u32 = 0x0800; +const GL_EXP2_FOG: u32 = 0x0801; +const GL_TEXTURE2: u32 = 0x84C2; + +/// Texture environment modes the shader knows. +const GL_MODULATE: u32 = 0x2100; +const GL_REPLACE: u32 = 0x1E01; +const GL_DECAL: u32 = 0x2101; +const GL_BLEND: u32 = 0x0BE2; +const GL_ADD: u32 = 0x0104; + +#[derive(Default)] +pub struct Emul { + /// What the program has switched on, of the state the shader cares about. + texture_2d: bool, + fog: bool, + color_table: bool, + /// GL_TEXTURE_ENV_MODE, which the shader has to reproduce once it is the + /// one deciding the fragment's colour. + env_mode: u32, + /// The colour table, as a 1D texture, and whether it holds anything. + table_tex: u32, + table_ready: bool, + programs: HashMap, + current: u32, + reported: bool, + /// Scale and bias per texture (SGIX_texture_scale_bias), and which + /// texture is bound to the unit the shader samples. + scale_bias: HashMap, + bound_texture: u32, + /// The fog the program asked for. Once a shader owns the fragment stage + /// the fixed fog is bypassed, so whichever mode is in force has to be + /// worked out here. + fog_mode: u32, + fog_offset: bool, + fog_offset_value: f32, + /// SGIS_fog_function's points, resampled into a 1D texture, and the + /// distances its ends stand for. + fog_func_tex: u32, + fog_func_range: (f32, f32), + fog_func_ready: bool, + /// SGIX_reference_plane: the plane in clip coordinates, and whether the + /// program has switched it on. The equation the program gives is in object + /// coordinates and is transformed once, when it is given -- as the + /// specification says, and as glClipPlane does -- so a later change of + /// matrix does not move a plane that was already placed. + ref_plane: [f32; 4], + ref_plane_on: bool, + ref_plane_set: bool, + /// SGIS_texture_filter4: which textures the program asked to filter this + /// way, and the weights, resampled into a 1D float texture. The weights + /// go in a float texture rather than the byte one the colour table uses + /// because a sharpening kernel's are negative and greater than one. + filter4: std::collections::HashSet, + filter4_tex: u32, + filter4_ready: bool, + filter4_n: f32, + /// SGIS_sharpen_texture: which textures the program asked to magnify this + /// way and with which of the three filters, and the function F of + /// level-of-detail, resampled into a 1D float texture with the range of + /// LOD its ends stand for. F is signed and unbounded, like filter4's + /// weights, so it needs the float texture too. + sharpen: HashMap, + sharpen_tex: u32, + sharpen_range: (f32, f32), + sharpen_ready: bool, + /// SGIS_detail_texture: which textures want it, the detail image itself + /// (one texture object of ours, uploaded when the program names the + /// DETAIL_TEXTURE_2D_SGIS target), the F-of-LOD table, how many levels + /// finer the detail image is, and whether it adds or modulates. + detail: HashMap, + detail_tex: u32, + detail_ready: bool, + detail_func_tex: u32, + detail_range: (f32, f32), + detail_func_ready: bool, + detail_level: f32, + detail_add: bool, + /// SGIS_texture_select: per texture, which grouped format it was given + /// and which group the program selected. + select_fmt: HashMap, + select_group: HashMap, + /// SGIS_texture4D: the 3D texture the four-dimensional image is kept in, + /// how deep one slab is, and how many slabs there are. + tex4d: u32, + tex4d_depth: f32, + tex4d_size: f32, + tex4d_on: bool, + tex4d_ready: bool, + /// SGIX_sprite: the mode, the axis it keeps upright and the offset from + /// the object's origin, plus whether a sprite matrix is currently pushed. + sprite_on: bool, + sprite_mode: u32, + sprite_axis: [f32; 3], + sprite_translation: [f32; 3], + sprite_pushed: bool, + /// SGIX_pixel_texture: whether it is on, which components the fragment's + /// colour comes from, the texture the transferred image is staged in, and + /// the program that reads it. + pixel_tex_on: bool, + pixel_tex_mode: u32, + pixel_tex_img: u32, + pixel_tex_prog: HashMap, + /// SGIX_clipmap, as far as it goes here: the parameters are kept and + /// answered, and the filter falls back to ordinary mipmapping. See + /// `clipmap_faithful` for what that does and does not cover. + clipmap: HashMap, + /// The resident levels of the clipmap, one above the other in a single + /// image: level P occupies rows [P*C, (P+1)*C) of a C wide, C*L tall + /// texture. This is the whole trick -- an OpenGL mipmap chain halves every + /// level and so cannot hold the equal-sized windows a clipmap is made of, + /// but nothing stops us laying them out ourselves. + clipmap_tex: u32, + clipmap_c: i32, + clipmap_levels: i32, + clipmap_v: f32, + clipmap_ready: bool, +} + +impl Emul { + /// Is `cap` one this layer answers for? The Mac refuses these enumerants, + /// so they must not reach it. + pub fn owns(cap: u32) -> bool { + cap == GL_TEXTURE_COLOR_TABLE_SGI + || cap == GL_FOG_OFFSET_SGIX + || cap == GL_REFERENCE_PLANE_SGIX + || cap == GL_TEXTURE_4D_SGIS + || cap == GL_SPRITE_SGIX + || cap == GL_PIXEL_TEX_GEN_SGIX + } + + /// True when a shader is doing the fragment stage, so glGet of the + /// features' state comes from here. + pub fn is_enabled(&self, cap: u32) -> bool { + match cap { + GL_TEXTURE_COLOR_TABLE_SGI => self.color_table, + GL_FOG_OFFSET_SGIX => self.fog_offset, + GL_REFERENCE_PLANE_SGIX => self.ref_plane_on, + GL_TEXTURE_4D_SGIS => self.tex4d_on, + GL_SPRITE_SGIX => self.sprite_on, + GL_PIXEL_TEX_GEN_SGIX => self.pixel_tex_on, + _ => false, + } + } + + /// Record state the shader reproduces or adds. Returns whether the + /// fragment stage has to be rebuilt. + pub fn set_enable(&mut self, cap: u32, on: bool) -> bool { + match cap { + GL_TEXTURE_COLOR_TABLE_SGI => self.color_table = on, + GL_FOG_OFFSET_SGIX => self.fog_offset = on, + GL_REFERENCE_PLANE_SGIX => self.ref_plane_on = on, + GL_TEXTURE_2D => self.texture_2d = on, + GL_TEXTURE_4D_SGIS => self.tex4d_on = on, + GL_SPRITE_SGIX => self.sprite_on = on, + GL_PIXEL_TEX_GEN_SGIX => self.pixel_tex_on = on, + GL_FOG => self.fog = on, + _ => return false, + } + true + } + + pub fn set_env_mode(&mut self, mode: u32) { + self.env_mode = mode; + } + + /// glFog*: the mode a shader would have to reproduce, and the two SGI + /// parameters the Mac has not got. True when this layer took the call. + pub fn set_fog(&mut self, pname: u32, values: &[f32]) -> bool { + match pname { + GL_FOG_MODE => { + self.fog_mode = values.first().copied().unwrap_or(0.0) as u32; + // SGI's table mode is ours; the rest the Mac knows as well. + self.fog_mode == GL_FOG_FUNC_SGIS + } + GL_FOG_OFFSET_VALUE_SGIX => { + // Four values: the offset's point and its distance. + self.fog_offset_value = values.get(3).copied().unwrap_or(0.0); + true + } + _ => false, + } + } + + /// SGIS_fog_function's points: (distance, fog factor), increasing. They + /// become a 1D texture the shader reads by distance. + pub fn set_fog_func(&mut self, points: &[f32]) { + let n = points.len() / 2; + if n < 2 { + self.fog_func_ready = false; + return; + } + let (x0, x1) = (points[0], points[(n - 1) * 2]); + if !(x1 > x0) { + self.fog_func_ready = false; + return; + } + // One entry per step across the range, each the factor at that distance. + const STEPS: usize = 256; + let mut table = vec![0u8; STEPS * 4]; + for (i, out) in table.chunks_exact_mut(4).enumerate() { + let x = x0 + (x1 - x0) * i as f32 / (STEPS - 1) as f32; + let mut f = points[1]; + for k in 1..n { + let (xa, ya) = (points[(k - 1) * 2], points[(k - 1) * 2 + 1]); + let (xb, yb) = (points[k * 2], points[k * 2 + 1]); + if x >= xa && x <= xb && xb > xa { + f = ya + (yb - ya) * (x - xa) / (xb - xa); + break; + } + f = yb; + } + let v = (f.clamp(0.0, 1.0) * 255.0) as u8; + out[0] = v; + out[1] = v; + out[2] = v; + out[3] = 255; + } + unsafe { + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE2); + if self.fog_func_tex == 0 { + self.fog_func_tex = super::internal_texture_name(); + } + glBindTexture(GL_TEXTURE_1D, self.fog_func_tex); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA as i32, STEPS as i32, 0, GL_RGBA, GL_UNSIGNED_BYTE, table.as_ptr() as *const c_void); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + } + self.fog_func_range = (x0, x1); + self.fog_func_ready = true; + } + + pub fn bound_texture(&self) -> u32 { + self.bound_texture + } + + pub fn bind_texture(&mut self, target: u32, texture: u32) { + if target == GL_TEXTURE_2D { + self.bound_texture = texture; + } + } + + /// A texture parameter the Mac has not got: scale or bias after the + /// filter. True when it was ours to take. + pub fn set_tex_parameter(&mut self, pname: u32, values: &[f32]) -> bool { + // SGIS_texture_filter4 arrives as a filter mode, and the Mac would + // refuse the enumerant. The shader does the taps itself, so the host + // is left sampling single texels. + if (pname == GL_TEXTURE_MIN_FILTER || pname == GL_TEXTURE_MAG_FILTER) + && values.first().map(|v| *v as u32) == Some(GL_FILTER4_SGIS) + { + self.filter4.insert(self.bound_texture); + unsafe { glTexParameteri(GL_TEXTURE_2D, pname, GL_NEAREST) }; + return true; + } + if self.set_clipmap(pname, values) { + return true; + } + // SGIX_clipmap's filter, with no clipmap behind it (see set_clipmap): + // the Mac would refuse the enumerant, and ordinary mipmapping is what + // a clipmap reduces to when nothing is clipped. + if pname == GL_TEXTURE_MIN_FILTER + && values.first().map(|v| *v as u32) == Some(GL_LINEAR_CLIPMAP_LINEAR_SGIX) + { + unsafe { glTexParameteri(GL_TEXTURE_2D, pname, GL_LINEAR_MIPMAP_LINEAR) }; + return true; + } + // SGIS_detail_texture's parameters and its three filters. + if self.set_select(pname, values.first().copied().unwrap_or(0.0) as u32) { + return true; + } + if pname == GL_DETAIL_TEXTURE_LEVEL_SGIS { + self.detail_level = values.first().copied().unwrap_or(0.0); + return true; + } + if pname == GL_DETAIL_TEXTURE_MODE_SGIS { + self.detail_add = values.first().map(|v| *v as u32) == Some(GL_ADD_ENUM); + return true; + } + if pname == GL_TEXTURE_MAG_FILTER { + match values.first().map(|v| *v as u32) { + Some(f @ (GL_LINEAR_DETAIL_SGIS | GL_LINEAR_DETAIL_ALPHA_SGIS | GL_LINEAR_DETAIL_COLOR_SGIS)) => { + self.detail.insert(self.bound_texture, f); + unsafe { glTexParameteri(GL_TEXTURE_2D, pname, GL_LINEAR) }; + return true; + } + _ => { + self.detail.remove(&self.bound_texture); + } + } + } + // SGIS_sharpen_texture's three magnification filters, likewise. + if pname == GL_TEXTURE_MAG_FILTER { + match values.first().map(|v| *v as u32) { + Some(f @ (GL_LINEAR_SHARPEN_SGIS | GL_LINEAR_SHARPEN_ALPHA_SGIS | GL_LINEAR_SHARPEN_COLOR_SGIS)) => { + self.sharpen.insert(self.bound_texture, f); + unsafe { glTexParameteri(GL_TEXTURE_2D, pname, GL_LINEAR) }; + return true; + } + _ => { + self.sharpen.remove(&self.bound_texture); + } + } + } + if (pname == GL_TEXTURE_MIN_FILTER || pname == GL_TEXTURE_MAG_FILTER) + && self.filter4.contains(&self.bound_texture) + { + // Back to an ordinary filter: the program has taken it off again. + self.filter4.remove(&self.bound_texture); + return false; + } + let entry = self.scale_bias.entry(self.bound_texture).or_insert(([1.0; 4], [0.0; 4])); + let slot = match pname { + GL_POST_TEXTURE_FILTER_SCALE_SGIX => &mut entry.0, + GL_POST_TEXTURE_FILTER_BIAS_SGIX => &mut entry.1, + _ => return false, + }; + for (d, s) in slot.iter_mut().zip(values.iter()) { + *d = *s; + } + true + } + + /// Which detail filter the bound texture wants: 0 none, 1 every + /// component, 2 alpha alone, 3 colour alone. Needs both the image and the + /// function, since either alone says nothing. + fn detail_kind(&self) -> u32 { + if !self.detail_ready || !self.detail_func_ready { + return 0; + } + match self.detail.get(&self.bound_texture) { + Some(&GL_LINEAR_DETAIL_SGIS) => 1, + Some(&GL_LINEAR_DETAIL_ALPHA_SGIS) => 2, + Some(&GL_LINEAR_DETAIL_COLOR_SGIS) => 3, + _ => 0, + } + } + + /// Which sharpen filter the bound texture wants: 0 none, 1 every + /// component, 2 alpha alone, 3 colour alone. + fn sharpen_kind(&self) -> u32 { + if !self.sharpen_ready { + return 0; + } + match self.sharpen.get(&self.bound_texture) { + Some(&GL_LINEAR_SHARPEN_SGIS) => 1, + Some(&GL_LINEAR_SHARPEN_ALPHA_SGIS) => 2, + Some(&GL_LINEAR_SHARPEN_COLOR_SGIS) => 3, + _ => 0, + } + } + + /// The scale and bias in force for the texture now bound, if they are not + /// the identity. + fn active_scale_bias(&self) -> Option<([f32; 4], [f32; 4])> { + let (scale, bias) = *self.scale_bias.get(&self.bound_texture)?; + let plain = scale == [1.0; 4] && bias == [0.0; 4]; + (!plain).then_some((scale, bias)) + } + + /// Whether the fragment stage is ours at all: only then is a program bound. + fn wanted(&self) -> bool { + let texture_feature = + self.texture_2d && ((self.color_table && self.table_ready) || self.active_scale_bias().is_some()); + let fog_feature = self.fog && (self.fog_offset || (self.fog_mode == GL_FOG_FUNC_SGIS && self.fog_func_ready)); + let filter4 = self.texture_2d && self.filter4_ready && self.filter4.contains(&self.bound_texture); + let sharpen = self.texture_2d && self.sharpen_ready && self.sharpen.contains_key(&self.bound_texture); + let detail = self.texture_2d && self.detail_kind() != 0; + let select = self.texture_2d && self.select_kind() != 0; + let tex4d = self.tex4d_on && self.tex4d_ready; + let clipmap = self.texture_2d && self.clipmap_on(); + texture_feature || fog_feature || filter4 || sharpen || detail || select || tex4d || clipmap + || (self.ref_plane_on && self.ref_plane_set) + } + + /// glTexFilterFuncSGIS: the filter function f, sampled over [0, 2]. + /// + /// The specification says weights[i] is f((2*i)/(n-1)), so the array is + /// already f at evenly spaced distances and goes into the texture as it + /// stands -- the shader reads it back with distance/2 as the coordinate. + pub fn set_filter_func(&mut self, filter: u32, weights: &[f32]) -> bool { + if filter != GL_FILTER4_SGIS || weights.len() < 2 { + return false; + } + unsafe { + if self.filter4_tex == 0 { + self.filter4_tex = super::internal_texture_name(); + } + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE3); + glBindTexture(GL_TEXTURE_1D, self.filter4_tex); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexImage1D( + GL_TEXTURE_1D, + 0, + GL_LUMINANCE32F_ARB, + weights.len() as i32, + 0, + GL_LUMINANCE, + GL_FLOAT, + weights.as_ptr() as *const c_void, + ); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + } + self.filter4_n = weights.len() as f32; + self.filter4_ready = true; + true + } + + /// glSharpenTexFuncSGIS's points: (LOD, F) pairs, sorted by LOD, with a + /// straight line between neighbours -- which the specification allows + /// ("this curve may be linear between adjacent points ... but it will pass + /// exactly through the points"). + pub fn set_sharpen_func(&mut self, points: &[f32]) { + let n = points.len() / 2; + if n < 2 { + self.sharpen_ready = false; + return; + } + let (x0, x1) = (points[0], points[(n - 1) * 2]); + if !(x1 > x0) { + self.sharpen_ready = false; + return; + } + const STEPS: usize = 256; + let mut table = vec![0f32; STEPS]; + for (i, out) in table.iter_mut().enumerate() { + let x = x0 + (x1 - x0) * i as f32 / (STEPS - 1) as f32; + *out = piecewise(points, n, x); + } + unsafe { + if self.sharpen_tex == 0 { + self.sharpen_tex = super::internal_texture_name(); + } + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE4); + glBindTexture(GL_TEXTURE_1D, self.sharpen_tex); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexImage1D(GL_TEXTURE_1D, 0, GL_LUMINANCE32F_ARB, STEPS as i32, 0, + GL_LUMINANCE, GL_FLOAT, table.as_ptr() as *const c_void); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + } + self.sharpen_range = (x0, x1); + self.sharpen_ready = true; + } + + /// SGIX_clipmap's parameters. + /// + /// **This keeps the state; it is not a clipmap.** A real one holds the + /// finer levels as equal-sized windows into a much larger virtual texture + /// and slides them as the centre moves -- and equal-sized levels are + /// exactly what an OpenGL mipmap chain cannot hold, since every level is + /// half the one before. Emulating it properly needs the clipped levels + /// packed into one image as a strip, with the level chosen, wrapped + /// toroidally and blended in the shader. + /// + /// So the parameters are accepted and answered, and + /// LINEAR_CLIPMAP_LINEAR falls back to LINEAR_MIPMAP_LINEAR: a program + /// that uses a clipmap no larger than its resident levels draws + /// correctly, and one that relies on a moving centre does not. + /// `GL_SGIX_clipmap` is deliberately **not advertised** for that reason. + pub fn set_clipmap(&mut self, pname: u32, values: &[f32]) -> bool { + // centre (2), offset (2), the (D, N+1, V+1) triple (3), frame, lod bias. + let (slot, n) = match pname { + GL_TEXTURE_CLIPMAP_CENTER_SGIX => (0, 2), + GL_TEXTURE_CLIPMAP_OFFSET_SGIX => (2, 2), + GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX => (4, 3), + GL_TEXTURE_CLIPMAP_FRAME_SGIX => (7, 1), + GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX => (8, 1), + _ => return false, + }; + let e = self.clipmap.entry(self.bound_texture).or_insert([0.0; 10]); + for (i, v) in values.iter().take(n).enumerate() { + e[slot + i] = *v; + } + true + } + + /// Is the bound texture a clipmap with something in it? + fn clipmap_on(&self) -> bool { + self.clipmap_ready && self.clipmap.contains_key(&self.bound_texture) + } + + /// One level of a clipmap, into its band of the strip. + /// + /// The clip size is taken from the first level that arrives, which is the + /// finest and therefore the widest clipped one; the levels below it are + /// the same size while they are clipped and smaller once the virtual level + /// fits, which `exp2(V - P)` says without having to remember each. + pub fn clipmap_image( + &mut self, + level: i32, + w: i32, + h: i32, + format: u32, + ty: u32, + pixels: *const c_void, + ) -> bool { + let Some(¶ms) = self.clipmap.get(&self.bound_texture) else { return false }; + if w <= 0 || h <= 0 { + return false; + } + // (D, N+1, V+1): the number of resident levels, and the virtual + // pyramid's depth, from which the finest virtual size is 2^V. + let levels = (params[5] as i32).max(1); + self.clipmap_v = (params[6] - 1.0).max(0.0); + if self.clipmap_c == 0 { + self.clipmap_c = w.max(h); + self.clipmap_levels = levels; + unsafe { + if self.clipmap_tex == 0 { + self.clipmap_tex = super::internal_texture_name(); + } + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE8 + 1); + glBindTexture(GL_TEXTURE_2D, self.clipmap_tex); + // Sampled a texel at a time: the strip is filtered by hand, + // because a band boundary and a toroidal seam are both places + // where the hardware's filter would blend the wrong texels. + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, 0x2803, GL_CLAMP_TO_EDGE); + glTexImage2D(GL_TEXTURE_2D, 0, 0x1908, self.clipmap_c, + self.clipmap_c * self.clipmap_levels, 0, 0x1908, GL_UNSIGNED_BYTE, + std::ptr::null()); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + } + } + if level < 0 || level >= self.clipmap_levels { + return true; // beyond what is resident: the program said so itself + } + unsafe { + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE8 + 1); + glBindTexture(GL_TEXTURE_2D, self.clipmap_tex); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, level * self.clipmap_c, w, h, format, ty, pixels); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + } + self.clipmap_ready = true; + true + } + + /// What `glGetTexParameter` should answer for a clipmap parameter. + pub fn clipmap_get(&self, pname: u32, out: &mut [f32]) -> bool { + let Some(e) = self.clipmap.get(&self.bound_texture) else { return false }; + let (slot, n) = match pname { + GL_TEXTURE_CLIPMAP_CENTER_SGIX => (0, 2), + GL_TEXTURE_CLIPMAP_OFFSET_SGIX => (2, 2), + GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX => (4, 3), + GL_TEXTURE_CLIPMAP_DEPTH_SGIX => (5, 1), + GL_TEXTURE_CLIPMAP_FRAME_SGIX => (7, 1), + GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX => (8, 1), + _ => return false, + }; + for i in 0..n.min(out.len()) { + out[i] = e[slot + i]; + } + true + } + + /// glPixelTexGenSGIX: which components of the fragment's colour come from + /// the pixel and which from the current raster position. + pub fn set_pixel_tex_gen(&mut self, mode: u32) { + self.pixel_tex_mode = mode; + } + + /// glDrawPixels under SGIX_pixel_texture. + /// + /// "The pixel group's red becomes the fragment S texture coordinate", and + /// so on for green, blue and alpha. There is no such stage on the Mac, so + /// the transfer is done as a drawing instead: the image is staged in a + /// texture, a screen-aligned quad is drawn over the destination rectangle, + /// and a shader reads the staged pixel, uses it as a coordinate into the + /// texture the program has bound, and composes the colour the mode asks + /// for. True when this took the call. + #[allow(clippy::too_many_arguments)] + pub fn draw_pixels_textured(&mut self, w: i32, h: i32, format: u32, ty: u32, pixels: *const c_void) -> bool { + if !self.pixel_tex_on || w <= 0 || h <= 0 { + return false; + } + let program = self.pixel_tex_program(); + if program == 0 { + return false; + } + let (mut raster, mut colour, mut vp) = ([0f32; 4], [0f32; 4], [0i32; 4]); + unsafe { + glGetFloatv(GL_CURRENT_RASTER_POSITION, raster.as_mut_ptr()); + glGetFloatv(GL_CURRENT_RASTER_COLOR, colour.as_mut_ptr()); + glGetIntegerv(GL_VIEWPORT_ENUM, vp.as_mut_ptr()); + + // The image goes into a texture of ours, sampled a texel at a time + // so the pixels arrive at the shader exactly as the program wrote + // them rather than filtered into each other. + if self.pixel_tex_img == 0 { + self.pixel_tex_img = super::internal_texture_name(); + } + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE8); + glBindTexture(GL_TEXTURE_2D, self.pixel_tex_img); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, 0x2803, GL_CLAMP_TO_EDGE); + glTexImage2D(GL_TEXTURE_2D, 0, 0x1908, w, h, 0, format, ty, pixels); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + + glUseProgram(program); + for (name, v) in [("hgl_px_raster", colour)] { + let n = CString::new(name).unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform4f(loc, v[0], v[1], v[2], v[3]); + } + } + for (name, u) in [("hgl_px_image", 8i32), ("hgl_px_tex", 0)] { + let n = CString::new(name).unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform1i(loc, u); + } + } + + // A quad over exactly the pixels glDrawPixels would have written, + // in window coordinates, with the matrices put back afterwards. + glMatrixMode(0x1701 /* PROJECTION */); + glPushMatrix(); + glLoadIdentity(); + glOrtho(vp[0] as f64, (vp[0] + vp[2]) as f64, vp[1] as f64, (vp[1] + vp[3]) as f64, -1.0, 1.0); + glMatrixMode(0x1700 /* MODELVIEW */); + glPushMatrix(); + glLoadIdentity(); + let (x0, y0) = (raster[0], raster[1]); + let (x1, y1) = (x0 + w as f32, y0 + h as f32); + glBegin(7 /* GL_QUADS */); + glTexCoord2f(0.0, 0.0); + glVertex2f(x0, y0); + glTexCoord2f(1.0, 0.0); + glVertex2f(x1, y0); + glTexCoord2f(1.0, 1.0); + glVertex2f(x1, y1); + glTexCoord2f(0.0, 1.0); + glVertex2f(x0, y1); + glEnd(); + glPopMatrix(); + glMatrixMode(0x1701); + glPopMatrix(); + glMatrixMode(0x1700); + glUseProgram(self.current); + } + true + } + + fn pixel_tex_program(&mut self) -> u32 { + let key = self.pixel_tex_mode; + if let Some(&p) = self.pixel_tex_prog.get(&key) { + return p; + } + // NONE takes the whole colour from the pixel, RGBA the whole of it + // from the raster position, and the two in between split it. + let colour = match key { + 0x1906 => "vec4(px.rgb, hgl_px_raster.a);", // ALPHA + 0x1907 => "vec4(hgl_px_raster.rgb, px.a);", // RGB + 0x1908 => "hgl_px_raster;", // RGBA + _ => "px;", // NONE + }; + let src = format!( + r#"#version 120 +uniform sampler2D hgl_px_image; +uniform sampler2D hgl_px_tex; +uniform vec4 hgl_px_raster; +void main() +{{ + vec4 px = texture2D(hgl_px_image, gl_TexCoord[0].st); + vec4 c = {colour} + gl_FragColor = c * texture2D(hgl_px_tex, px.st); +}} +"# + ); + let p = self.compile(&src); + self.pixel_tex_prog.insert(key, p); + p + } + + /// glSpriteParameter*SGIX. + pub fn set_sprite(&mut self, pname: u32, values: &[f32]) -> bool { + match pname { + GL_SPRITE_MODE_SGIX => self.sprite_mode = values.first().copied().unwrap_or(0.0) as u32, + GL_SPRITE_AXIS_SGIX => { + for (d, v) in self.sprite_axis.iter_mut().zip(values) { + *d = *v; + } + } + GL_SPRITE_TRANSLATION_SGIX => { + for (d, v) in self.sprite_translation.iter_mut().zip(values) { + *d = *v; + } + } + _ => return false, + } + true + } + + /// Put the sprite transformation in front of the modelview for the + /// primitive about to be drawn, and take it away again afterwards. + /// + /// The specification's compound matrix is MM = M * T * A * R, so the + /// sprite part multiplies *after* the modelview -- which is what + /// glMultMatrix does to the current matrix, and means the fixed pipeline + /// can do this with no vertex shader at all. + pub fn sprite_begin(&mut self) { + if !self.sprite_on || self.sprite_pushed { + return; + } + let mut mv = [0f64; 16]; + unsafe { glGetDoublev(GL_MODELVIEW_MATRIX, mv.as_mut_ptr()) }; + let Some(inv) = invert4(&mv) else { return }; + // The eye is the origin of eye coordinates, so its object-space + // position is the inverse modelview's fourth column. + let w = inv[15] as f32; + let mut eye = [inv[12] as f32, inv[13] as f32, inv[14] as f32]; + if w.abs() > 1e-9 { + eye = [eye[0] / w, eye[1] / w, eye[2] / w]; + } + // An eye-aligned sprite's axis is given in eye coordinates, so it + // comes back to object coordinates as a direction. + let axis = if self.sprite_mode == GL_SPRITE_EYE_ALIGNED_SGIX { + let a = self.sprite_axis; + [ + (inv[0] as f32) * a[0] + (inv[4] as f32) * a[1] + (inv[8] as f32) * a[2], + (inv[1] as f32) * a[0] + (inv[5] as f32) * a[1] + (inv[9] as f32) * a[2], + (inv[2] as f32) * a[0] + (inv[6] as f32) * a[1] + (inv[10] as f32) * a[2], + ] + } else { + self.sprite_axis + }; + let r = if self.sprite_mode == GL_SPRITE_AXIAL_SGIX { + axial(axis, eye) + } else { + face(axis, eye) + }; + unsafe { + glPushMatrix(); + glTranslatef( + self.sprite_translation[0], + self.sprite_translation[1], + self.sprite_translation[2], + ); + glMultMatrixf(r.as_ptr()); + } + self.sprite_pushed = true; + } + + pub fn sprite_end(&mut self) { + if self.sprite_pushed { + unsafe { glPopMatrix() }; + self.sprite_pushed = false; + } + } + + /// glTexImage4DSGIS. There is no fourth texture axis on the Mac, so the + /// image is stored as a 3D texture `depth * size4d` deep -- the slabs laid + /// end to end, which is the order the guest's own pixels already arrive in + /// -- and the shader interpolates between two slabs to filter the fourth + /// coordinate. Mipmapping is not supported by the extension either, so + /// only level zero exists and nothing is lost by that. + #[allow(clippy::too_many_arguments)] + pub fn set_texture_4d( + &mut self, + internal: i32, + w: i32, + h: i32, + d: i32, + size4d: i32, + border: i32, + format: u32, + ty: u32, + pixels: *const c_void, + ) { + if w <= 0 || h <= 0 || d <= 0 || size4d <= 0 { + return; + } + unsafe { + if self.tex4d == 0 { + self.tex4d = super::internal_texture_name(); + } + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE7); + glBindTexture(GL_TEXTURE_3D, self.tex4d); + glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_3D, 0x2803 /* WRAP_T */, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_3D, 0x8072 /* WRAP_R */, GL_CLAMP_TO_EDGE); + glTexImage3D(GL_TEXTURE_3D, 0, internal, w, h, d * size4d, border, format, ty, pixels); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + } + self.tex4d_depth = d as f32; + self.tex4d_size = size4d as f32; + self.tex4d_ready = true; + } + + /// SGIS_texture_select's internal formats, and how a group is read back. + /// + /// The formats hold several textures' components side by side in one + /// image; the Mac has no such enumerant, so the image is stored as plain + /// RGBA -- which is the layout the components are already in -- and the + /// shader presents the selected group as if it were the whole texture. + /// + /// DUAL_{ALPHA,LUMINANCE,INTENSITY}: group 0 is red, group 1 is alpha + /// DUAL_LUMINANCE_ALPHA: group 0 is (red, green), 1 is (blue, alpha) + /// QUAD_*: group i is component i + /// + /// Returns the internal format to give the host, or None when this is not + /// one of these formats. + pub fn select_format(&mut self, texture: u32, internal: i32) -> Option { + let f = internal as u32; + let grouped = (GL_DUAL_ALPHA4_SGIS..=GL_QUAD_INTENSITY8_SGIS).contains(&f); + if !grouped { + self.select_fmt.remove(&texture); + return None; + } + self.select_fmt.insert(texture, f); + Some(0x1908) // GL_RGBA: every component kept, whatever the group wants + } + + /// The group number a DUAL_/QUAD_ texture parameter selects. + pub fn set_select(&mut self, pname: u32, value: u32) -> bool { + if pname != GL_DUAL_TEXTURE_SELECT_SGIS && pname != GL_QUAD_TEXTURE_SELECT_SGIS { + return false; + } + self.select_group.insert(self.bound_texture, value); + true + } + + /// How the bound texture's selected group is read: 0 none, otherwise + /// 1 + the swizzle case. Kept small because it goes in the shader key. + fn select_kind(&self) -> u32 { + let Some(&f) = self.select_fmt.get(&self.bound_texture) else { return 0 }; + let g = *self.select_group.get(&self.bound_texture).unwrap_or(&0); + let quad = f >= GL_QUAD_ALPHA4_SGIS; + let la = f == GL_DUAL_LUMINANCE_ALPHA8_SGIS || f == GL_DUAL_LUMINANCE_ALPHA8_SGIS - 1; + if quad { + 1 + (g & 3) + } else if la { + 5 + (g & 1) + } else { + 7 + (g & 1) + } + } + + /// glDetailTexFuncSGIS's points: the same (LOD, F) shape as sharpen's. + pub fn set_detail_func(&mut self, points: &[f32]) { + let n = points.len() / 2; + if n < 2 { + self.detail_func_ready = false; + return; + } + let (x0, x1) = (points[0], points[(n - 1) * 2]); + if !(x1 > x0) { + self.detail_func_ready = false; + return; + } + const STEPS: usize = 256; + let mut table = vec![0f32; STEPS]; + for (i, out) in table.iter_mut().enumerate() { + *out = piecewise(points, n, x0 + (x1 - x0) * i as f32 / (STEPS - 1) as f32); + } + unsafe { + if self.detail_func_tex == 0 { + self.detail_func_tex = super::internal_texture_name(); + } + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE5); + glBindTexture(GL_TEXTURE_1D, self.detail_func_tex); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexImage1D(GL_TEXTURE_1D, 0, GL_LUMINANCE32F_ARB, STEPS as i32, 0, + GL_LUMINANCE, GL_FLOAT, table.as_ptr() as *const c_void); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + } + self.detail_range = (x0, x1); + self.detail_func_ready = true; + } + + /// The detail image itself. The program names it with a target of its own, + /// DETAIL_TEXTURE_2D_SGIS, which the Mac would refuse -- so it goes into a + /// texture object of ours on a unit the shader reads, and the binding the + /// program had is put back so nothing else notices. + pub fn set_detail_image( + &mut self, + level: i32, + internal: i32, + w: i32, + h: i32, + border: i32, + format: u32, + ty: u32, + pixels: *const c_void, + ) { + unsafe { + if self.detail_tex == 0 { + self.detail_tex = super::internal_texture_name(); + } + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE5 + 1); + glBindTexture(GL_TEXTURE_2D, self.detail_tex); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexImage2D(GL_TEXTURE_2D, level, internal, w, h, border, format, ty, pixels); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + } + self.detail_ready = true; + } + + /// glReferencePlaneSGIX: the plane the fragment's depth comes from. + /// + /// The equation arrives in object coordinates and the specification says + /// it is "transformed by the transpose-adjoint of a matrix that is the + /// complete object-coordinate to clip-coordinate transformation" -- the + /// same treatment glClipPlane gives its plane, and for the same reason: + /// the plane is placed in the world when it is given, not when it is used. + /// The adjoint's determinant scales the whole equation and so cancels out + /// of `-(d + a x + b y) / c`, which leaves the inverse-transpose. + pub fn set_reference_plane(&mut self, equation: &[f64]) { + if equation.len() < 4 { + return; + } + let (mut mv, mut pr) = ([0f64; 16], [0f64; 16]); + unsafe { + glGetDoublev(GL_MODELVIEW_MATRIX, mv.as_mut_ptr()); + glGetDoublev(GL_PROJECTION_MATRIX, pr.as_mut_ptr()); + } + // Column-major, as GL hands them over: m[c * 4 + r]. + let mut mvp = [0f64; 16]; + for c in 0..4 { + for r in 0..4 { + mvp[c * 4 + r] = (0..4).map(|k| pr[k * 4 + r] * mv[c * 4 + k]).sum(); + } + } + let Some(inv) = invert4(&mvp) else { + // A singular matrix places no plane; leave the last one alone. + return; + }; + // (M^-1)^T * p, with the transpose folded into the indexing. + let mut out = [0f32; 4]; + for i in 0..4 { + let v: f64 = (0..4).map(|k| inv[i * 4 + k] * equation[k]).sum(); + out[i] = v as f32; + } + self.ref_plane = out; + self.ref_plane_set = true; + } + + /// SGI_texture_color_table's table: kept as a 1D texture the shader reads, + /// one entry per level of each component. + pub fn set_color_table(&mut self, width: i32, rgba: &[u8]) { + if width <= 0 || rgba.len() < width as usize * 4 { + self.table_ready = false; + return; + } + unsafe { + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE1); + if self.table_tex == 0 { + self.table_tex = super::internal_texture_name(); + } + glBindTexture(GL_TEXTURE_1D, self.table_tex); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA as i32, width, 0, GL_RGBA, GL_UNSIGNED_BYTE, rgba.as_ptr() as *const c_void); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + } + self.table_ready = true; + } + + /// Bind the fragment stage for the state as it now is, or none of ours. + pub fn update(&mut self) { + if !self.wanted() { + if self.current != 0 { + unsafe { glUseProgram(0) }; + self.current = 0; + } + return; + } + let table = self.color_table && self.table_ready; + let scaled = self.active_scale_bias().is_some(); + let fog_kind = match self.fog_mode { + GL_EXP_FOG => 1, + GL_EXP2_FOG => 2, + GL_FOG_FUNC_SGIS if self.fog_func_ready => 3, + _ => 0, // linear + }; + let key = (self.env_mode as u64 & 0xffff) + | (self.fog as u64) << 16 + | (self.texture_2d as u64) << 17 + | (table as u64) << 18 + | (scaled as u64) << 19 + | (self.fog_offset as u64) << 20 + | (fog_kind as u64) << 21 + | ((self.ref_plane_on && self.ref_plane_set) as u64) << 23 + | ((self.filter4_ready && self.filter4.contains(&self.bound_texture)) as u64) << 24 + | (self.sharpen_kind() as u64) << 25 + | (self.detail_kind() as u64) << 27 + | (self.detail_add as u64) << 29 + | (self.select_kind() as u64) << 32 + | ((self.tex4d_on && self.tex4d_ready) as u64) << 36 + | (self.clipmap_on() as u64) << 37; + let program = match self.programs.get(&key) { + Some(&p) => p, + None => { + let p = self.build(key); + self.programs.insert(key, p); + p + } + }; + if program == 0 { + return; + } + if self.current != program { + unsafe { glUseProgram(program) }; + self.current = program; + } + unsafe { + let mut unit = 0i32; + glGetIntegerv(GL_ACTIVE_TEXTURE, &mut unit); + glActiveTexture(GL_TEXTURE1); + glBindTexture(GL_TEXTURE_1D, self.table_tex); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + glActiveTexture(GL_TEXTURE2); + glBindTexture(GL_TEXTURE_1D, self.fog_func_tex); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + for (name, v) in [ + ("hgl_fog_x0", self.fog_func_range.0), + ("hgl_fog_x1", self.fog_func_range.1), + ("hgl_fog_offset", self.fog_offset_value), + ] { + let n = CString::new(name).unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform1f(loc, v); + } + } + if self.filter4_ready && self.filter4.contains(&self.bound_texture) { + glActiveTexture(GL_TEXTURE3); + glBindTexture(GL_TEXTURE_1D, self.filter4_tex); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + // The taps are a texel apart, so the shader needs the size in + // texels. Asked of the host rather than remembered: the + // program may have loaded the texture by any of a dozen calls. + let (mut w, mut h) = (0i32, 0i32); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &mut w); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &mut h); + let n = CString::new("hgl_texsize").unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform2f(loc, w.max(1) as f32, h.max(1) as f32); + } + let n = CString::new("hgl_f4_n").unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform1f(loc, self.filter4_n); + } + } + if self.clipmap_on() { + glActiveTexture(GL_TEXTURE8 + 1); + glBindTexture(GL_TEXTURE_2D, self.clipmap_tex); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + let p = self.clipmap.get(&self.bound_texture).copied().unwrap_or([0.0; 10]); + for (name, v) in [ + ("hgl_cm_c", self.clipmap_c as f32), + ("hgl_cm_levels", self.clipmap_levels as f32), + ("hgl_cm_v", self.clipmap_v), + ] { + let n = CString::new(name).unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform1f(loc, v); + } + } + for (name, a, b) in [ + ("hgl_cm_centre", p[0], p[1]), + ("hgl_cm_offset", p[2], p[3]), + ] { + let n = CString::new(name).unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform2f(loc, a, b); + } + } + } + if self.tex4d_on && self.tex4d_ready { + glActiveTexture(GL_TEXTURE7); + glBindTexture(GL_TEXTURE_3D, self.tex4d); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + let n = CString::new("hgl_t4_size").unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform1f(loc, self.tex4d_size); + } + } + if self.detail_kind() != 0 { + glActiveTexture(GL_TEXTURE5); + glBindTexture(GL_TEXTURE_1D, self.detail_func_tex); + glActiveTexture(GL_TEXTURE5 + 1); + glBindTexture(GL_TEXTURE_2D, self.detail_tex); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + let (mut w, mut h) = (0i32, 0i32); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &mut w); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &mut h); + let n = CString::new("hgl_texsize").unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform2f(loc, w.max(1) as f32, h.max(1) as f32); + } + for (name, v) in [ + ("hgl_detail_x0", self.detail_range.0), + ("hgl_detail_x1", self.detail_range.1), + ("hgl_detail_scale", (2.0f32).powf(self.detail_level)), + ] { + let n = CString::new(name).unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform1f(loc, v); + } + } + } + if self.sharpen_kind() != 0 { + glActiveTexture(GL_TEXTURE4); + glBindTexture(GL_TEXTURE_1D, self.sharpen_tex); + glActiveTexture(unit.max(GL_TEXTURE0 as i32) as u32); + let (mut w, mut h) = (0i32, 0i32); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &mut w); + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &mut h); + let n = CString::new("hgl_texsize").unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform2f(loc, w.max(1) as f32, h.max(1) as f32); + } + for (name, v) in [ + ("hgl_sharp_x0", self.sharpen_range.0), + ("hgl_sharp_x1", self.sharpen_range.1), + ] { + let n = CString::new(name).unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform1f(loc, v); + } + } + } + if self.ref_plane_on && self.ref_plane_set { + let mut vp = [0i32; 4]; + glGetIntegerv(GL_VIEWPORT, vp.as_mut_ptr()); + for (name, v) in [ + ("hgl_refplane", self.ref_plane), + ("hgl_viewport", [vp[0] as f32, vp[1] as f32, vp[2] as f32, vp[3] as f32]), + ] { + let n = CString::new(name).unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform4f(loc, v[0], v[1], v[2], v[3]); + } + } + } + if let Some((scale, bias)) = self.active_scale_bias() { + for (name, v) in [("hgl_scale", scale), ("hgl_bias", bias)] { + let n = CString::new(name).unwrap(); + let loc = glGetUniformLocation(program, n.as_ptr()); + if loc >= 0 { + glUniform4f(loc, v[0], v[1], v[2], v[3]); + } + } + } + } + } + + fn build(&mut self, key: u64) -> u32 { + let env = match (key & 0xffff) as u32 { + GL_REPLACE => "c = texel;", + GL_DECAL => "c = vec4(mix(c.rgb, texel.rgb, texel.a), c.a);", + GL_BLEND => "c = vec4(mix(c.rgb, gl_TextureEnvColor[0].rgb, texel.rgb), c.a * texel.a);", + GL_ADD => "c = vec4(c.rgb + texel.rgb, c.a * texel.a);", + _ => "c = c * texel;", // GL_MODULATE, the default + }; + let offset = if key & (1 << 20) != 0 { + // SGIX_fog_offset: the fog begins that much nearer the eye. + "z = max(z - hgl_fog_offset, 0.0);" + } else { + "" + }; + let fog = if key & (1 << 16) != 0 { + let factor = match (key >> 21) & 3 { + 1 => "float f = exp(-gl_Fog.density * z);", + 2 => "float f = exp(-gl_Fog.density * gl_Fog.density * z * z);", + // SGIS_fog_function: the program's own points, by distance. + 3 => "float f = texture1D(hgl_fogfunc, clamp((z - hgl_fog_x0) / max(hgl_fog_x1 - hgl_fog_x0, 1e-6), 0.0, 1.0)).r;", + _ => "float f = (gl_Fog.end - z) * gl_Fog.scale;", + }; + // The distance to the eye. gl_FogFragCoord would hold it, but a + // driver running our fragment shader does not fill it from the + // fixed pipeline -- it reads 0, and every fragment comes out + // unfogged. It is recovered instead from the window depth and the + // projection the program set, which leaves that fixed pipeline + // alone: z_ndc = 2*depth - 1, and eye z follows from the two rows + // of the projection matrix that carry it. + format!( + "float ndc = 2.0 * gl_FragCoord.z - 1.0;\n \ + float ez = (gl_ProjectionMatrix[3][3] * ndc - gl_ProjectionMatrix[3][2])\n \ + / (gl_ProjectionMatrix[2][2] - gl_ProjectionMatrix[2][3] * ndc);\n \ + float z = abs(ez);\n {offset}\n {factor}\n f = clamp(f, 0.0, 1.0);\n \ + c = vec4(mix(gl_Fog.color.rgb, c.rgb, f), c.a);" + ) + } else { + String::new() + }; + let table = if key & (1 << 18) != 0 { + // SGI_texture_color_table: each component through its own table. + "texel = vec4(texture1D(hgl_table, texel.r).r, + texture1D(hgl_table, texel.g).g, + texture1D(hgl_table, texel.b).b, + texture1D(hgl_table, texel.a).a);" + } else { + "" + }; + let scale_bias = if key & (1 << 19) != 0 { + // SGIX_texture_scale_bias, after the filter and the table. + "texel = texel * hgl_scale + hgl_bias;" + } else { + "" + }; + // SGIS_texture_filter4: four taps in each direction, weighted by the + // program's own function f. The specification's 1D formula is + // T = f(1+A) T[i0] + f(A) T[i1] + f(1-A) T[i2] + f(2-A) T[i3] + // and the 2D case is its outer product over the sixteen texels. f is + // held sampled over [0, 2], so a distance d reads it at d/2. + // SGIS_sharpen_texture: the magnified texel extrapolated away from + // what level 1 would have given -- + // T' = (1 + F(LOD)) T0 - F(LOD) T1 + // -- which sharpens exactly the detail that magnification blurred. The + // level-of-detail comes from the derivatives of the texture + // coordinate, as the fixed pipeline's own minification would compute + // it, and sampling a named level needs ARB_shader_texture_lod. + let sharpen_kind = (key >> 25) & 3; + let sharpen = if sharpen_kind != 0 { + let apply = match sharpen_kind { + 2 => "texel.a = clamp(sharp.a, 0.0, 1.0);", + 3 => "texel.rgb = clamp(sharp.rgb, 0.0, 1.0);", + _ => "texel = clamp(sharp, 0.0, 1.0);", + }; + format!( + "vec2 sd = gl_TexCoord[0].st * hgl_texsize;\n \ + float rho = max(length(dFdx(sd)), length(dFdy(sd)));\n \ + float lod = log2(max(rho, 1e-6));\n \ + float sf = texture1D(hgl_sharpen,\n \ + clamp((lod - hgl_sharp_x0) / max(hgl_sharp_x1 - hgl_sharp_x0, 1e-6), 0.0, 1.0)).r;\n \ + vec4 t1 = texture2D(hgl_tex, gl_TexCoord[0].st, 1.0 - lod);\n \ + vec4 sharp = (1.0 + sf) * texel - sf * t1;\n {apply}" + ) + } else { + String::new() + }; + // SGIS_detail_texture: a second, finer texture blended in by + // level-of-detail -- + // ADD: T' = T + F(LOD) * (2 Td - 1) + // MODULATE: T' = T * (1 + F(LOD) * (2 Td - 1)) + // -- so the detail shows only where magnification has room for it. + // The detail image is `level` levels finer, so its coordinates are + // scaled by 2^level. + // SGIS_texture_select: the selected group presented as if it were the + // whole texture. The base format decides what a group *means* -- a + // luminance group fills rgb and leaves alpha opaque, an alpha group + // does the opposite, an intensity group fills both. + let select = match (key >> 32) & 15 { + 1 => "texel = vec4(texel.rrr, 1.0);", // QUAD group 0 + 2 => "texel = vec4(texel.ggg, 1.0);", + 3 => "texel = vec4(texel.bbb, 1.0);", + 4 => "texel = vec4(texel.aaa, 1.0);", + 5 => "texel = vec4(texel.rrr, texel.g);", // DUAL_LUMINANCE_ALPHA 0 + 6 => "texel = vec4(texel.bbb, texel.a);", // DUAL_LUMINANCE_ALPHA 1 + 7 => "texel = vec4(texel.rrr, 1.0);", // DUAL red group + 8 => "texel = vec4(texel.aaa, 1.0);", // DUAL alpha group + _ => "", + }; + let detail_kind = (key >> 27) & 3; + let detail = if detail_kind != 0 { + let combine = if key & (1 << 29) != 0 { + "vec4 dv = texel + df * (2.0 * td - 1.0);" + } else { + "vec4 dv = texel * (1.0 + df * (2.0 * td - 1.0));" + }; + let apply = match detail_kind { + 2 => "texel.a = clamp(dv.a, 0.0, 1.0);", + 3 => "texel.rgb = clamp(dv.rgb, 0.0, 1.0);", + _ => "texel = clamp(dv, 0.0, 1.0);", + }; + format!( + "vec2 dd = gl_TexCoord[0].st * hgl_texsize;\n \ + float drho = max(length(dFdx(dd)), length(dFdy(dd)));\n \ + float dlod = log2(max(drho, 1e-6));\n \ + float df = texture1D(hgl_detailfunc,\n \ + clamp((dlod - hgl_detail_x0) / max(hgl_detail_x1 - hgl_detail_x0, 1e-6), 0.0, 1.0)).r;\n \ + vec4 td = texture2D(hgl_detail, gl_TexCoord[0].st * hgl_detail_scale);\n \ + {combine}\n {apply}" + ) + } else { + String::new() + }; + // SGIS_texture4D: the fourth coordinate picks between two slabs of + // the 3D texture the image is kept in, and is filtered by blending + // them -- which together with the 3D sampler's own filtering of s, t + // and r is the full four-dimensional linear filter. + // SGIX_clipmap. The resident levels are bands of one image (see + // `clipmap_image`), so the level is chosen here rather than by the + // hardware, addressed toroidally, and filtered by hand. + // + // Two things make it a clipmap rather than a mipmap. The window at + // level P is only C texels wide around the centre, so a coordinate + // further than C/2 from it is not resident and the level of detail has + // to rise until it is -- "the level of detail is increased to the + // nearest image level that does include the required texels". And the + // window wraps: the program slides it by uploading into the far edge, + // so an address is (v + offset) modulo the window. + let clipmap = if key & (1 << 37) != 0 { + Some( + "vec2 v0 = gl_TexCoord[0].st * exp2(hgl_cm_v);\n \ + vec2 dx = dFdx(v0);\n \ + vec2 dy = dFdy(v0);\n \ + float lod = log2(max(max(length(dx), length(dy)), 1e-6));\n \ + vec2 dc = abs(v0 - hgl_cm_centre);\n \ + float need = log2(max(2.0 * max(dc.x, dc.y) / hgl_cm_c, 1.0));\n \ + lod = clamp(max(lod, need), 0.0, hgl_cm_levels - 1.0);\n \ + float p0 = floor(lod);\n \ + float p1 = min(p0 + 1.0, hgl_cm_levels - 1.0);\n \ + vec4 texel = mix(hgl_cm_level(v0, p0), hgl_cm_level(v0, p1), lod - p0);", + ) + } else { + None + }; + let fetch4d = if key & (1 << 36) != 0 { + Some( + "float q4 = gl_TexCoord[0].q * hgl_t4_size - 0.5;\n \ + float q4f = floor(q4);\n \ + float q4a = q4 - q4f;\n \ + float slab = 1.0 / hgl_t4_size;\n \ + float r0 = (clamp(q4f, 0.0, hgl_t4_size - 1.0) + gl_TexCoord[0].p) * slab;\n \ + float r1 = (clamp(q4f + 1.0, 0.0, hgl_t4_size - 1.0) + gl_TexCoord[0].p) * slab;\n \ + vec4 texel = mix(texture3D(hgl_tex4d, vec3(gl_TexCoord[0].st, r0)),\n \ + texture3D(hgl_tex4d, vec3(gl_TexCoord[0].st, r1)), q4a);", + ) + } else { + None + }; + let fetch = if key & (1 << 24) != 0 { + "vec2 uv = gl_TexCoord[0].st * hgl_texsize - 0.5;\n \ + vec2 base = floor(uv);\n \ + vec2 a = uv - base;\n \ + vec4 wx = vec4(hgl_f4(1.0 + a.x), hgl_f4(a.x), hgl_f4(1.0 - a.x), hgl_f4(2.0 - a.x));\n \ + vec4 wy = vec4(hgl_f4(1.0 + a.y), hgl_f4(a.y), hgl_f4(1.0 - a.y), hgl_f4(2.0 - a.y));\n \ + vec4 texel = vec4(0.0);\n \ + for (int j = 0; j < 4; ++j)\n \ + for (int i = 0; i < 4; ++i)\n \ + texel += wx[i] * wy[j] * texture2D(hgl_tex,\n \ + (base + vec2(float(i) - 1.0, float(j) - 1.0) + 0.5) / hgl_texsize);" + } else { + "vec4 texel = texture2D(hgl_tex, gl_TexCoord[0].st);" + }; + let textured = if let Some(cm) = clipmap { + format!("{cm}\n {env}") + } else if let Some(f4) = fetch4d { + format!("{f4}\n {env}") + } else if key & (1 << 17) != 0 { + format!("{fetch}\n {select}\n {sharpen}\n {detail}\n {table}\n {scale_bias}\n {env}") + } else { + String::new() + }; + // SGIX_reference_plane: the fragment's depth comes from a plane + // rather than from the geometry, so coplanar things -- a road on a + // terrain, a decal on a wall -- meet the depth test exactly. + // + // The plane is held in clip coordinates, so the fragment's window x + // and y go back to normalised device coordinates through the viewport, + // the plane gives z there, and the depth range carries it to a depth. + // `-(d + a x + b y) / c` is the specification's own formula, in the + // space the plane was transformed into. + let ref_plane = if key & (1 << 23) != 0 { + "vec2 nd = (gl_FragCoord.xy - hgl_viewport.xy) / hgl_viewport.zw * 2.0 - 1.0;\n \ + float pz = -(hgl_refplane.w + hgl_refplane.x * nd.x + hgl_refplane.y * nd.y)\n \ + / hgl_refplane.z;\n \ + gl_FragDepth = 0.5 * (pz * gl_DepthRange.diff + gl_DepthRange.near + gl_DepthRange.far);" + } else { + // Left alone deliberately: a shader that writes gl_FragDepth on + // any path gives up early depth rejection for every fragment. + "" + }; + // texture2DLodARB is how a fragment shader names a mipmap level in + // GLSL 1.20; without the extension line the compiler will not have it. + // GLSL 1.20 rather than the default 1.10: the bias form of texture2D + // that `sharpen` uses to reach the coarser mipmap level belongs to the + // fragment stage in both, but 1.20 is what the rest of this assumes. + // + // The obvious way to name a level, texture2DLodARB, is not available: + // the Mac's context advertises GL_ARB_shader_texture_lod, yet its + // legacy GLSL compiler rejects the identifier. Biasing the level the + // hardware computed reaches the same array, and does it from the same + // derivatives, so the two agree by construction. + let src = format!( + r#"#version 120 +uniform sampler2D hgl_tex; +uniform sampler1D hgl_table; +uniform sampler1D hgl_fogfunc; +uniform vec4 hgl_scale; +uniform vec4 hgl_bias; +uniform float hgl_fog_x0; +uniform float hgl_fog_x1; +uniform float hgl_fog_offset; +uniform vec4 hgl_refplane; +uniform vec4 hgl_viewport; +uniform sampler1D hgl_filter4; +uniform sampler1D hgl_sharpen; +uniform sampler1D hgl_detailfunc; +uniform sampler2D hgl_detail; +uniform sampler3D hgl_tex4d; +uniform float hgl_t4_size; +uniform sampler2D hgl_cm; +uniform vec2 hgl_cm_centre; +uniform vec2 hgl_cm_offset; +uniform float hgl_cm_c; +uniform float hgl_cm_levels; +uniform float hgl_cm_v; + +/* One texel of a clipmap band, wrapped into the resident window. A level whose + virtual size has fallen below the clip size is held whole, and wraps at that + smaller size instead -- which exp2(v - p) gives without a table. */ +vec4 hgl_cm_texel(vec2 a, float p, float win) +{{ + vec2 w = mod(a, vec2(win)); + return texture2D(hgl_cm, vec2((w.x + 0.5) / hgl_cm_c, + (p * hgl_cm_c + w.y + 0.5) / (hgl_cm_c * hgl_cm_levels))); +}} + +/* Level p, bilinear across four wrapped taps. */ +vec4 hgl_cm_level(vec2 v0, float p) +{{ + float scale = exp2(p); + float win = min(hgl_cm_c, exp2(hgl_cm_v - p)); + vec2 a = v0 / scale + floor(hgl_cm_offset / scale) - 0.5; + vec2 base = floor(a); + vec2 f = a - base; + return mix(mix(hgl_cm_texel(base, p, win), hgl_cm_texel(base + vec2(1.0, 0.0), p, win), f.x), + mix(hgl_cm_texel(base + vec2(0.0, 1.0), p, win), + hgl_cm_texel(base + vec2(1.0, 1.0), p, win), f.x), f.y); +}} +uniform float hgl_detail_x0; +uniform float hgl_detail_x1; +uniform float hgl_detail_scale; +uniform vec2 hgl_texsize; +uniform float hgl_f4_n; +uniform float hgl_sharp_x0; +uniform float hgl_sharp_x1; +float hgl_f4(float d) +{{ + float i = clamp(d, 0.0, 2.0) * 0.5 * (hgl_f4_n - 1.0); + return texture1D(hgl_filter4, (i + 0.5) / hgl_f4_n).r; +}} +void main() +{{ + vec4 c = gl_Color; + {textured} + {fog} + {ref_plane} + gl_FragColor = c; +}} +"# + ); + unsafe { + let sh = glCreateShader(FRAGMENT_SHADER); + let c = CString::new(src).unwrap(); + glShaderSource(sh, 1, &c.as_ptr(), std::ptr::null()); + glCompileShader(sh); + let mut ok = 0; + glGetShaderiv(sh, COMPILE_STATUS, &mut ok); + if ok != 1 { + self.complain("compile", sh, false); + return 0; + } + let p = glCreateProgram(); + glAttachShader(p, sh); + glLinkProgram(p); + glGetProgramiv(p, LINK_STATUS, &mut ok); + if ok != 1 { + self.complain("link", p, true); + return 0; + } + // The texture the program bound is on unit 0; our table on unit 1. + glUseProgram(p); + for (name, unit) in [("hgl_tex", 0), ("hgl_table", 1), ("hgl_fogfunc", 2), ("hgl_filter4", 3), ("hgl_sharpen", 4), + ("hgl_detailfunc", 5), ("hgl_detail", 6), ("hgl_tex4d", 7), + ("hgl_cm", 9)] { + let n = CString::new(name).unwrap(); + let loc = glGetUniformLocation(p, n.as_ptr()); + if loc >= 0 { + glUniform1i(loc, unit); + } + } + glUseProgram(self.current); + p + } + } + + /// A fragment shader made into a linked program, or 0 with the reason + /// logged once. Shared by the fragment stage and the pixel-texture draw. + fn compile(&mut self, src: &str) -> u32 { + unsafe { + let sh = glCreateShader(FRAGMENT_SHADER); + let c = CString::new(src).unwrap(); + glShaderSource(sh, 1, &c.as_ptr(), std::ptr::null()); + glCompileShader(sh); + let mut ok = 0; + glGetShaderiv(sh, COMPILE_STATUS, &mut ok); + if ok != 1 { + self.complain("compile", sh, false); + return 0; + } + let p = glCreateProgram(); + glAttachShader(p, sh); + glLinkProgram(p); + glGetProgramiv(p, LINK_STATUS, &mut ok); + if ok != 1 { + self.complain("link", p, true); + return 0; + } + p + } + } + + fn complain(&mut self, what: &str, id: u32, program: bool) { + if self.reported { + return; + } + self.reported = true; + let mut buf = vec![0i8; 2048]; + let mut n = 0; + let log = unsafe { + if program { + glGetProgramInfoLog(id, 2048, &mut n, buf.as_mut_ptr()); + } else { + glGetShaderInfoLog(id, 2048, &mut n, buf.as_mut_ptr()); + } + let bytes: Vec = buf[..n.max(0) as usize].iter().map(|&c| c as u8).collect(); + String::from_utf8_lossy(&bytes).into_owned() + }; + log::warn!("host GL: the emulated fragment stage failed to {what}: {}", log.trim()); + } +} + +/// The inverse of a column-major 4x4, or `None` when it has none. +/// +/// Written out rather than pulled in: this is the only linear algebra in the +/// crate, and a dependency for one matrix is a poor trade. +fn invert4(m: &[f64; 16]) -> Option<[f64; 16]> { + let a = |r: usize, c: usize| m[c * 4 + r]; + // Cofactor expansion, via the six 2x2 determinants of each row pair. + let s0 = a(0, 0) * a(1, 1) - a(1, 0) * a(0, 1); + let s1 = a(0, 0) * a(1, 2) - a(1, 0) * a(0, 2); + let s2 = a(0, 0) * a(1, 3) - a(1, 0) * a(0, 3); + let s3 = a(0, 1) * a(1, 2) - a(1, 1) * a(0, 2); + let s4 = a(0, 1) * a(1, 3) - a(1, 1) * a(0, 3); + let s5 = a(0, 2) * a(1, 3) - a(1, 2) * a(0, 3); + let c5 = a(2, 2) * a(3, 3) - a(3, 2) * a(2, 3); + let c4 = a(2, 1) * a(3, 3) - a(3, 1) * a(2, 3); + let c3 = a(2, 1) * a(3, 2) - a(3, 1) * a(2, 2); + let c2 = a(2, 0) * a(3, 3) - a(3, 0) * a(2, 3); + let c1 = a(2, 0) * a(3, 2) - a(3, 0) * a(2, 2); + let c0 = a(2, 0) * a(3, 1) - a(3, 0) * a(2, 1); + let det = s0 * c5 - s1 * c4 + s2 * c3 + s3 * c2 - s4 * c1 + s5 * c0; + if !det.is_finite() || det.abs() < 1e-30 { + return None; + } + let d = 1.0 / det; + let mut o = [0f64; 16]; + let mut set = |r: usize, c: usize, v: f64| o[c * 4 + r] = v * d; + set(0, 0, a(1, 1) * c5 - a(1, 2) * c4 + a(1, 3) * c3); + set(0, 1, -a(0, 1) * c5 + a(0, 2) * c4 - a(0, 3) * c3); + set(0, 2, a(3, 1) * s5 - a(3, 2) * s4 + a(3, 3) * s3); + set(0, 3, -a(2, 1) * s5 + a(2, 2) * s4 - a(2, 3) * s3); + set(1, 0, -a(1, 0) * c5 + a(1, 2) * c2 - a(1, 3) * c1); + set(1, 1, a(0, 0) * c5 - a(0, 2) * c2 + a(0, 3) * c1); + set(1, 2, -a(3, 0) * s5 + a(3, 2) * s2 - a(3, 3) * s1); + set(1, 3, a(2, 0) * s5 - a(2, 2) * s2 + a(2, 3) * s1); + set(2, 0, a(1, 0) * c4 - a(1, 1) * c2 + a(1, 3) * c0); + set(2, 1, -a(0, 0) * c4 + a(0, 1) * c2 - a(0, 3) * c0); + set(2, 2, a(3, 0) * s4 - a(3, 1) * s2 + a(3, 3) * s0); + set(2, 3, -a(2, 0) * s4 + a(2, 1) * s2 - a(2, 3) * s0); + set(3, 0, -a(1, 0) * c3 + a(1, 1) * c1 - a(1, 2) * c0); + set(3, 1, a(0, 0) * c3 - a(0, 1) * c1 + a(0, 2) * c0); + set(3, 2, -a(3, 0) * s3 + a(3, 1) * s1 - a(3, 2) * s0); + set(3, 3, a(2, 0) * s3 - a(2, 1) * s1 + a(2, 2) * s0); + Some(o) +} + +/// A function given as (x, y) pairs, read at `x`: a straight line between +/// neighbouring points, and the end values held beyond either end -- which is +/// what SGIS_fog_function, SGIS_sharpen_texture and SGIS_detail_texture all +/// say their curves do. +fn piecewise(points: &[f32], n: usize, x: f32) -> f32 { + if x <= points[0] { + return points[1]; + } + for k in 1..n { + let (xa, ya) = (points[(k - 1) * 2], points[(k - 1) * 2 + 1]); + let (xb, yb) = (points[k * 2], points[k * 2 + 1]); + if x <= xb { + return if xb > xa { ya + (yb - ya) * (x - xa) / (xb - xa) } else { yb }; + } + } + points[(n - 1) * 2 + 1] +} + +fn norm(v: [f32; 3]) -> [f32; 3] { + let l = (v[0] * v[0] + v[1] * v[1] + v[2] * v[2]).sqrt(); + if l < 1e-9 { [0.0, 0.0, 1.0] } else { [v[0] / l, v[1] / l, v[2] / l] } +} + +fn cross(a: [f32; 3], b: [f32; 3]) -> [f32; 3] { + [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]] +} + +/// A column-major rotation whose columns are the given basis. +fn basis(right: [f32; 3], up: [f32; 3], fwd: [f32; 3]) -> [f32; 16] { + [ + right[0], right[1], right[2], 0.0, + up[0], up[1], up[2], 0.0, + fwd[0], fwd[1], fwd[2], 0.0, + 0.0, 0.0, 0.0, 1.0, + ] +} + +/// SPRITE_AXIAL: turn about the axis so the front faces the eye as far as the +/// axis allows -- a tree that turns to face you but stays upright. +fn axial(axis: [f32; 3], eye: [f32; 3]) -> [f32; 16] { + let up = norm(axis); + // The eye direction with its component along the axis removed: what is + // left is as far as the front can be turned towards it. + let d = eye[0] * up[0] + eye[1] * up[1] + eye[2] * up[2]; + let fwd = norm([eye[0] - up[0] * d, eye[1] - up[1] * d, eye[2] - up[2] * d]); + let right = norm(cross(up, fwd)); + basis(right, up, fwd) +} + +/// SPRITE_OBJECT_ALIGNED / SPRITE_EYE_ALIGNED: turn about a point so the front +/// faces the eye outright, the remaining freedom spent aligning the top with +/// the axis. +fn face(axis: [f32; 3], eye: [f32; 3]) -> [f32; 16] { + let fwd = norm(eye); + let up0 = norm(axis); + let r = cross(up0, fwd); + // An axis parallel to the view leaves the roll undecided: any + // perpendicular will do, and this picks one rather than dividing by zero. + let right = if r[0].abs() + r[1].abs() + r[2].abs() < 1e-6 { + norm(cross([0.0, 0.0, 1.0], fwd)) + } else { + norm(r) + }; + basis(right, cross(fwd, right), fwd) +} diff --git a/iris-hostgl/src/exec.rs b/iris-hostgl/src/exec.rs new file mode 100644 index 0000000..33f9f9a --- /dev/null +++ b/iris-hostgl/src/exec.rs @@ -0,0 +1,1460 @@ +//! Running one decoded command: what the generated decoder (calls.rs) works +//! with. +//! +//! What cannot simply be passed to the host's GL is handled here: data in the +//! guest's byte order (arrays swapped, pixel data with the pixel store's +//! swap-bytes flag), client arrays read at each draw, the feedback and +//! selection buffers, and the EXT and SGI entry points the host has under +//! their core names or not at all (those go to `emul`). +//! +//! **Guest memory and retries.** Every read of the program's memory goes +//! through [`GuestMemory`] and may fault; a fault is recorded in +//! [`Exec::fault`] and the command gives up (`None`). The service then answers +//! need-page and runs this same command again when the program retries, so a +//! command must not change any host state before its last read has +//! succeeded. Every method here reads first and touches GL after, and the +//! generated decoder reads all its arguments before it calls anything. +//! +//! Writes to the program's memory are never made here: they are queued in +//! [`Exec::writes`] and stored by the service once the whole batch has run, +//! so a write that faults never makes a command run twice. + +use std::collections::{HashMap, HashSet}; +use std::ffi::c_void; + +use iris_hostcall::{Fault, GuestMemory, PAGE}; + +use crate::backend::Backend; +use crate::calls; +use crate::draw::{self, Draw}; +use crate::emul; +use crate::gl::*; + +/// An array argument given by guest address instead of copied (glshim.h). +const BYREF: u32 = 0x8000_0000; + +/// The most guest memory one argument may name: more than any real texture +/// or array on a machine with 384 MB, and small enough that a corrupt count +/// cannot make the host allocate itself to death. +pub const MAX_TRANSFER: usize = 64 << 20; + +/// Slack after every pixel buffer handed to the host's GL. The size is +/// computed from the pixel store exactly as OpenGL 1.1 section 3.6.4 says; the +/// slack is there so that an implementation reading a little further than +/// the formula (a last row padded to the alignment) reads zeros of ours. +const PAD: usize = 4096; + +/// Zeros after every array argument ([`Exec::arr_padded`]): enough for the +/// largest parameter-name array OpenGL has, a 4x4 matrix. +pub const ARRAY_SLACK: usize = 16; + +/// Values per control point of an evaluator map, as the encoder counts them +/// (glshim_rt.c's hgl_map_components): 0 for a target it does not know. +pub fn map_components(target: u32) -> i64 { + match target { + 0x0D91 | 0x0DB1 | 0x0D93 | 0x0DB3 => 1, // INDEX, TEXTURE_COORD_1 + 0x0D94 | 0x0DB4 => 2, // TEXTURE_COORD_2 + 0x0D92 | 0x0DB2 | 0x0D95 | 0x0DB5 | 0x0D97 | 0x0DB7 => 3, // NORMAL, TEXTURE_COORD_3, VERTEX_3 + 0x8194 | 0x8195 => 3, // GEOMETRY_ and TEXTURE_DEFORMATION_SGIX + 0x0D90 | 0x0DB0 | 0x0D96 | 0x0DB6 | 0x0D98 | 0x0DB8 => 4, // COLOR_4, TEXTURE_COORD_4, VERTEX_4 + _ => 0, + } +} + +/// `GL_INTERLACE_SGIX`: a transfer that fills every other row of its +/// destination, for video fields. +const GL_INTERLACE_SGIX: u32 = 0x8094; + +/// `GL_ABGR_EXT`: SGI's component order, which is RGBA read backwards. +const GL_ABGR_EXT: u32 = 0x8000; + +/// Texture units whose coordinate arrays are recorded: what the host reports +/// as GL_MAX_TEXTURE_UNITS. A unit past these is left to the host GL alone. +pub const TEX_UNITS: usize = 8; + +/// A context's client-side state that lives in guest terms: what the host GL +/// cannot hold because it is guest addresses or the guest's byte order. +#[derive(Default)] +pub struct ClientSide { + /// Vertex, normal, colour, index, texture coordinate, edge flag. The + /// texture coordinate array is the current client unit's. + pub arrays: [Array; 6], + /// The client texture unit (glClientActiveTexture), from 0. + pub client_unit: usize, + /// Each unit's texture coordinate array while it is not the current one; + /// the current unit's entry here is stale, `arrays[4]` holds it. + pub tex_arrays: [Array; TEX_UNITS], + /// GL_UNPACK_SWAP_BYTES and GL_PACK_SWAP_BYTES as the program set them. + /// The host's own are set per pixel transfer, to undo the guest's order. + pub unpack_swap: bool, + pub pack_swap: bool, + pub render_mode: u32, + pub feedback: Option<(u64, u32, Vec)>, + pub select: Option<(u64, Vec)>, + /// SGIX_interlace: a transfer writes every other row of its destination. + pub interlace: bool, + /// The SGI features the host has not got, done in the fragment stage. + pub emul: emul::Emul, +} + +#[derive(Default, Clone, Copy)] +pub struct Array { + pub enabled: bool, + pub size: i32, + pub ty: u32, + pub stride: i32, + pub addr: u64, +} + +/// Guest writes waiting for the end of the call: (address, bytes). +pub type Writes = Vec<(u64, Vec)>; + +pub struct Exec<'a> { + pub m: &'a mut dyn GuestMemory, + /// The first page a read could not use, if any: the command stopped there. + pub fault: Option, + pub writes: &'a mut Writes, + pub funcs: &'a mut Vec>, + pub reported: &'a mut HashSet, + pub backend: &'a dyn Backend, + pub client: &'a mut ClientSide, + pub draws: &'a HashMap, + pub current_read: u32, + /// Pixels on their way through, one buffer per image argument of the + /// command (glSeparableFilter2D has two, glGetSeparableFilter three), so + /// a pointer handed out for one stays valid while the next is made. + scratch: Vec>, + staged: Vec, + /// How many rows the last interlaced transfer became, for `gl_height`. + interlaced_rows: i32, + /// Whether a transfer left the host's pixel store swapping bytes, so + /// `image_done` knows there is anything to undo. + swapped: bool, +} + +/// A pixel read staged in a scratch buffer, waiting to be turned round and +/// queued for the guest by `image_done`. +struct Staged { + buf: usize, + addr: u64, + bytes: usize, + /// The stride a row of pixels sits on, so padding between rows never joins + /// two pixels into one. + row: usize, + /// Components per pixel, and bytes per component (0: a plain read). + n: usize, + s: usize, +} + +/// Read `len` bytes of guest memory at `addr`. +/// +/// Every page is touched with a one-byte read first. The framework keeps the +/// pages it has read across retries, but a read that faults part way has +/// copied everything before the fault for nothing; over a 16 MB texture, one +/// page at a time, that is gigabytes of copying. Probing costs one small copy +/// a page instead. +pub fn read_guest(m: &mut dyn GuestMemory, addr: u64, len: usize) -> Result, Fault> { + if len == 0 { + return Ok(Vec::new()); + } + let end = addr.checked_add(len as u64).ok_or(Fault { page: addr & !(PAGE - 1), write: false })?; + let mut at = addr; + let mut probe = [0u8; 1]; + while at < end { + m.read(at, &mut probe)?; + at = (at & !(PAGE - 1)) + PAGE; + } + let mut out = vec![0u8; len]; + m.read(addr, &mut out)?; + Ok(out) +} + +/// Turn every pixel's components round, in place. +/// +/// Whole components move; their bytes do not, so this composes with the +/// host's `SWAP_BYTES` rather than fighting it. Rows are walked one at a time +/// because a row's padding need not be a whole number of pixels: reversing +/// straight through the buffer would shift every row after the first by the +/// padding and shear the image. +pub fn reverse_components(buf: &mut [u8], row: usize, n: usize, s: usize) { + let group = n * s; + if group == 0 || row == 0 || n < 2 { + return; + } + let mut base = 0; + while base < buf.len() { + let end = (base + row).min(buf.len()); + let mut at = base; + while at + group <= end { + for i in 0..n / 2 { + let (lo, hi) = (at + i * s, at + (n - 1 - i) * s); + for b in 0..s { + buf.swap(lo + b, hi + b); + } + } + at += group; + } + base += row; + } +} + +/// The types that hold a whole pixel in one packed word, and the size of that +/// word, numbered as the guest numbers them (see `IRIX_5_6_5`). Their +/// components are fields of an integer rather than separate values, so +/// `reverse_components` does not apply to them -- see `gl_type`. +fn packed_type(ty: u32) -> Option { + match ty { + 0x8032 | IRIX_2_3_3_REV => Some(1), // UNSIGNED_BYTE_3_3_2, _2_3_3_REV + 0x8033 | 0x8034 | IRIX_5_6_5 | 0x8364 | 0x8365 | 0x8366 => Some(2), + 0x8035 | 0x8036 | 0x8367 | 0x8368 => Some(4), + _ => None, + } +} + +/// EXT_packed_pixels' 5_6_5 and 2_3_3_REV types as IRIX 6.5's +/// numbers them: the other way round from OpenGL 1.2 and every later +/// registry, where 0x8362 is UNSIGNED_BYTE_2_3_3_REV and 0x8363 +/// UNSIGNED_SHORT_5_6_5. A guest program passes these; the host is given the +/// standard number (`gl_type`). The rest of the packed types agree. +const IRIX_5_6_5: u32 = 0x8362; +const IRIX_2_3_3_REV: u32 = 0x8363; + +/// An element of an array argument, as it comes from the guest. +pub trait Elem: Copy + Default { + const SIZE: usize; + fn from_be(b: &[u8]) -> Self; + fn to_be(self, out: &mut [u8]); +} + +macro_rules! elem { + ($t:ty, $n:expr) => { + impl Elem for $t { + const SIZE: usize = $n; + fn from_be(b: &[u8]) -> Self { + <$t>::from_be_bytes(b[..$n].try_into().unwrap()) + } + fn to_be(self, out: &mut [u8]) { + out[..$n].copy_from_slice(&self.to_be_bytes()); + } + } + }; +} +elem!(u8, 1); +elem!(i8, 1); +elem!(u16, 2); +elem!(i16, 2); +elem!(u32, 4); +elem!(i32, 4); +elem!(f32, 4); +elem!(f64, 8); + +fn be32(c: &[u8], o: usize) -> u32 { + c.get(o..o.saturating_add(4)).map_or(0, |b| u32::from_be_bytes(b.try_into().unwrap())) +} + +pub fn type_bytes(ty: u32) -> usize { + match ty { + 0x1400 | 0x1401 => 1, // BYTE, UNSIGNED_BYTE + 0x1402 | 0x1403 => 2, // SHORT, UNSIGNED_SHORT + 0x1404 | 0x1405 | 0x1406 => 4, // INT, UNSIGNED_INT, FLOAT + 0x140A => 8, // DOUBLE + _ => 0, + } +} + +fn array_index(cap: u32) -> Option { + match cap { + 0x8074 => Some(0), // VERTEX_ARRAY + 0x8075 => Some(1), // NORMAL_ARRAY + 0x8076 => Some(2), // COLOR_ARRAY + 0x8077 => Some(3), // INDEX_ARRAY + 0x8078 => Some(4), // TEXTURE_COORD_ARRAY + 0x8079 => Some(5), // EDGE_FLAG_ARRAY + _ => None, + } +} + +/// Components per pixel and bytes per component for a pixel transfer (1.1 +/// tables 3.5, 3.6; EXT_abgr, EXT_cmyka, EXT_packed_pixels, SGIX_ycrcb). A +/// packed type is one element per pixel of the type's size. +fn pixel_layout(format: u32, ty: u32) -> Option<(i64, i64)> { + if let Some(s) = packed_type(ty) { + return Some((1, s)); + } + let n = match format { + 0x1900 | 0x1901 | 0x1902 | 0x1903 | 0x1904 | 0x1905 | 0x1906 | 0x1909 => 1, + 0x190A => 2, + 0x1907 | 0x80E0 => 3, + 0x1908 | 0x80E1 | 0x8000 | 0x800C => 4, // RGBA, BGRA, ABGR_EXT, CMYK_EXT + 0x800D => 5, // CMYKA_EXT + 0x81BB => 2, // YCRCB_422_SGIX + 0x81BC => 3, // YCRCB_444_SGIX + _ => return None, + }; + let s = type_bytes(ty) as i64; + (s > 0).then_some((n, s)) +} + +/// Texture units this library will claim, whatever the host reports. See +/// [`Exec::get_limit`]. +pub const MAX_TEXTURE_UNITS: i64 = 8; + +/// A value a state query hands back, so that [`Exec::get_limit`] can work on +/// any of glGetBooleanv/Doublev/Floatv/Integerv's element types. +pub trait GetValue: Copy { + fn to_i64(self) -> i64; + fn from_i64(v: i64) -> Self; +} + +macro_rules! get_value { + ($($t:ty),*) => { $( + impl GetValue for $t { + fn to_i64(self) -> i64 { + self as i64 + } + fn from_i64(v: i64) -> Self { + v as Self + } + } + )* }; +} +get_value!(u8, i32, u32, f32, f64); + +impl<'a> Exec<'a> { + #[allow(clippy::too_many_arguments)] + pub fn new( + m: &'a mut dyn GuestMemory, + writes: &'a mut Writes, + funcs: &'a mut Vec>, + reported: &'a mut HashSet, + backend: &'a dyn Backend, + client: &'a mut ClientSide, + draws: &'a HashMap, + current_read: u32, + ) -> Exec<'a> { + Exec { + m, + fault: None, + writes, + funcs, + reported, + backend, + client, + draws, + current_read, + scratch: Vec::new(), + staged: Vec::new(), + interlaced_rows: 0, + swapped: false, + } + } + + pub fn i32(&self, c: &[u8], o: usize) -> i32 { + be32(c, o) as i32 + } + + /// A guest address: eight bytes, high word first (protocol 2), so a + /// 64-bit program's addresses arrive whole. 32-bit programs send them + /// zero-extended. + pub fn addr(&self, c: &[u8], o: usize) -> u64 { + (be32(c, o) as u64) << 32 | be32(c, o + 4) as u64 + } + + pub fn f32(&self, c: &[u8], o: usize) -> f32 { + f32::from_bits(be32(c, o)) + } + + pub fn f64(&self, c: &[u8], o: usize) -> f64 { + c.get(o..o.saturating_add(8)).map_or(0.0, |b| f64::from_be_bytes(b.try_into().unwrap())) + } + + /// Guest memory, or `None` -- with `fault` set when the reason is a page + /// the program has to touch, and not when the request is absurd. + fn read(&mut self, addr: u64, len: usize) -> Option> { + if len > MAX_TRANSFER { + self.say_once(usize::MAX - 2, &format!("a transfer of {len} bytes was refused (over {MAX_TRANSFER})")); + return None; + } + match read_guest(self.m, addr, len) { + Ok(v) => Some(v), + Err(f) => { + self.fault.get_or_insert(f); + None + } + } + } + + /// A count that sizes a host allocation: `None` past what any real + /// argument needs. + pub fn count(&mut self, n: usize) -> Option { + if n > MAX_TRANSFER { + self.say_once(usize::MAX - 3, &format!("a count of {n} was refused")); + return None; + } + Some(n) + } + + fn say_once(&mut self, key: usize, what: &str) { + if self.reported.insert(key) { + log::warn!("host GL: {what}"); + } + } + + /// The host function for entry point `op`: its own name, or for an EXT or + /// SGI entry point the host lacks, the core function it became -- which + /// takes the same arguments for every one that reaches this lookup. + pub fn func(&mut self, op: usize) -> Option { + if let Some(Some(f)) = self.funcs.get(op) { + return (*f != 0).then_some(*f); + } + let name = calls::NAMES.get(op)?; + let mut f = self.backend.lookup(name) as usize; + if f == 0 { + // ARB first: an ARB entry point is the core one under another + // name, and a host may export only the core name (or only the + // suffixed one, which is why the lookup above went first). + let core = name + .trim_end_matches("ARB") + .trim_end_matches("EXT") + .trim_end_matches("SGIX") + .trim_end_matches("SGIS") + .trim_end_matches("SGI"); + if core != *name { + f = self.backend.lookup(core) as usize; + } + } + if let Some(slot) = self.funcs.get_mut(op) { + *slot = Some(f); + } + if f == 0 { + self.unsupported(op); + return None; + } + Some(f) + } + + /// Entry point `op` does nothing here yet; said once. + pub fn unsupported(&mut self, op: usize) { + if self.reported.insert(op) { + log::warn!("host GL: {} is not available", calls::NAMES.get(op).unwrap_or(&"?")); + } + } + + /// An array argument at `o`: copied from the command, or read from guest + /// memory when it came by reference, and turned into host order. + pub fn arr(&mut self, c: &[u8], o: usize) -> Option> { + let raw = be32(c, o); + let n = (raw & !BYREF) as usize; + let bytes = n.checked_mul(T::SIZE)?; + let fetched; + let src: &[u8] = if raw & BYREF != 0 { + fetched = self.read(self.addr(c, o + 4), bytes)?; + &fetched + } else { + let off = usize::try_from(self.addr(c, o + 4)).ok()?; + c.get(off..off.checked_add(bytes)?)? + }; + Some(src.chunks_exact(T::SIZE).map(T::from_be).collect()) + } + + /// An array argument the host GL will read `need` elements of, whatever + /// count the command claims: the call is handed a pointer, not a length, + /// so a short array would have the host read past it. The array is cut + /// or zero-filled to `need`, with [`ARRAY_SLACK`] zeros after that for a + /// host that reads more than the guest's size tables know of (an + /// enumerant SGI's tables do not list counts 1). `need` is a guest + /// count: the caller has put it through [`Exec::count`]. + pub fn arr_padded(&mut self, c: &[u8], o: usize, need: usize) -> Option> { + let mut v = self.arr::(c, o)?; + v.truncate(need); + v.resize(need + ARRAY_SLACK, T::default()); + Some(v) + } + + /// glCallLists' names, `n` of them, cut or zero-filled like + /// [`Exec::arr_padded`]. + pub fn arr_typed_padded(&mut self, c: &[u8], o: usize, ty: u32, n: usize) -> Option> { + let mut v = self.arr_typed(c, o, ty)?; + let bytes = n.checked_mul(4)?; + v.truncate(bytes); + v.resize(bytes + ARRAY_SLACK, 0); + Some(v) + } + + /// glCallLists' names: the count is names, each of `type`'s size, so the + /// bytes to read are the two multiplied. The GL_n_BYTES types are defined + /// as big-endian byte sequences, so only the ordinary integer and float + /// types are swapped into host order. + pub fn arr_typed(&mut self, c: &[u8], o: usize, ty: u32) -> Option> { + let each = match ty { + 0x1400 | 0x1401 => 1, + 0x1402 | 0x1403 | 0x1407 => 2, + 0x1408 => 3, + 0x1404 | 0x1405 | 0x1406 | 0x1409 => 4, + _ => 1, + }; + let raw = be32(c, o); + let n = (raw & !BYREF) as usize; + let bytes = n.checked_mul(each)?; + let fetched; + let src: &[u8] = if raw & BYREF != 0 { + fetched = self.read(self.addr(c, o + 4), bytes)?; + &fetched + } else { + let off = usize::try_from(self.addr(c, o + 4)).ok()?; + c.get(off..off.checked_add(bytes)?)? + }; + let mut out = src.to_vec(); + if matches!(ty, 0x1402 | 0x1403 | 0x1404 | 0x1405 | 0x1406) { + for chunk in out.chunks_exact_mut(each) { + chunk.reverse(); + } + } + Some(out) + } + + pub fn ptr_of(&self, v: &[T]) -> *const T { + if v.is_empty() { + std::ptr::null() + } else { + v.as_ptr() + } + } + + /// Queue `v` for guest address `addr`, in the guest's byte order. + pub fn put(&mut self, addr: u64, v: &[T]) -> Option<()> { + if v.is_empty() { + return Some(()); + } + if addr == 0 { + return None; + } + let mut dst = vec![0u8; v.len() * T::SIZE]; + for (e, out) in v.iter().zip(dst.chunks_exact_mut(T::SIZE)) { + e.to_be(out); + } + self.writes.push((addr, dst)); + Some(()) + } + + fn geti(&self, pname: u32) -> i32 { + let mut v = [0i32; 4]; + // SAFETY: a query of a single-valued pname, with room to spare. + unsafe { glGetIntegerv(pname, v.as_mut_ptr()) }; + v[0] + } + + /// Pixel data at guest address `addr`, handed to the host as a buffer of + /// ours: its size from the dimensions, format, type and the pixel store + /// (1.1 section 3.6.4), and the host's swap-bytes flag set so the host + /// undoes the guest's byte order as it goes. For `out`, the buffer is + /// written back to the guest by `image_done`. + pub fn image(&mut self, addr: u64, dims: &[i32], format: u32, ty: u32, bitmap: bool, out: bool) -> Option<*mut c_void> { + if addr == 0 { + return Some(std::ptr::null_mut()); + } + let bitmap = bitmap || ty == GL_BITMAP; + let (a, rl, sr, sp, ih, si) = if out { + (GL_PACK_ALIGNMENT, GL_PACK_ROW_LENGTH, GL_PACK_SKIP_ROWS, GL_PACK_SKIP_PIXELS, GL_PACK_IMAGE_HEIGHT, GL_PACK_SKIP_IMAGES) + } else { + (GL_UNPACK_ALIGNMENT, GL_UNPACK_ROW_LENGTH, GL_UNPACK_SKIP_ROWS, GL_UNPACK_SKIP_PIXELS, GL_UNPACK_IMAGE_HEIGHT, GL_UNPACK_SKIP_IMAGES) + }; + // i128 throughout: every factor is the guest's to choose. + let w = *dims.first().unwrap_or(&0) as i128; + let h = *dims.get(1).unwrap_or(&1) as i128; + let d = *dims.get(2).unwrap_or(&1) as i128; + let q = *dims.get(3).unwrap_or(&1) as i128; + if w < 0 || h < 0 || d < 0 || q < 0 { + return None; + } + if w == 0 || h == 0 || d == 0 || q == 0 { + return Some(std::ptr::null_mut()); + } + let align = self.geti(a).max(1) as i128; + let l = match self.geti(rl) as i128 { + n if n <= 0 => w, + n => n, + }; + let (skip_rows, skip_pixels) = (self.geti(sr).max(0) as i128, self.geti(sp).max(0) as i128); + let (row, last, multibyte) = if bitmap { + let k = (l + 7) / 8; + (align * ((k + align - 1) / align), (skip_pixels + w + 7) / 8, false) + } else { + let (n, s) = pixel_layout(format, ty)?; + let (n, s) = (n as i128, s as i128); + let raw = n * s * l; + let row = if s >= align { raw } else { align * ((raw + align - 1) / align) }; + (row, (skip_pixels + w) * n * s, s > 1) + }; + let rows = skip_rows + h; + let mut bytes = (rows - 1) * row + last; + if dims.len() >= 3 { + let image_rows = match self.geti(ih) as i128 { + n if n <= 0 => h, + n => n, + }; + bytes += (self.geti(si).max(0) as i128 + d * q - 1) * image_rows * row; + } + if bytes <= 0 || bytes > MAX_TRANSFER as i128 { + if bytes > 0 { + self.say_once(usize::MAX - 2, &format!("a pixel transfer of {bytes} bytes was refused")); + } + return None; + } + let (bytes, row) = (bytes as usize, row.max(1) as usize); + let swap = if out { multibyte != self.client.pack_swap } else { multibyte != self.client.unpack_swap }; + + // Everything this transfer needs from guest memory comes first; the + // host's state is only touched once all of it is here. + let mut staged = None; + let mut tall_rows = 0; + let buf = if self.client.interlace && !out && !bitmap && h > 1 { + // SGIX_interlace: "all of the groups which belong to a row m are + // treated as if they belonged to the row 2 * m", which expands the + // image to 2h-1 rows with only the even ones defined. The host has + // no such mode, so the rows are spread into a buffer of our own + // and the host is given the taller image (see `gl_height`). It has + // no effect on ReadPixels, which is why `out` is left alone. + let (n, s) = pixel_layout(format, ty)?; + let src = self.read(addr, bytes)?; + let tall = (2 * h - 1) as usize; + let total = tall.checked_mul(row).filter(|&t| t <= MAX_TRANSFER)?; + let mut spread = vec![0u8; total + PAD]; + for m in 0..h as usize { + let from = (skip_rows as usize + m) * row; + let to = 2 * m * row; + if from + row <= src.len() && to + row <= total { + spread[to..to + row].copy_from_slice(&src[from..from + row]); + } + } + tall_rows = tall as i32; + // ABGR may still apply on top: the components are turned round in + // the spread buffer, not in the guest's. + if format == GL_ABGR_EXT && packed_type(ty).is_none() { + reverse_components(&mut spread[..total], row, n as usize, s as usize); + } + spread + } else if format == GL_ABGR_EXT && !bitmap && packed_type(ty).is_none() { + // EXT_abgr. The host's GL has no such format, so the components + // are turned round on the way through and it is told RGBA + // (`gl_format`). A packed type needs none of this -- the same + // bytes already *are* RGBA with the reversed packing, so only the + // enums change. + let (n, s) = pixel_layout(format, ty)?; + // Copied even for a read: the transfer covers whole rows, of which + // the guest's own bytes outside it -- the skipped pixels, the + // padding -- are part. Starting from what is already there is what + // lets the whole span go back unharmed. + let mut b = self.read(addr, bytes)?; + b.resize(bytes + PAD, 0); + if out { + staged = Some(Staged { buf: 0, addr, bytes, row, n: n as usize, s: s as usize }); + } else { + reverse_components(&mut b[..bytes], row, n as usize, s as usize); + } + b + } else if out { + // A read: somewhere of our own for the host to put the pixels, + // handed back in `image_done`. + staged = Some(Staged { buf: 0, addr, bytes, row, n: 0, s: 0 }); + vec![0u8; bytes + PAD] + } else { + let mut b = self.read(addr, bytes)?; + b.resize(bytes + PAD, 0); + b + }; + + if swap || self.swapped { + // SAFETY: plain pixel store state. + unsafe { glPixelStorei(if out { GL_PACK_SWAP_BYTES } else { GL_UNPACK_SWAP_BYTES }, swap as i32) }; + } + self.swapped |= swap; + if tall_rows != 0 { + self.interlaced_rows = tall_rows; + } + let idx = self.scratch.len(); + self.scratch.push(buf); + if let Some(mut st) = staged { + st.buf = idx; + self.staged.push(st); + } + Some(self.scratch[idx].as_mut_ptr() as *mut c_void) + } + + /// After a command has run: staged reads turned round and queued for the + /// guest, and the host's pixel store back to no byte swapping. + /// + /// This runs after *every* command in a batch, so it must do nothing at + /// all unless a transfer actually left something to undo: setting the + /// pixel store between glBegin and glEnd is an error, which a program + /// asking glGetError after a primitive would be told about. + pub fn image_done(&mut self) { + for st in std::mem::take(&mut self.staged) { + let buf = &mut self.scratch[st.buf]; + if st.n > 0 { + reverse_components(&mut buf[..st.bytes], st.row, st.n, st.s); + } + self.writes.push((st.addr, buf[..st.bytes].to_vec())); + } + self.scratch.clear(); + self.restore_swap(); + } + + /// A command that stopped at a fault: nothing it staged goes to the guest. + pub fn abandon(&mut self) { + self.staged.clear(); + self.scratch.clear(); + self.interlaced_rows = 0; + self.restore_swap(); + } + + fn restore_swap(&mut self) { + if self.swapped { + // SAFETY: plain pixel store state. + unsafe { + glPixelStorei(GL_UNPACK_SWAP_BYTES, 0); + glPixelStorei(GL_PACK_SWAP_BYTES, 0); + } + self.swapped = false; + } + } + + /// The height to give the host for the one the guest named. Only an + /// interlaced transfer differs, and only for the call that just staged + /// one: `image` spread h rows over 2h-1. + pub fn gl_height(&mut self, h: i32) -> i32 { + match std::mem::take(&mut self.interlaced_rows) { + 0 => h, + tall => tall, + } + } + + /// The internal format to give the host. SGIS_texture_select's grouped + /// formats become plain RGBA, which is the layout their components are + /// already in; the fragment stage picks the selected group out again. + pub fn gl_internal(&mut self, internal: i32) -> i32 { + let tex = self.client.emul.bound_texture(); + self.client.emul.select_format(tex, internal).unwrap_or(internal) + } + + /// The pixel format to give the host for the one the guest named. + /// + /// Only `GL_ABGR_EXT` differs, and `image` has already put the data in the + /// order this claims. + pub fn gl_format(&self, format: u32) -> u32 { + match format { + GL_ABGR_EXT => GL_RGBA, + f => f, + } + } + + /// The pixel type to give the host, which depends on the format it goes + /// with: ABGR packed into a word is RGBA packed the other way round, so + /// the type carries the reversal that the format no longer can. IRIX's + /// numbers for 5_6_5 and 2_3_3_REV become the standard ones. + pub fn gl_type(&self, format: u32, ty: u32) -> u32 { + let ty = match ty { + IRIX_5_6_5 => 0x8363, + IRIX_2_3_3_REV => 0x8362, + t => t, + }; + if format != GL_ABGR_EXT { + return ty; + } + match ty { + 0x8033 => 0x8365, // UNSIGNED_SHORT_4_4_4_4 -> _4_4_4_4_REV + 0x8034 => 0x8366, // UNSIGNED_SHORT_5_5_5_1 -> UNSIGNED_SHORT_1_5_5_5_REV + 0x8035 => 0x8367, // UNSIGNED_INT_8_8_8_8 -> _8_8_8_8_REV + 0x8036 => 0x8368, // UNSIGNED_INT_10_10_10_2 -> UNSIGNED_INT_2_10_10_10_REV + 0x8365 => 0x8033, // and back: a reversed packing reversed again + 0x8367 => 0x8035, + t => t, + } + } + + /// Dimensions a pixel read-back does not pass: asked of the host GL. + pub fn dims_from(&mut self, what: &str, args: &[i32]) -> Vec { + let target = *args.first().unwrap_or(&0) as u32; + let mut v = [0i32; 4]; + // SAFETY: queries into arrays with room for their answers. + unsafe { + match what { + "TexImage" => { + let level = *args.get(1).unwrap_or(&0); + let mut d = [0i32; 3]; + for (i, p) in [0x1000u32, 0x1001, 0x8071].iter().enumerate() { + glGetTexLevelParameteriv(target, level, *p, d.as_mut_ptr().add(i)); + } + let _ = glGetError(); + return if d[2] > 1 { d.to_vec() } else { vec![d[0], d[1].max(1)] }; + } + "ColorTable" => glGetColorTableParameteriv(target, 0x80D9, v.as_mut_ptr()), + "ConvolutionFilter" | "SeparableFilter.row" | "SeparableFilter.column" => { + glGetConvolutionParameteriv(target, 0x8018, v.as_mut_ptr()); + glGetConvolutionParameteriv(target, 0x8019, v.as_mut_ptr().add(1)); + return match what { + "SeparableFilter.row" => vec![v[0]], + "SeparableFilter.column" => vec![v[1]], + _ => vec![v[0], v[1]], + }; + } + "Histogram" => glGetHistogramParameteriv(target, 0x8026, v.as_mut_ptr()), + "Minmax" => v[0] = 2, + _ => {} + } + } + vec![v[0]] + } + + /// Entries a pixel map holds: its _SIZE state is its own enum + 0x40. + pub fn pixelmap_size(&mut self, map: u32) -> usize { + self.geti(map + 0x40).max(0) as usize + } + + /// Values glGetMap returns for `query` of `target` (1.1 table 5.1). + pub fn mapquery_count(&mut self, target: u32, query: u32) -> usize { + let two = target >= 0x0DB0; + match query { + 0x0A01 => { + if two { + 2 + } else { + 1 + } + } // ORDER + 0x0A02 => { + if two { + 4 + } else { + 2 + } + } // DOMAIN + 0x0A00 => { + let mut order = [0i32; 2]; + // SAFETY: ORDER has at most two values. + unsafe { glGetMapiv(target, 0x0A01, order.as_mut_ptr()) }; + let k = match target & !0x20 { + 0x0D91 | 0x0D93 => 1, + 0x0D94 => 2, + 0x0D92 | 0x0D95 | 0x0D97 => 3, + _ => 4, + }; + let n = if two { order[0] as i64 * order[1] as i64 } else { order[0] as i64 }; + (n.max(0) as usize).saturating_mul(k) + } + _ => 0, + } + } + + pub fn pixel_store(&mut self, pname: u32, v: f32) { + match pname { + GL_UNPACK_SWAP_BYTES => self.client.unpack_swap = v != 0.0, + GL_PACK_SWAP_BYTES => self.client.pack_swap = v != 0.0, + // SAFETY: plain pixel store state. + _ => unsafe { glPixelStoref(pname, v) }, + } + let _ = (GL_UNPACK_LSB_FIRST, GL_PACK_LSB_FIRST); + } + + pub fn client_state(&mut self, cap: u32, on: bool) { + if let Some(i) = array_index(cap) { + self.client.arrays[i].enabled = on; + } + // SAFETY: plain client state. + unsafe { + if on { + glEnableClientState(cap) + } else { + glDisableClientState(cap) + } + } + } + + pub fn array_pointer(&mut self, which: usize, size: i32, ty: u32, stride: i32, addr: u64) { + self.client.arrays[which] = Array { enabled: self.client.arrays[which].enabled, size, ty, stride, addr }; + } + + /// Make `unit` (a GL_TEXTUREi_ARB value) the client unit the texture + /// coordinate calls act on. A unit past `TEX_UNITS` is not recorded. + fn set_client_unit(&mut self, unit: u32) { + let Some(u) = unit.checked_sub(GL_TEXTURE0_ARB).map(|u| u as usize).filter(|&u| u < TEX_UNITS) else { + return; + }; + let c = &mut *self.client; + if u != c.client_unit { + c.tex_arrays[c.client_unit] = c.arrays[4]; + c.arrays[4] = c.tex_arrays[u]; + c.client_unit = u; + } + } + + /// Unit `u`'s texture coordinate array. + fn tex_array(&self, u: usize) -> Array { + if u == self.client.client_unit { + self.client.arrays[4] + } else { + self.client.tex_arrays[u] + } + } + + /// glClientActiveTextureARB: each unit has its own coordinate array, and a + /// draw reads every enabled one. + pub fn client_active_texture(&mut self, target: u32) { + let unit = Self::texture_unit(target); + // SAFETY: plain client state; a bad unit is the host GL's error. + unsafe { glClientActiveTexture(unit) }; + self.set_client_unit(unit); + } + + /// glInterleavedArrays (1.1 table 2.5), recorded as the separate arrays. + pub fn interleaved(&mut self, format: u32, stride: i32, addr: u64) { + // (textures, colours, normals) present; st, sc, sv; colour type. + let f = match format { + 0x2A20 => (false, false, false, 0, 0, 2, 0), + 0x2A21 => (false, false, false, 0, 0, 3, 0), + 0x2A22 => (false, true, false, 0, 4, 2, 0x1401), + 0x2A23 => (false, true, false, 0, 4, 3, 0x1401), + 0x2A24 => (false, true, false, 0, 3, 3, 0x1406), + 0x2A25 => (false, false, true, 0, 0, 3, 0), + 0x2A26 => (false, true, true, 0, 4, 3, 0x1406), + 0x2A27 => (true, false, false, 2, 0, 3, 0), + 0x2A28 => (true, false, false, 4, 0, 4, 0), + 0x2A29 => (true, true, false, 2, 4, 3, 0x1401), + 0x2A2A => (true, true, false, 2, 3, 3, 0x1406), + 0x2A2B => (true, false, true, 2, 0, 3, 0), + 0x2A2C => (true, true, true, 2, 4, 3, 0x1406), + 0x2A2D => (true, true, true, 4, 4, 4, 0x1406), + _ => return, + }; + let (et, ec, en, st, sc, sv, tc) = f; + let pc = st * 4; + let pn = pc + if tc == 0x1401 { 4 } else { sc * 4 }; + let pv = pn + if en { 12 } else { 0 }; + let s = pv + sv * 4; + let stride = if stride == 0 { s } else { stride }; + let set = |x: &mut Self, i: usize, on: bool, size: i32, ty: u32, off: i32| { + x.client_state([0x8074, 0x8075, 0x8076, 0x8077, 0x8078, 0x8079][i], on); + if on { + x.array_pointer(i, size, ty, stride, addr.wrapping_add(off as u64)); + } + }; + set(self, 5, false, 1, 0x1401, 0); + set(self, 3, false, 1, 0x1406, 0); + set(self, 4, et, st, 0x1406, 0); + set(self, 2, ec, sc, tc, pc); + set(self, 1, en, 3, 0x1406, pn); + set(self, 0, true, sv, 0x1406, pv); + } + + /// The enabled guest arrays a draw reads, in the order they are copied: + /// (array, texture unit, record). Every unit's coordinate array is read, + /// not only the current client unit's. + fn draw_arrays_list(&self) -> Vec<(usize, usize, Array)> { + let mut out = Vec::new(); + for i in 0..6 { + if i == 4 { + for u in 0..TEX_UNITS { + let a = self.tex_array(u); + if a.enabled && a.addr != 0 { + out.push((4, u, a)); + } + } + continue; + } + let a = self.client.arrays[i]; + if a.enabled && a.addr != 0 { + out.push((i, 0, a)); + } + } + out + } + + /// Host-order copies of elements `lo..hi` of the enabled guest arrays, + /// all read before any is given to the host: (array, unit, record, bytes, + /// element size). + fn read_arrays(&mut self, lo: usize, hi: usize) -> Option, usize)>> { + let mut out = Vec::new(); + let n = hi.saturating_sub(lo); + for (i, u, a) in self.draw_arrays_list() { + let each = if i == 5 { 1 } else { type_bytes(a.ty) }; + if each == 0 { + return None; + } + let comps = if i == 5 { 1 } else { a.size.max(1) as usize }; + let elem = each * comps; + let stride = if a.stride > 0 { a.stride as usize } else { elem }; + let total = self.count(n.checked_mul(elem)?)?; + let mut buf = vec![0u8; total]; + if n > 0 { + let start = (a.addr).checked_add((lo as u64).checked_mul(stride as u64)?)?; + let span = (n - 1).checked_mul(stride)?.checked_add(elem)?; + let src = self.read(start, span)?; + for e in 0..n { + let s = &src[e * stride..e * stride + elem]; + let d = &mut buf[e * elem..(e + 1) * elem]; + d.copy_from_slice(s); + if each > 1 { + for c in d.chunks_exact_mut(each) { + c.reverse(); + } + } + } + } + out.push((i, u, a, buf, elem)); + } + Some(out) + } + + /// Point the host's arrays at the copies, so that element `lo` is each + /// copy's first. The copies must outlive the draw. A unit's coordinates go + /// to that unit; the client unit is the program's again afterwards. + fn point_arrays(&self, copies: &[(usize, usize, Array, Vec, usize)], lo: usize) { + let mut moved = false; + for (i, u, a, buf, elem) in copies { + let p = (buf.as_ptr() as *const c_void).wrapping_byte_sub(lo * elem); + // SAFETY: the host reads elements lo..hi through `p`, which are + // exactly the copy's bytes; the copy outlives the draw. The unit is + // below TEX_UNITS, which the host has. + unsafe { + match i { + 0 => glVertexPointer(a.size, a.ty, 0, p), + 1 => glNormalPointer(a.ty, 0, p), + 2 => glColorPointer(a.size, a.ty, 0, p), + 3 => glIndexPointer(a.ty, 0, p), + 4 => { + glClientActiveTexture(GL_TEXTURE0_ARB + *u as u32); + moved = true; + glTexCoordPointer(a.size, a.ty, 0, p) + } + _ => glEdgeFlagPointer(0, p), + } + } + } + if moved { + // SAFETY: plain client state, back to the program's unit. + unsafe { glClientActiveTexture(GL_TEXTURE0_ARB + self.client.client_unit as u32) }; + } + } + + pub fn draw_arrays(&mut self, mode: u32, first: i32, count: i32) { + if first < 0 || count <= 0 { + return; + } + let (lo, hi) = (first as usize, first as usize + count as usize); + let Some(copies) = self.read_arrays(lo, hi) else { return }; + self.point_arrays(&copies, lo); + // SAFETY: the arrays point at `copies`, alive until the end of this. + unsafe { glDrawArrays(mode, first, count) }; + } + + pub fn draw_elements(&mut self, mode: u32, count: i32, ty: u32, addr: u64) { + let each = type_bytes(ty); + if count <= 0 || each == 0 || addr == 0 { + return; + } + let bytes = count as usize * each; + let Some(mut idx) = self.read(addr, bytes) else { return }; + let mut lo = usize::MAX; + let mut hi = 0; + for c in idx.chunks_exact_mut(each) { + c.reverse(); + let v = match each { + 1 => c[0] as usize, + 2 => u16::from_le_bytes([c[0], c[1]]) as usize, + _ => u32::from_le_bytes([c[0], c[1], c[2], c[3]]) as usize, + }; + lo = lo.min(v); + hi = hi.max(v + 1); + } + let Some(copies) = self.read_arrays(lo, hi) else { return }; + self.point_arrays(&copies, lo); + // SAFETY: indices in host order, arrays at `copies`, both alive. + unsafe { glDrawElements(mode, count, ty, idx.as_ptr() as *const c_void) }; + } + + pub fn feedback_buffer(&mut self, size: i32, ty: u32, addr: u64) { + let Some(n) = self.count(size.max(0) as usize) else { return }; + let mut buf = vec![0f32; n]; + // SAFETY: the buffer is `size` floats and is kept in the client state + // for as long as the host may write it (until the next glFeedbackBuffer). + unsafe { glFeedbackBuffer(size, ty, buf.as_mut_ptr()) }; + self.client.feedback = Some((addr, n as u32, buf)); + } + + pub fn select_buffer(&mut self, size: i32, addr: u64) { + let Some(n) = self.count(size.max(0) as usize) else { return }; + let mut buf = vec![0u32; n]; + // SAFETY: as for the feedback buffer. + unsafe { glSelectBuffer(size, buf.as_mut_ptr()) }; + self.client.select = Some((addr, buf)); + } + + /// glRenderMode: leaving feedback or selection copies what the host wrote + /// into its buffer to the program's. + pub fn render_mode(&mut self, mode: u32) -> i32 { + // SAFETY: plain state; the buffers it writes are held in client state. + let r = unsafe { glRenderMode(mode) }; + let old = std::mem::replace(&mut self.client.render_mode, mode); + match old { + GL_FEEDBACK => { + if let Some((addr, size, buf)) = self.client.feedback.take() { + let n = if r < 0 { size as usize } else { (r as usize).min(buf.len()) }; + let _ = self.put::(addr, &buf[..n]); + self.client.feedback = Some((addr, size, buf)); + } + } + GL_SELECT => { + if let Some((addr, buf)) = self.client.select.take() { + // Hit records: a name count, two depths, the names. + let mut n = 0; + if r < 0 { + n = buf.len(); + } else { + for _ in 0..r { + if n >= buf.len() { + break; + } + n += 3 + buf[n] as usize; + } + } + let n = n.min(buf.len()); + let _ = self.put::(addr, &buf[..n]); + self.client.select = Some((addr, buf)); + } + } + _ => {} + } + r + } + + /// Before anything reads the framebuffer: a multisampled drawable's + /// samples have to be resolved into the buffer reads come from. + pub fn resolve_read(&mut self) { + if let Some(d) = self.draws.get(&self.current_read) { + draw::resolve(d); + } + } + + /// glEnable / glDisable. The emulated features' enumerants must not reach + /// the host, which does not know them; the state a shader reproduces + /// (texturing, fog) is recorded on the way through. + pub fn set_enable(&mut self, cap: u32, on: bool) { + // SGIX_interlace is a property of a pixel transfer, not of the + // fragment stage, so it is kept here rather than in `emul` -- and it + // must not reach the host, which has no such enumerant. + if cap == GL_INTERLACE_SGIX { + self.client.interlace = on; + return; + } + if !emul::Emul::owns(cap) { + // SAFETY: plain state. + unsafe { + if on { + glEnable(cap) + } else { + glDisable(cap) + } + } + } + if self.client.emul.set_enable(cap, on) { + self.client.emul.update(); + } + } + + pub fn is_enabled(&mut self, cap: u32) -> u8 { + if cap == GL_INTERLACE_SGIX { + return self.client.interlace as u8; + } + if emul::Emul::owns(cap) { + return self.client.emul.is_enabled(cap) as u8; + } + // SAFETY: a query. + unsafe { glIsEnabled(cap) } + } + + /// The texture environment's mode: once a shader is deciding the + /// fragment's colour, it has to apply this itself. + pub fn tex_env(&mut self, target: u32, pname: u32, value: u32) { + // GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE + if target == 0x2300 && pname == 0x2200 { + self.client.emul.set_env_mode(value); + self.client.emul.update(); + } + // SAFETY: plain state. + unsafe { glTexEnvi(target, pname, value as i32) }; + } + + /// A state query on its way back to the program, with any limit this + /// library cannot stand behind replaced by one it can. + /// + /// So far that is the texture unit count. It matters more than it looks: + /// Quake III resolves the three ARB entry points, then asks for + /// `GL_MAX_TEXTURE_UNITS_ARB` (0x84E2 -- it spells it + /// `GL_MAX_ACTIVE_TEXTURES_ARB`, the same value), and if the answer is + /// below 2 it throws the pointers away and says "not using + /// GL_ARB_multitexture, < 2 texture units". Every entry point can be + /// present and the extension advertised, and the feature still declines + /// silently on that one number. + /// + /// The host's answer is passed through, only lowered, never raised: if the + /// host really has one unit then a program is right to decline, and + /// claiming otherwise would only break it further along. The ceiling is + /// there because the multitexture calls go straight to the host while the + /// fixed-function emulation (`emul`) is written for the units we exercise; + /// 8 is far above what IRIX-era software asks for (Quake III wants 2), and + /// a ceiling is easier to raise later than a wrong answer is to find. + pub fn get_limit(&mut self, pname: u32, out: &mut [T]) { + if pname != GL_MAX_TEXTURE_UNITS_ARB { + return; + } + if let Some(v) = out.first_mut() { + if v.to_i64() > MAX_TEXTURE_UNITS { + *v = T::from_i64(MAX_TEXTURE_UNITS); + } + } + } + + /// Which texture unit a multitexture call names. + /// + /// ARB_multitexture numbers its units from `GL_TEXTURE0_ARB`, and those + /// are the values a program built against the ARB extension passes. + /// SGIS_multitexture, the older name for the same thing, numbered them + /// from `GL_TEXTURE0_SGIS` -- and this IRIX image's gl.h declares neither + /// extension, so a program using either carries its own definitions and + /// some pass a bare unit index instead. All three are accepted: they + /// cannot be confused with each other, the ranges are far apart, and + /// refusing a program's own idea of "unit 1" would leave it drawing + /// nothing for no reason it could discover. + /// Anything else is passed through untranslated, so that the host GL + /// raises `GL_INVALID_ENUM` for it exactly as it would for a bad unit of + /// its own -- the program then sees the error it should, rather than a + /// call that quietly did nothing here. + fn texture_unit(target: u32) -> u32 { + match target { + GL_TEXTURE0_ARB..=GL_TEXTURE31_ARB => target, + GL_TEXTURE0_SGIS => GL_TEXTURE0_ARB, + GL_TEXTURE1_SGIS => GL_TEXTURE0_ARB + 1, + n if n < 32 => GL_TEXTURE0_ARB + n, + other => other, + } + } + + /// glSelectTextureSGIS: ARB's glActiveTexture under its older name. The + /// client-side unit follows it, which is what the SGIS extension meant by + /// "selected" -- it had no separate client selector. + pub fn select_texture(&mut self, target: u32) { + let unit = Self::texture_unit(target); + // SAFETY: plain state; the unit is one the host has (it is checked + // against GL_MAX_TEXTURE_UNITS by the host GL itself). + unsafe { + glActiveTexture(unit); + glClientActiveTexture(unit); + } + self.set_client_unit(unit); + } + + /// glMTexCoord2fSGIS: ARB's glMultiTexCoord2f under its older name. + pub fn mtex_coord2f(&mut self, target: u32, s: f32, t: f32) { + let unit = Self::texture_unit(target); + // SAFETY: a vertex attribute, valid between glBegin and glEnd and + // ignored outside one, exactly as the core call is. + unsafe { glMultiTexCoord2f(unit, s, t) }; + } + + /// SGI_texture_color_table's table, when that is the target; otherwise the + /// host's own colour table takes it. + pub fn color_table(&mut self, target: u32, width: i32, data: *const u8, format: u32, ty: u32) -> bool { + if target != emul::GL_TEXTURE_COLOR_TABLE_SGI { + return false; + } + // RGBA bytes is what a table is in practice; anything else would need + // converting, and saying so is better than quietly ignoring it. + if format != GL_RGBA || ty != GL_UNSIGNED_BYTE || data.is_null() || width <= 0 { + self.say_once(usize::MAX - 1, "a texture colour table that is not RGBA bytes is not converted yet"); + return true; + } + // SAFETY: `data` is the scratch buffer `image` sized for a 1D RGBA + // byte image of `width` pixels. + let bytes = unsafe { std::slice::from_raw_parts(data, width as usize * 4) }.to_vec(); + self.client.emul.set_color_table(width, &bytes); + self.client.emul.update(); + true + } + + /// Which texture the shader will sample, for the state kept per texture. + pub fn bind_texture(&mut self, target: u32, texture: u32) { + self.client.emul.bind_texture(target, texture); + // SAFETY: plain state. + unsafe { glBindTexture(target, texture) }; + self.client.emul.update(); + } + + /// A texture parameter the host has not got (SGIX_texture_scale_bias): + /// true when this layer took it, and it must not go on to the host. + pub fn tex_parameter(&mut self, pname: u32, values: &[f32]) -> bool { + if self.client.emul.set_tex_parameter(pname, values) { + self.client.emul.update(); + return true; + } + false + } + + /// glFog*: taken when the mode or the parameter is one the host has not + /// got, and passed on otherwise. + pub fn fog(&mut self, pname: u32, values: &[f32]) -> bool { + let ours = self.client.emul.set_fog(pname, values); + self.client.emul.update(); + ours + } + + /// SGIS_fog_function's points. + pub fn fog_func(&mut self, points: &[f32]) { + self.client.emul.set_fog_func(points); + self.client.emul.update(); + } + + /// SGIS_texture_filter4's weights. True when this layer took the call, + /// which it does for the only filter the extension defines. + pub fn tex_filter_func(&mut self, filter: u32, weights: &[f32]) -> bool { + let ours = self.client.emul.set_filter_func(filter, weights); + self.client.emul.update(); + ours + } + + /// SGIS_detail_texture's (LOD, F) points. + pub fn detail_func(&mut self, points: &[f32]) { + self.client.emul.set_detail_func(points); + self.client.emul.update(); + } + + /// glTexImage2D. Taken when the target is SGIS_detail_texture's own, which + /// the host has no enumerant for, or the bound texture is a clipmap. + #[allow(clippy::too_many_arguments)] + pub fn tex_image_2d( + &mut self, + target: u32, + level: i32, + internal: i32, + w: i32, + h: i32, + border: i32, + format: u32, + ty: u32, + pixels: *const c_void, + ) -> bool { + if target == emul::GL_TEXTURE_2D && self.client.emul.clipmap_image(level, w, h, format, ty, pixels) { + self.client.emul.update(); + return true; + } + if target != emul::GL_DETAIL_TEXTURE_2D_SGIS { + return false; + } + self.client.emul.set_detail_image(level, internal, w, h, border, format, ty, pixels); + self.client.emul.update(); + true + } + + /// glTexImage4DSGIS: there is no fourth texture axis on the host. + #[allow(clippy::too_many_arguments)] + pub fn tex_image_4d( + &mut self, + level: i32, + internal: i32, + w: i32, + h: i32, + d: i32, + size4d: i32, + border: i32, + format: u32, + ty: u32, + pixels: *const c_void, + ) { + let _ = level; + self.client.emul.set_texture_4d(internal, w, h, d, size4d, border, format, ty, pixels); + self.client.emul.update(); + } + + /// glGetTexParameterfv. Taken when the parameter is one this layer keeps + /// and the host has never heard of. + pub fn get_tex_parameter(&mut self, pname: u32, out: &mut [f32]) -> bool { + self.client.emul.clipmap_get(pname, out) + } + + /// glPixelTexGenSGIX. + pub fn pixel_tex_gen(&mut self, mode: u32) { + self.client.emul.set_pixel_tex_gen(mode); + } + + /// glDrawPixels. Taken when SGIX_pixel_texture is on, which turns the + /// transfer into a textured draw; otherwise the host does it as usual. + pub fn draw_pixels(&mut self, w: i32, h: i32, format: u32, ty: u32, pixels: *const c_void) -> bool { + self.client.emul.draw_pixels_textured(w, h, format, ty, pixels) + } + + /// glSpriteParameter*SGIX. + pub fn sprite_parameter(&mut self, pname: u32, values: &[f32]) -> bool { + self.client.emul.set_sprite(pname, values) + } + + /// glBegin / glEnd. SGIX_sprite puts its transformation in front of the + /// modelview for the primitive and takes it away again after, so the two + /// have to be seen -- and the host call still has to happen. + pub fn begin(&mut self, mode: u32) { + self.client.emul.sprite_begin(); + // SAFETY: plain state. + unsafe { glBegin(mode) }; + } + + pub fn end(&mut self) { + // SAFETY: plain state. + unsafe { glEnd() }; + self.client.emul.sprite_end(); + } + + /// SGIS_sharpen_texture's (LOD, F) points. + pub fn sharpen_func(&mut self, points: &[f32]) { + self.client.emul.set_sharpen_func(points); + self.client.emul.update(); + } + + /// SGIX_reference_plane's plane, in object coordinates. + pub fn reference_plane(&mut self, equation: &[f64]) { + self.client.emul.set_reference_plane(equation); + self.client.emul.update(); + } + + pub fn get_error(&mut self) -> u32 { + // SAFETY: a query. + unsafe { glGetError() } + } + + /// glDrawBuffer / glReadBuffer. A GLX window's buffers are, here, the one + /// colour attachment of the drawable's framebuffer object: the back buffer + /// is what is drawn, and the front is what the last swap showed -- the + /// same pixels until the next frame is drawn. Every colour buffer a + /// double-buffered window has names that attachment; anything else is the + /// host's to refuse. + pub fn color_buffer(&mut self, draw: bool, mode: u32) { + let mapped = match mode { + // FRONT_LEFT, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT, FRONT, BACK, + // LEFT, RIGHT, FRONT_AND_BACK + 0x0400..=0x0408 => GL_COLOR_ATTACHMENT0, + other => other, + }; + // SAFETY: plain state. + unsafe { + if draw { + glDrawBuffer(mapped) + } else { + glReadBuffer(mapped) + } + } + } + + /// EXT_polygon_offset's bias is a depth value; core's units are the + /// smallest resolvable depth difference, 1/(2^24-1) with a 24-bit buffer. + pub fn polygon_offset_ext(&mut self, factor: f32, bias: f32) { + // SAFETY: plain state. + unsafe { glPolygonOffset(factor, bias * 16_777_215.0) }; + } +} diff --git a/iris-hostgl/src/ext.rs b/iris-hostgl/src/ext.rs new file mode 100644 index 0000000..54f09f0 --- /dev/null +++ b/iris-hostgl/src/ext.rs @@ -0,0 +1,32 @@ +// The extensions the host GL provides, in the form an IRIX program expects to +// read from glGetString(GL_EXTENSIONS). An extension is here only when its +// entry points work: the ones the Mac has under the same name, the ones whose +// calls are the same as a core or ARB call it has, and the ones emulated in +// emul.rs. (Checked against SGI's own libGL list and the Mac's; carried over +// as generated, not regenerated here.) +pub const EXTENSIONS: &str = "GL_ARB_multitexture GL_EXT_abgr GL_EXT_blend_color GL_EXT_blend_logic_op GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_convolution GL_EXT_copy_texture GL_EXT_histogram GL_EXT_packed_pixels GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture GL_EXT_texture3D GL_EXT_texture_object GL_EXT_vertex_array GL_SGIS_detail_texture GL_SGIS_fog_function GL_SGIS_generate_mipmap GL_SGIS_multisample GL_SGIS_multitexture GL_SGIS_point_parameters GL_SGIS_sharpen_texture GL_SGIS_texture4D GL_SGIS_texture_edge_clamp GL_SGIS_texture_filter4 GL_SGIS_texture_lod GL_SGIS_texture_select GL_SGIX_clipmap GL_SGIX_flush_raster GL_SGIX_fog_offset GL_SGIX_interlace GL_SGIX_pixel_texture GL_SGIX_reference_plane GL_SGIX_shadow GL_SGIX_sprite GL_SGIX_texture_add_env GL_SGIX_texture_scale_bias GL_SGI_color_matrix GL_SGI_color_table GL_SGI_texture_color_table"; + +/* + * What a guest program is told it is talking to. + * + * The host's own strings are the Mac's -- "Apple", "Apple M4 Pro", "2.1 Metal + * - 91.7" -- and handing those to an IRIX program is wrong twice over: a + * program that switches on the renderer string would be deciding what to do + * from the wrong machine entirely, and anything that logs them records a + * machine the user is not using. The same argument that makes the extension + * list ours to state makes these ours to state. + * + * They say what is true: an OpenGL of IRIS's, at the version this library + * implements (IRIX's gl.h is OpenGL 1.1, and that is the API a guest compiles + * against). They do not claim to be SGI hardware -- a program looking for a + * RealityEngine should not find one -- and they do not pretend to be the Mac. + * The host's real strings go to the log at debug level, and setting + * IRIS_HOSTGL_STRINGS=host in the *emulator's* environment passes them + * straight through for when the host GL itself is what is being debugged. + */ +pub const VENDOR: &str = "IRIS"; +pub const RENDERER: &str = "IRIS host OpenGL"; +pub const VERSION: &str = "1.1 IRIS"; + +/// The GLX extensions answered, for glXQueryExtensionsString. +pub const GLX_EXTENSIONS: &str = "GLX_EXT_visual_info GLX_EXT_visual_rating GLX_SGIS_multisample GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGIX_swap_group GLX_SGI_make_current_read GLX_SGI_swap_control GLX_SGI_video_sync"; diff --git a/iris-hostgl/src/gl.rs b/iris-hostgl/src/gl.rs new file mode 100644 index 0000000..e5abb0f --- /dev/null +++ b/iris-hostgl/src/gl.rs @@ -0,0 +1,126 @@ +//! The OpenGL entry points and enumerants the service calls by name. +//! +//! Only GL here -- nothing platform-specific (that is `backend`). The entry +//! points a guest's command names are not declared at all: they are looked up +//! by name at run time (`Exec::func`) and called through the signature +//! generated from IRIX's gl.h (calls.rs). + +#![allow(non_snake_case, dead_code)] + +use std::ffi::c_void; + +#[cfg_attr(target_os = "macos", link(name = "OpenGL", kind = "framework"))] +extern "C" { + pub fn glFlush(); + pub fn glFinish(); + pub fn glGetString(name: u32) -> *const u8; + pub fn glGetError() -> u32; + pub fn glGetIntegerv(pname: u32, out: *mut i32); + pub fn glIsEnabled(cap: u32) -> u8; + pub fn glEnable(cap: u32); + pub fn glDisable(cap: u32); + pub fn glViewport(x: i32, y: i32, w: i32, h: i32); + pub fn glPixelStorei(pname: u32, v: i32); + pub fn glPixelStoref(pname: u32, v: f32); + pub fn glReadBuffer(mode: u32); + pub fn glDrawBuffer(mode: u32); + pub fn glReadPixels(x: i32, y: i32, w: i32, h: i32, fmt: u32, ty: u32, data: *mut c_void); + pub fn glPolygonOffset(factor: f32, units: f32); + pub fn glTexEnvi(target: u32, pname: u32, v: i32); + pub fn glActiveTexture(texture: u32); + pub fn glClientActiveTexture(texture: u32); + pub fn glMultiTexCoord2f(target: u32, s: f32, t: f32); + pub fn glBindTexture(target: u32, texture: u32); + pub fn glBegin(mode: u32); + pub fn glEnd(); + pub fn glEnableClientState(cap: u32); + pub fn glDisableClientState(cap: u32); + pub fn glVertexPointer(size: i32, ty: u32, stride: i32, p: *const c_void); + pub fn glNormalPointer(ty: u32, stride: i32, p: *const c_void); + pub fn glColorPointer(size: i32, ty: u32, stride: i32, p: *const c_void); + pub fn glIndexPointer(ty: u32, stride: i32, p: *const c_void); + pub fn glTexCoordPointer(size: i32, ty: u32, stride: i32, p: *const c_void); + pub fn glEdgeFlagPointer(stride: i32, p: *const c_void); + pub fn glDrawArrays(mode: u32, first: i32, count: i32); + pub fn glDrawElements(mode: u32, count: i32, ty: u32, indices: *const c_void); + pub fn glFeedbackBuffer(size: i32, ty: u32, buffer: *mut f32); + pub fn glSelectBuffer(size: i32, buffer: *mut u32); + pub fn glRenderMode(mode: u32) -> i32; + pub fn glGetTexLevelParameteriv(target: u32, level: i32, pname: u32, out: *mut i32); + pub fn glGetColorTableParameteriv(target: u32, pname: u32, out: *mut i32); + pub fn glGetConvolutionParameteriv(target: u32, pname: u32, out: *mut i32); + pub fn glGetHistogramParameteriv(target: u32, pname: u32, out: *mut i32); + pub fn glGetMapiv(target: u32, query: u32, out: *mut i32); + + // EXT_framebuffer_object, EXT_framebuffer_blit, EXT_framebuffer_multisample. + pub fn glGenFramebuffersEXT(n: i32, ids: *mut u32); + pub fn glDeleteFramebuffersEXT(n: i32, ids: *const u32); + pub fn glBindFramebufferEXT(target: u32, id: u32); + pub fn glGenRenderbuffersEXT(n: i32, ids: *mut u32); + pub fn glDeleteRenderbuffersEXT(n: i32, ids: *const u32); + pub fn glBindRenderbufferEXT(target: u32, id: u32); + pub fn glRenderbufferStorageEXT(target: u32, fmt: u32, w: i32, h: i32); + pub fn glRenderbufferStorageMultisampleEXT(target: u32, samples: i32, fmt: u32, w: i32, h: i32); + pub fn glFramebufferRenderbufferEXT(target: u32, att: u32, rbt: u32, rb: u32); + pub fn glFramebufferTexture2DEXT(target: u32, attach: u32, textarget: u32, tex: u32, level: i32); + pub fn glCheckFramebufferStatusEXT(target: u32) -> u32; + pub fn glBlitFramebufferEXT(sx0: i32, sy0: i32, sx1: i32, sy1: i32, dx0: i32, dy0: i32, dx1: i32, dy1: i32, mask: u32, filter: u32); +} + +pub const GL_FRAMEBUFFER: u32 = 0x8D40; +pub const GL_RENDERBUFFER: u32 = 0x8D41; +pub const GL_COLOR_ATTACHMENT0: u32 = 0x8CE0; +pub const GL_DEPTH_ATTACHMENT: u32 = 0x8D00; +pub const GL_STENCIL_ATTACHMENT: u32 = 0x8D20; +pub const GL_FRAMEBUFFER_COMPLETE: u32 = 0x8CD5; +pub const GL_RGBA8: u32 = 0x8058; +pub const GL_DEPTH24_STENCIL8: u32 = 0x88F0; +pub const GL_RGBA: u32 = 0x1908; +pub const GL_BGRA: u32 = 0x80E1; +pub const GL_UNSIGNED_BYTE: u32 = 0x1401; +pub const GL_READ_FRAMEBUFFER: u32 = 0x8CA8; +pub const GL_DRAW_FRAMEBUFFER: u32 = 0x8CA9; +pub const GL_DRAW_FRAMEBUFFER_BINDING: u32 = 0x8CA6; +pub const GL_COLOR_BUFFER_BIT: u32 = 0x4000; +pub const GL_NEAREST: u32 = 0x2600; +pub const GL_SCISSOR_TEST: u32 = 0x0C11; +pub const GL_MULTISAMPLE: u32 = 0x809D; +pub const GL_UNPACK_SWAP_BYTES: u32 = 0x0CF0; +pub const GL_UNPACK_LSB_FIRST: u32 = 0x0CF1; +pub const GL_UNPACK_ROW_LENGTH: u32 = 0x0CF2; +pub const GL_UNPACK_SKIP_ROWS: u32 = 0x0CF3; +pub const GL_UNPACK_SKIP_PIXELS: u32 = 0x0CF4; +pub const GL_UNPACK_ALIGNMENT: u32 = 0x0CF5; +pub const GL_PACK_SWAP_BYTES: u32 = 0x0D00; +pub const GL_PACK_LSB_FIRST: u32 = 0x0D01; +pub const GL_PACK_ROW_LENGTH: u32 = 0x0D02; +pub const GL_PACK_SKIP_ROWS: u32 = 0x0D03; +pub const GL_PACK_SKIP_PIXELS: u32 = 0x0D04; +pub const GL_PACK_ALIGNMENT: u32 = 0x0D05; +pub const GL_PACK_SKIP_IMAGES: u32 = 0x806B; +pub const GL_PACK_IMAGE_HEIGHT: u32 = 0x806C; +pub const GL_UNPACK_SKIP_IMAGES: u32 = 0x806D; +pub const GL_UNPACK_IMAGE_HEIGHT: u32 = 0x806E; +pub const GL_FEEDBACK: u32 = 0x1C01; +pub const GL_SELECT: u32 = 0x1C02; +pub const GL_BITMAP: u32 = 0x1A00; +pub const GL_VENDOR: u32 = 0x1F00; +pub const GL_RENDERER: u32 = 0x1F01; +pub const GL_VERSION: u32 = 0x1F02; +pub const GL_EXTENSIONS: u32 = 0x1F03; + +// ARB_multitexture. The unit enumerants are consecutive from GL_TEXTURE0, and +// the ARB names have the same values as the core ones. +pub const GL_TEXTURE0_ARB: u32 = 0x84C0; +pub const GL_TEXTURE31_ARB: u32 = 0x84DF; +pub const GL_ACTIVE_TEXTURE_ARB: u32 = 0x84E0; +pub const GL_CLIENT_ACTIVE_TEXTURE_ARB: u32 = 0x84E1; +pub const GL_MAX_TEXTURE_UNITS_ARB: u32 = 0x84E2; +/* + * SGIS_multitexture's unit enumerants, from the extension's own numbers -- + * this IRIX image's gl.h does not declare the extension at all, so a program + * using it (Quake 2's SGIS path) carries its own definitions, and these are + * the values such programs use. + */ +pub const GL_TEXTURE0_SGIS: u32 = 0x835E; +pub const GL_TEXTURE1_SGIS: u32 = 0x835F; diff --git a/iris-hostgl/src/lib.rs b/iris-hostgl/src/lib.rs new file mode 100644 index 0000000..74efdde --- /dev/null +++ b/iris-hostgl/src/lib.rs @@ -0,0 +1,102 @@ +//! Host OpenGL for IRIX programs under IRIS, answered through host call 3000. +//! +//! An IRIX OpenGL program is given a libGL of ours (the iris-guest-tools +//! project, github.com/atomchild411/iris-guest-tools, installed in place of +//! SGI's with the same SONAME). Its GL entry points do not trap one +//! at a time: each encodes itself into a command buffer, and the buffer comes +//! here in one host call ([`OP_BATCH`]) whenever a call has to reach the host +//! before it returns -- a result, a pointer written, pixel data or client +//! arrays read in place, a swap -- or the buffer is full. The wire format is +//! described in iris-guest-tools' `gl/glshim.h`; the per-entry-point decoder (`calls.rs`) and +//! the guest's encoders are generated from one description of IRIX's gl.h +//! (`tools/glshim.py`), so the two sides agree on every offset. +//! +//! Each call runs on the host's OpenGL: a legacy-profile context per GLX +//! context, drawing into a framebuffer object per drawable. A swap flips the +//! frame on the GPU and either presents it through [`iris_hostcall::display`] +//! -- the IMPACT board composites it into its framebuffer under the window -- +//! or hands the pixels back for the program to put up with +//! XShmPutImage/XPutImage. +//! +//! The modules: +//! - `service`: the operations, who is calling, and how a call that needs a +//! page is run again without running anything twice (read, run, write). +//! - `exec`: one command's arguments, byte order, pixel transfers, client +//! arrays, feedback and selection. +//! - `emul`: the SGI extensions the host has not got, done in the fragment +//! stage with shaders over the fixed-function state. +//! - `draw`: drawables and the swap. +//! - `backend`: what is platform-specific -- contexts, entry point lookup, a +//! CPU-addressable render target. Apple's CGL today. +//! - `calls`, `ext`: generated tables. +//! +//! Only macOS has a backend so far. Elsewhere the crate builds and +//! [`register`] does nothing, so the host call keeps answering EINVAL and the +//! library says host GL is not available. + +#[cfg(target_os = "macos")] +mod backend; +#[cfg(target_os = "macos")] +mod calls; +#[cfg(target_os = "macos")] +mod draw; +#[cfg(target_os = "macos")] +#[allow(dead_code)] // enumerants and entry points kept for the extensions they document +mod emul; +#[cfg(target_os = "macos")] +mod exec; +#[cfg(target_os = "macos")] +mod ext; +#[cfg(target_os = "macos")] +mod gl; +#[cfg(target_os = "macos")] +mod present; +pub mod qos; +#[cfg(target_os = "macos")] +mod service; + +#[cfg(all(test, target_os = "macos"))] +mod tests; + +/// The generated decoder names its executor as `super::Exec`. +#[cfg(target_os = "macos")] +use exec::Exec; + +#[cfg(target_os = "macos")] +pub use service::{ + GlService, OP_BATCH, OP_CREATE, OP_DESTROY, OP_DRAWABLE_GONE, OP_FINISH, OP_GETSTRING, OP_GLX_STRING, OP_GOODBYE, OP_HELLO, + OP_MAKECURRENT, OP_PBUFFER, OP_RELEASE, OP_SWAP, OP_SWAP_INTERVAL, OP_VIDEO_SYNC, PROTOCOL, +}; + +/// Answer host call [`iris_hostcall::GL`] with a new host GL service. +/// +/// Registering again replaces the service, destroying every context the old +/// one held -- which is what a guest reboot wants, since no process that +/// made them is left. Call it from the thread that will make the calls (the +/// CPU thread) or before that thread starts: contexts are made current on the +/// thread that uses them, whichever it is. +pub fn register() { + #[cfg(target_os = "macos")] + { + let backend = Box::new(backend::cgl::Cgl::new()); + iris_hostcall::register(iris_hostcall::GL, Box::new(GlService::new(backend))); + log::info!("host GL: service registered (CGL backend)"); + } + #[cfg(not(target_os = "macos"))] + log::info!("host GL: no backend for this platform; host call {} stays unanswered", iris_hostcall::GL); +} + +/// A texture name for this crate's own use -- the surface a frame is presented +/// through, the textures the SGI-extension emulation draws with. +/// +/// Never from glGenTextures. An old GL program names its textures itself -- +/// Quake binds 1, 2, 3 and so on without ever generating a name, which GL 1 +/// allows -- and glGenTextures hands out exactly those small numbers to +/// whoever asks first. Names from a high range no program picks by hand cannot +/// collide, and a program that does generate names is still given ones the +/// host knows are free. +#[cfg(target_os = "macos")] +pub(crate) fn internal_texture_name() -> u32 { + static NEXT: std::sync::atomic::AtomicU32 = std::sync::atomic::AtomicU32::new(0x7F00_0000); + NEXT.fetch_add(1, std::sync::atomic::Ordering::Relaxed) +} diff --git a/iris-hostgl/src/present.rs b/iris-hostgl/src/present.rs new file mode 100644 index 0000000..991d195 --- /dev/null +++ b/iris-hostgl/src/present.rs @@ -0,0 +1,301 @@ +//! Presenting a finished frame without the program waiting for it. +//! +//! A swap normally costs the program everything the host does with the frame: +//! the blit, the readback, and then `Display::present`, which walks the pixels +//! one at a time into the X screen's buffer. That last part is per pixel and +//! by far the largest of the three at a real window size -- and the program is +//! blocked in a system call (or a channel round trip) the whole time. +//! +//! None of it has to be. Once the pixels are out of the GL they are just bytes, +//! and nothing the program does next depends on them. So with +//! `glXSwapIntervalSGI(0)` -- "do not wait for the retrace", the standard way +//! for a program to say it does not want to be paced by the display -- the +//! frame is handed to this thread and the swap returns. +//! +//! # What is bounded, and how +//! +//! At most two frames are in flight: one this thread is presenting and one +//! waiting behind it. +//! +//! - A frame arriving while one is *queued but not started* replaces it. The +//! queued frame is stale by definition -- the program has drawn a newer one +//! -- and presenting it first would only add latency and show the viewer an +//! older picture. The replaced frame's buffer is kept and reused. +//! - A frame arriving while one is queued *and* one is being presented waits +//! for the presenting one to finish. That is the throttle: a program using +//! the swap as its clock still gets paced, just two frames later than +//! before, and a guest that renders faster than the host can present cannot +//! run away. +//! +//! The emulator's own window presents with swap interval 1, so the display's +//! refresh is the real ceiling. Frames beyond it are dropped here by the +//! replacement rule, which is the point: the guest stops paying for frames +//! nobody will see, rather than queueing them. +//! +//! # What still waits +//! +//! [`drain`] waits for the queue to empty and the thread to be idle. `glFinish` +//! and `glXWaitGL` call it, so they keep meaning what they say: when they +//! return, the frames the program asked for really are on the screen. A +//! readback needs nothing: it reads the drawable's framebuffer object, which +//! this thread never touches -- it has its own copy of the pixels. +//! +//! # Windows that cannot be presented into +//! +//! `Display::present` returns false for a window it does not know (a program +//! drawing into a GLX pixmap, or one whose window has gone), and the frame is +//! then handed back for the program to put up itself. That answer is only +//! known after the fact, which an asynchronous swap cannot use -- so the first +//! swap of each drawable presents inline whatever the interval, and [`note`] +//! records what happened. Only a drawable known to present goes on to the +//! asynchronous path; one that does not keeps presenting inline and handing +//! the frame back, exactly as it did before any of this. + +use std::collections::HashMap; +use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; +use std::sync::{Arc, Condvar, Mutex, MutexGuard, OnceLock}; + +use crate::backend::Surface; + +/// Frames in flight at once: one being presented, one waiting. +const MAX_IN_FLIGHT: usize = 2; +/// Spare pixel buffers kept for reuse rather than freed. +const SPARE_BUFFERS: usize = 2; + +/* + * What the replacement rule actually did. + * + * The rule was documented from the start and counted nothing, so the drop rate + * -- the one number that says whether asynchronous swap is throwing away work + * or absorbing it -- could not be quoted by anyone. These are global rather + * than per client because the presenting thread is: one queue serves every + * channel. + * + * `QUEUED` is every frame handed over, `PRESENTED` every frame that reached + * the screen, `REPLACED` every frame dropped because a newer one arrived + * before the thread got to it, and `WAITED` the times a swap had to wait for + * the queue because the guest was two frames ahead. QUEUED = PRESENTED + + * REPLACED + whatever is in flight at the moment of reading. + */ +static QUEUED: AtomicU64 = AtomicU64::new(0); +static PRESENTED: AtomicU64 = AtomicU64::new(0); +static REPLACED: AtomicU64 = AtomicU64::new(0); +static WAITED: AtomicU64 = AtomicU64::new(0); + +/// Frames queued, presented, replaced, and swaps that had to wait. +pub fn counters() -> (u64, u64, u64, u64) { + ( + QUEUED.load(Ordering::Relaxed), + PRESENTED.load(Ordering::Relaxed), + REPLACED.load(Ordering::Relaxed), + WAITED.load(Ordering::Relaxed), + ) +} + +struct Frame { + window: u32, + at: Option<(i32, i32)>, + src: Src, + w: usize, + h: usize, +} + +/// A frame's pixels: a copy, or the surface the GPU is rendering them into, +/// mapped on this thread (which is where the wait for the GPU then falls). +enum Src { + Bytes { bgra: Vec, stride: usize }, + Surface { sf: Arc, busy: Arc }, +} + +impl Src { + /// Done with: a surface goes back to its drawable, a buffer is returned + /// for reuse. + fn release(self) -> Option> { + match self { + Src::Bytes { bgra, .. } => Some(bgra), + Src::Surface { busy, .. } => { + busy.store(false, Ordering::Release); + None + } + } + } +} + +#[derive(Default)] +struct State { + queued: Option, + /// A frame is being presented right now. + busy: bool, + /// Buffers of frames already presented or replaced. + spare: Vec>, + /// What `Display::present` last said about a window. + presents: HashMap, + started: bool, +} + +struct Presenter { + st: Mutex, + /// The thread waits on this one; queuers and [`drain`] on `idle`. + work: Condvar, + idle: Condvar, +} + +fn presenter() -> &'static Presenter { + static P: OnceLock = OnceLock::new(); + P.get_or_init(|| Presenter { st: Mutex::new(State::default()), work: Condvar::new(), idle: Condvar::new() }) +} + +/// The state, poisoning ignored: a panic while presenting one frame says +/// nothing about the next one, and frames are not worth failing the process +/// for. +fn lock(p: &Presenter) -> MutexGuard<'_, State> { + p.st.lock().unwrap_or_else(|e| e.into_inner()) +} + +fn wait<'a>(cv: &Condvar, st: MutexGuard<'a, State>) -> MutexGuard<'a, State> { + cv.wait(st).unwrap_or_else(|e| e.into_inner()) +} + +/// Record what a synchronous present answered for `window`, so that later +/// swaps of the same drawable know whether the asynchronous path can work. +pub fn note(window: u32, ok: bool) { + lock(presenter()).presents.insert(window, ok); +} + +/// Whether frames for `window` are known to present. False for a window never +/// presented synchronously yet, which is what makes the first swap of each +/// drawable take the synchronous path. +pub fn presents(window: u32) -> bool { + lock(presenter()).presents.get(&window).copied().unwrap_or(false) +} + +/// Forget a drawable: its next swap learns again. Called when a drawable goes, +/// so that a window id reused for another drawable is not taken on trust. +pub fn forget(window: u32) { + lock(presenter()).presents.remove(&window); +} + +/// Take a copy of a finished frame and present it on this thread's own time. +/// Blocks only while [`MAX_IN_FLIGHT`] frames are already in flight. +/// +/// `bgra` is `h` rows of `stride` bytes, `w` pixels each, as +/// `Display::present` wants them. +pub fn queue(window: u32, at: Option<(i32, i32)>, bgra: &[u8], stride: usize, w: usize, h: usize) { + let mut st = admit(); + let mut buf = st.spare.pop().unwrap_or_default(); + buf.clear(); + buf.extend_from_slice(bgra); + put(st, Frame { window, at, src: Src::Bytes { bgra: buf, stride }, w, h }); +} + +/// Queue a frame still being rendered into `sf`: this thread maps it (waiting +/// for the GPU there, not in the swap) and presents `w` x `h` of it, then +/// clears `busy` so its drawable may draw into it again. +pub fn queue_surface(window: u32, at: Option<(i32, i32)>, sf: Arc, busy: Arc, w: usize, h: usize) { + let st = admit(); + put(st, Frame { window, at, src: Src::Surface { sf, busy }, w, h }); +} + +/// The state, once there is room for another frame: starts the thread, and +/// waits while [`MAX_IN_FLIGHT`] frames are already in flight. +fn admit() -> MutexGuard<'static, State> { + let p = presenter(); + let mut st = lock(p); + if !st.started { + st.started = true; + // Detached on purpose: it lives as long as the process, and the + // frames it holds are its own copies. + let _ = std::thread::Builder::new().name("hostgl-present".into()).spawn(run); + } + // One being presented and one already waiting: wait for the first to + // finish rather than let the guest run further ahead. + let mut waited = false; + while st.queued.is_some() as usize + st.busy as usize >= MAX_IN_FLIGHT { + waited = true; + st = wait(&p.idle, st); + } + if waited { + WAITED.fetch_add(1, Ordering::Relaxed); + } + st +} + +/// Put `f` in the queue, replacing whatever is waiting there: it is older. +fn put(mut st: MutexGuard<'static, State>, f: Frame) { + if let Some(old) = st.queued.take() { + REPLACED.fetch_add(1, Ordering::Relaxed); + if let Some(buf) = old.src.release() { + if st.spare.len() < SPARE_BUFFERS { + st.spare.push(buf); + } + } + } + QUEUED.fetch_add(1, Ordering::Relaxed); + st.queued = Some(f); + drop(st); + presenter().work.notify_one(); +} + +/// Wait until nothing is queued and nothing is being presented. +pub fn drain() { + let p = presenter(); + let mut st = lock(p); + while st.queued.is_some() || st.busy { + st = wait(&p.idle, st); + } +} + +fn run() { + let p = presenter(); + crate::qos::latency_critical("presenter"); + loop { + let frame = { + let mut st = lock(p); + loop { + match st.queued.take() { + Some(f) => { + st.busy = true; + break f; + } + None => st = wait(&p.work, st), + } + } + }; + // Outside the lock: presenting takes the display's own lock, and a + // queuer must not be held up by it. + let ok = match iris_hostcall::display() { + Some(d) => match &frame.src { + Src::Bytes { bgra, stride } => crate::draw::present_to(d.as_ref(), frame.window, frame.at, bgra, *stride, frame.w, frame.h), + Src::Surface { sf, .. } => { + let mut ok = false; + let mapped = sf.with_pixels(&mut |px, stride| { + if px.len() >= stride * frame.h && stride >= frame.w * 4 { + ok = crate::draw::present_to(d.as_ref(), frame.window, frame.at, px, stride, frame.w, frame.h); + } + }); + mapped && ok + } + }, + None => false, + }; + if ok { + PRESENTED.fetch_add(1, Ordering::Relaxed); + } + let mut st = lock(p); + st.busy = false; + if !ok { + // The window has gone, or was never one we can draw into. This + // frame is lost; the drawable's next swap takes the synchronous + // path and hands the pixels back to the program instead. + log::debug!("host GL: a frame for window {:#x} could not be presented; swaps of it go back to waiting", frame.window); + st.presents.insert(frame.window, false); + } + if let Some(buf) = frame.src.release() { + if st.spare.len() < SPARE_BUFFERS { + st.spare.push(buf); + } + } + drop(st); + p.idle.notify_all(); + } +} diff --git a/iris-hostgl/src/qos.rs b/iris-hostgl/src/qos.rs new file mode 100644 index 0000000..05c9434 --- /dev/null +++ b/iris-hostgl/src/qos.rs @@ -0,0 +1,93 @@ +//! What the scheduler is told about a thread of ours. +//! +//! This Mac has eight performance cores and four efficiency ones, and macOS +//! decides which a thread may run on largely from its quality-of-service +//! class. A thread left at the default class is eligible for an efficiency +//! core; a `USER_INTERACTIVE` one is kept on the performance cores. Threads +//! spawned by Rust get whatever `pthread_create` gives them, which here is the +//! default class -- `ps -M` shows the emulator's main thread at priority 46 +//! and *every* thread it spawns at 31. +//! +//! That matters because two of the threads on a GL frame's path are created +//! per guest process: the channel's service thread and the device's ring +//! threads. Where they land is decided when the process starts and does not +//! change for its life -- which is the shape of the fast/slow states we have +//! been chasing, a roughly twofold difference fixed for a process's lifetime, +//! invisible to every counter inside the guest and to every resource check +//! outside it. +//! +//! So the threads that carry a frame say what they are. They are latency +//! critical and tiny: a service thread is idle until a message arrives and +//! then must answer at once. Nothing else is raised -- this is not a licence +//! to mark everything important. +//! +//! `IRIS_HOSTGL_QOS=default` leaves them alone, so the same binary can be +//! measured both ways. That is the point: a difference between two builds +//! proves much less than a difference between two runs of one. + +use std::sync::OnceLock; + +/// `QOS_CLASS_USER_INTERACTIVE` from ``. +#[cfg(target_os = "macos")] +const QOS_CLASS_USER_INTERACTIVE: u32 = 0x21; + +#[cfg(target_os = "macos")] +extern "C" { + fn pthread_set_qos_class_self_np(qos_class: u32, relative_priority: i32) -> i32; + fn pthread_get_qos_class_np(thread: libc::pthread_t, qos_class: *mut u32, relative_priority: *mut i32) -> i32; +} + +/// The class this thread has now, for logging. +#[cfg(target_os = "macos")] +fn current() -> u32 { + let mut class = 0u32; + let mut relative = 0i32; + // SAFETY: both out pointers are valid; pthread_self is always a live thread. + unsafe { pthread_get_qos_class_np(libc::pthread_self(), &mut class, &mut relative) }; + class +} + +#[cfg(target_os = "macos")] +fn enabled() -> bool { + static ON: OnceLock = OnceLock::new(); + *ON.get_or_init(|| { + // One switch for the whole emulator, so a controlled comparison is + // one variable on one binary. `IRIS_HOSTGL_QOS=default` predates + // `IRIS_QOS` and means the same thing, so runs already recorded + // against that name stay comparable. + if std::env::var("IRIS_HOSTGL_QOS").as_deref() == Ok("default") { + return false; + } + !matches!(std::env::var("IRIS_QOS").as_deref(), Ok("default") | Ok("off")) + }) +} + +/// Whether the report is wanted as well as the policy. +#[cfg(target_os = "macos")] +fn report() -> bool { + std::env::var("IRIS_QOS").as_deref() != Ok("quiet") +} + +/// Say that this thread is on a frame's path: it should be scheduled where a +/// frame can be answered promptly, not wherever there is room. Logs what the +/// thread was and what it became, because "what class did this thread have" +/// is otherwise not answerable from outside the process. +#[cfg(target_os = "macos")] +pub fn latency_critical(what: &str) { + let before = current(); + if !enabled() { + eprintln!("iris: qos {what}: left at {before:#x} (IRIS_QOS=default)"); + return; + } + // SAFETY: sets the calling thread's own class; no pointers involved. + let r = unsafe { pthread_set_qos_class_self_np(QOS_CLASS_USER_INTERACTIVE, 0) }; + let after = current(); + if r != 0 { + if report() { eprintln!("iris: qos {what}: could NOT become user-interactive ({r}); it stays at {before:#x}"); } + } else { + if report() { eprintln!("iris: qos {what}: {before:#x} -> {after:#x}"); } + } +} + +#[cfg(not(target_os = "macos"))] +pub fn latency_critical(_what: &str) {} diff --git a/iris-hostgl/src/service.rs b/iris-hostgl/src/service.rs new file mode 100644 index 0000000..95cf82a --- /dev/null +++ b/iris-hostgl/src/service.rs @@ -0,0 +1,838 @@ +//! The host GL service: host call 3000's operations. +//! +//! # Who is calling +//! +//! Every IRIX process reaches the same service, so a call names its caller: +//! `HELLO` hands a process a client id (never reused), and every later call +//! carries it. Contexts belong to the client that made it and are numbered +//! for the whole service; drawables belong to a context's share group. What +//! GLX keeps per process -- the current context and drawables, the swap +//! interval -- is kept per client. A forked child says hello again (the +//! library notices its pid changed) and starts with nothing current, as GLX +//! would have it. +//! +//! # Calls that are run again +//! +//! A call that needs a page the program has not got in memory answers +//! need-page; the program touches the page and makes the *same* call again +//! (same registers, the serial in `$8` included). The hostcall framework +//! keeps pages already read and skips pages already written, but nothing it +//! does can undo GL work -- so every operation is split in three: +//! +//! 1. **Read.** Arguments, the command buffer, strings: all of it before any +//! host state changes. A fault here costs nothing; the retry starts over. +//! 2. **Run** on the host's GL. Within a batch, commands run one at a time, +//! and a command reads everything it needs before it changes anything +//! (exec.rs). A fault in command `k` stops the batch *before* `k` has done +//! anything; commands before it have run. The batch is remembered +//! ([`Stage::Batch`]: the buffer, where it stopped, the last result, the +//! writes queued so far) and the retry carries on from `k`. +//! 3. **Write** everything the call gives back -- glReadPixels data, glGet +//! results, a frame -- only after the whole call has run. If a write +//! faults, the writes and the answer are remembered ([`Stage::Writes`]) and +//! the retry only writes. +//! +//! What is remembered is keyed by the call's full register set, which the +//! client id and serial make unique, so no other call -- another process's, +//! or this process's next one -- can be mistaken for the retry. At most +//! [`RESUMES`] are kept; a process killed between a need-page answer and its +//! retry leaves one behind until newer ones push it out. +//! +//! The library guarantees that a command touching guest memory outside the +//! buffer ends its batch (glshim.h), so in practice only the last command of +//! a batch reads guest memory or queues a write; the machinery above does not +//! rely on it. It does rely on no command reading memory an earlier command +//! of the same call writes (true by that same guarantee): writes are made at +//! the end, and the framework's page cache would not see them anyway. + +use std::collections::{HashMap, HashSet, VecDeque}; +use std::time::{Duration, Instant}; + +use iris_hostcall::{Fault, GuestMemory, Reply, Service}; + +use crate::backend::{Backend, ContextHandle}; +use crate::calls; +use crate::draw::{self, Draw}; +use crate::exec::{read_guest, ClientSide, Exec, Writes}; +use crate::ext; +use crate::gl::*; + +pub const OP_HELLO: u64 = 0x1_0000; +pub const OP_CREATE: u64 = 0x1_0001; +pub const OP_MAKECURRENT: u64 = 0x1_0002; +pub const OP_SWAP: u64 = 0x1_0003; +pub const OP_DESTROY: u64 = 0x1_0004; +pub const OP_GETSTRING: u64 = 0x1_0005; +pub const OP_RELEASE: u64 = 0x1_0006; +pub const OP_FINISH: u64 = 0x1_0007; +pub const OP_BATCH: u64 = 0x1_0008; +pub const OP_PBUFFER: u64 = 0x1_0009; +pub const OP_DRAWABLE_GONE: u64 = 0x1_000A; +pub const OP_SWAP_INTERVAL: u64 = 0x1_000B; +pub const OP_VIDEO_SYNC: u64 = 0x1_000C; +pub const OP_GLX_STRING: u64 = 0x1_000D; +pub const OP_GOODBYE: u64 = 0x1_000E; +/// What the presenting thread has done: frames presented in v0, frames +/// replaced before they could be in v1. Global, not per client -- one thread +/// serves every channel -- and answerable without a context. +pub const OP_PRESENT_STATS: u64 = 0x1_000F; + +/// The protocol: HELLO's second result, which the library checks. +pub const PROTOCOL: u64 = 2; + +const EINVAL: u64 = 22; +const EFAULT: u64 = 14; + +/// A pbuffer's drawable id, which must not collide with an X window's (X ids +/// keep their top three bits clear) -- and must not have bit 31 set: a 32-bit +/// value travels to the guest in a 64-bit register, where the MIPS rules keep +/// it sign-extended, and one that arrives zero-extended compares equal to +/// nothing the guest loads from memory. +const PBUFFER_ID: u32 = 0x4000_0000; +/// The largest drawable, either way. +const MAX_DIM: i32 = 8192; +/// The largest command buffer (the library's is 128 KB). +const MAX_BATCH: usize = 16 << 20; +/// The frame clock the video-sync counter counts, as a real SGI's display +/// would (GLX_SGI_video_sync). +const FRAME_NS: u128 = 1_000_000_000 / 60; +/// The longest a swap interval or a video-sync wait asks the program to sleep. +const MAX_WAIT_NS: u128 = 10_000_000_000; +/// Calls part-way through a need-page retry, remembered at once. +pub const RESUMES: usize = 16; +/// Clients kept with no contexts before the oldest such are forgotten. A +/// process that asked whether GLX is there and was killed never says goodbye, +/// but an entry is a few bytes, and forgetting a live one breaks a program +/// that probed long before it draws -- so only a very large number is trimmed. +const IDLE_CLIENTS: usize = 65536; + +struct Ctx { + handle: ContextHandle, + owner: u32, + /// The share group: the id of the first context in it. + group: u32, + /// GLX sets the viewport to the drawable the first time a context is made + /// current; after that it is the program's. + viewport_set: bool, + client: ClientSide, +} + +struct Group { + owner: u32, + members: usize, + draws: HashMap, +} + +#[derive(Default)] +struct Client { + current: Option, + /// The drawable drawn into, and the one read from: GLX_SGI_make_current_read + /// lets them differ. + draw: u32, + read: u32, + /// Frames to wait between swaps, and when the last swap was due + /// (GLX_SGI_swap_control). + swap_interval: u32, + last_swap: Option, + /// The program asked for interval 0 -- "do not wait for the retrace" -- + /// so its swaps hand the frame to the presenting thread and return + /// (`present.rs`). False until it asks: a program that never calls + /// glXSwapIntervalSGI keeps waiting for its frames, which is what it and + /// everything written before this expect. + swap_async: bool, + /// When the client said hello, for forgetting idle ones oldest first. + since: u64, +} + +/// Where a call stopped, to be carried on by its retry. +enum Stage { + Batch { bytes: Vec, next: usize, last: u64, writes: Writes }, + Writes { writes: Writes, reply: Reply }, +} + +struct Resume { + args: [u64; 8], + stage: Stage, +} + +pub struct GlService { + backend: Box, + ctxs: HashMap, + next_ctx: u32, + groups: HashMap, + clients: HashMap, + next_client: u32, + next_pbuffer: u32, + /// Each entry point's host function, looked up on first use (0: absent). + funcs: Vec>, + /// Things already reported, so each is said once. + reported: HashSet, + resumes: VecDeque, + started: Instant, + /// Command buffers run, and calls in them: how much batching is saving. + batches: u64, + commands: u64, +} + +impl GlService { + pub fn new(backend: Box) -> GlService { + GlService { + backend, + ctxs: HashMap::new(), + next_ctx: 1, + groups: HashMap::new(), + clients: HashMap::new(), + next_client: 1, + next_pbuffer: 0, + funcs: vec![None; calls::NAMES.len()], + reported: HashSet::new(), + resumes: VecDeque::new(), + started: Instant::now(), + batches: 0, + commands: 0, + } + } + + /// Calls remembered part-way (tests watch this drain). + pub fn pending(&self) -> usize { + self.resumes.len() + } + + fn hello(&mut self, version: u64) -> Reply { + if version != PROTOCOL { + log::warn!("host GL: a program's libGL speaks protocol {version}, this host {PROTOCOL}"); + return Reply::Ok(0, PROTOCOL); + } + let idle = self.clients.iter().filter(|(_, c)| c.current.is_none()).count(); + if idle >= IDLE_CLIENTS { + let owners: HashSet = self.ctxs.values().map(|c| c.owner).collect(); + if let Some(oldest) = + self.clients.iter().filter(|(id, _)| !owners.contains(id)).min_by_key(|(_, c)| c.since).map(|(id, _)| *id) + { + self.clients.remove(&oldest); + } + } + let id = self.next_client; + // Ids stay below bit 31, for the sign-extension reason pbuffer ids do. + self.next_client = if id >= 0x7fff_ffff { 1 } else { id + 1 }; + let since = self.next_client as u64; + self.clients.insert(id, Client { since, ..Default::default() }); + Reply::Ok(id as u64, PROTOCOL) + } + + /// Make `client`'s context current on this thread if it is not already, + /// with its drawables bound. The thread may last have run another + /// client's calls. + fn select_client(&mut self, client: u32) { + let Some(c) = self.clients.get(&client) else { return }; + let Some(ctx) = c.current.and_then(|id| self.ctxs.get(&id)) else { return }; + if self.backend.current() != Some(ctx.handle) { + self.backend.make_current(Some(ctx.handle)); + if let Some(g) = self.groups.get(&ctx.group) { + draw::bind(&g.draws, c.draw, c.read); + } + } + } + + /// After something else was made current or bound: the client's own back. + fn restore_client(&mut self, client: u32) { + let handle = self.clients.get(&client).and_then(|c| c.current).and_then(|id| self.ctxs.get(&id)).map(|c| c.handle); + self.backend.make_current(handle); + self.rebind(client); + } + + fn rebind(&self, client: u32) { + let Some(c) = self.clients.get(&client) else { return }; + let Some(ctx) = c.current.and_then(|id| self.ctxs.get(&id)) else { return }; + if let Some(g) = self.groups.get(&ctx.group) { + draw::bind(&g.draws, c.draw, c.read); + } + } + + fn remember(&mut self, args: &[u64; 8], stage: Stage) { + if self.resumes.len() == RESUMES { + self.resumes.pop_front(); + } + self.resumes.push_back(Resume { args: *args, stage }); + } + + /// Phase 3: store the call's results in the guest, then answer. + fn finish(&mut self, mem: &mut dyn GuestMemory, args: &[u64; 8], writes: Writes, reply: Reply) -> Reply { + let writes = merge(writes); + for i in 0..writes.len() { + let (addr, ref data) = writes[i]; + if let Err(f) = mem.write(addr, data) { + self.remember(args, Stage::Writes { writes, reply }); + return Reply::NeedPage(f); + } + } + reply + } + + /// Phase 2 of a batch, from command offset `next`. + #[allow(clippy::too_many_arguments)] + fn run_batch( + &mut self, + mem: &mut dyn GuestMemory, + args: &[u64; 8], + client: u32, + bytes: Vec, + next: usize, + mut last: u64, + mut writes: Writes, + ) -> Reply { + let Some(c) = self.clients.get(&client) else { return Reply::Err(EINVAL) }; + let current_read = c.read; + // No context current (or it went away between retries): GL calls + // without one do nothing. + let Some(id) = c.current else { return Reply::Ok(0, 0) }; + let GlService { ctxs, groups, funcs, reported, backend, .. } = self; + let Some(ctx) = ctxs.get_mut(&id) else { return Reply::Ok(0, 0) }; + let no_draws = HashMap::new(); + let draws = groups.get(&ctx.group).map_or(&no_draws, |g| &g.draws); + let len = bytes.len(); + let mut at = next; + let mut n = 0u64; + let mut fault: Option = None; + { + let mut x = Exec::new(mem, &mut writes, funcs, reported, backend.as_ref(), &mut ctx.client, draws, current_read); + while at + 4 <= len { + let head = u32::from_be_bytes(bytes[at..at + 4].try_into().unwrap()); + let (op, words) = ((head >> 16) as usize, (head & 0xffff) as usize); + let end = at + words * 4; + if words < 1 || end > len { + log::warn!("host GL: malformed command at {at} of {len} (header {head:#x}); the rest of the buffer is dropped"); + break; + } + trace_call(op, &bytes[at..end]); + let r = calls::run(&mut x, op, &bytes[at..end]); + if let Some(f) = x.fault.take() { + // Stopped before doing anything: run again from here. + x.abandon(); + fault = Some(f); + break; + } + match r { + Some(v) => last = v, + None => { + if x.reported.insert(op | 1 << 20) { + log::warn!("host GL: {} could not be run (bad argument data)", calls::NAMES.get(op).unwrap_or(&"?")); + } + } + } + x.image_done(); + at = end; + n += 1; + } + } + self.commands += n; + if let Some(f) = fault { + self.remember(args, Stage::Batch { bytes, next: at, last, writes }); + return Reply::NeedPage(f); + } + self.batches += 1; + self.finish(mem, args, writes, Reply::Ok(last, 0)) + } + + /// Everything `client` owns goes: contexts, drawables, remembered calls. + fn goodbye(&mut self, client: u32) { + let ids: Vec = self.ctxs.iter().filter(|(_, c)| c.owner == client).map(|(id, _)| *id).collect(); + for id in ids { + self.destroy(client, id); + } + self.clients.remove(&client); + self.resumes.retain(|r| r.args[2] as u32 != client); + if self.batches > 0 { + log::debug!( + "host GL: client {client} gone -- {} calls in {} buffers so far, {:.1} a buffer", + self.commands, + self.batches, + self.commands as f64 / self.batches as f64 + ); + } + } + + fn destroy(&mut self, client: u32, id: u32) { + let Some(ctx) = self.ctxs.get(&id) else { return }; + if ctx.owner != client { + return; + } + let ctx = self.ctxs.remove(&id).unwrap(); + if let Some(c) = self.clients.get_mut(&client) { + if c.current == Some(id) { + c.current = None; + } + } + let last = match self.groups.get_mut(&ctx.group) { + Some(g) => { + g.members -= 1; + g.members == 0 + } + None => true, + }; + self.backend.destroy_context(ctx.handle); + if last { + // The group's objects died with its last context; the surfaces' + // own memory is released as the drawables drop. + self.groups.remove(&ctx.group); + } + self.restore_client(client); + } + + /// Run `f` on each of `client`'s share groups with one of its contexts + /// current, then put the client's own context back. + fn in_groups(&mut self, client: u32, mut f: impl FnMut(&mut Group)) { + let groups: Vec<(u32, ContextHandle)> = self + .groups + .iter() + .filter(|(_, g)| g.owner == client) + .filter_map(|(gid, _)| self.ctxs.values().find(|c| c.group == *gid).map(|c| (*gid, c.handle))) + .collect(); + for (gid, handle) in groups { + self.backend.make_current(Some(handle)); + if let Some(g) = self.groups.get_mut(&gid) { + f(g); + } + } + self.restore_client(client); + } +} + +impl Service for GlService { + fn call(&mut self, mem: &mut dyn GuestMemory, args: &[u64; 8]) -> Reply { + let op = args[0]; + if op == OP_HELLO { + return self.hello(args[1]); + } + let client = args[2] as u32; + if !self.clients.contains_key(&client) { + return Reply::Err(EINVAL); + } + self.select_client(client); + + // The retry of a call that stopped part-way. + if let Some(i) = self.resumes.iter().position(|r| r.args == *args) { + let r = self.resumes.remove(i).unwrap(); + return match r.stage { + Stage::Batch { bytes, next, last, writes } => self.run_batch(mem, args, client, bytes, next, last, writes), + Stage::Writes { writes, reply } => self.finish(mem, args, writes, reply), + }; + } + + // A guest address, whole: a 32-bit program's are below 2 GB, so they + // arrive without sign extension, and a 64-bit program's need all 64. + let at = args[1]; + macro_rules! slots { + ($n:expr) => { + match read_slots::<$n>(mem, at) { + Ok(s) => s, + Err(f) => return Reply::NeedPage(f), + } + }; + } + match op { + OP_BATCH => { + let [buf, len] = slots!(2); + if len == 0 { + return Reply::Ok(0, 0); + } + if len > MAX_BATCH as u64 || len % 8 != 0 { + return Reply::Err(EFAULT); + } + if self.clients[&client].current.is_none() { + return Reply::Ok(0, 0); + } + let bytes = match read_guest(mem, buf, len as usize) { + Ok(b) => b, + Err(f) => return Reply::NeedPage(f), + }; + self.run_batch(mem, args, client, bytes, 0, 0, Vec::new()) + } + OP_CREATE => { + let [share] = slots!(1); + let share = self.ctxs.get(&(share as u32)).filter(|c| c.owner == client).map(|c| (c.handle, c.group)); + let Some(handle) = self.backend.create_context(share.map(|s| s.0)) else { return Reply::Ok(0, 0) }; + let id = self.next_ctx; + self.next_ctx = if id >= 0x7fff_ffff { 1 } else { id + 1 }; + let group = match share { + Some((_, g)) => g, + None => id, + }; + let g = self.groups.entry(group).or_insert_with(|| Group { owner: client, members: 0, draws: HashMap::new() }); + g.members += 1; + self.ctxs.insert(id, Ctx { handle, owner: client, group, viewport_set: false, client: ClientSide::default() }); + Reply::Ok(id as u64, 0) + } + OP_MAKECURRENT => { + let [ctx, draw, read, w, h] = slots!(5); + let (id, draw, read) = (ctx as u32, draw as u32, read as u32); + let (w, h) = ((w as i32).clamp(1, MAX_DIM), (h as i32).clamp(1, MAX_DIM)); + let Some(c) = self.ctxs.get_mut(&id).filter(|c| c.owner == client) else { return Reply::Err(EINVAL) }; + let first = !c.viewport_set; + c.viewport_set = true; + let (handle, group) = (c.handle, c.group); + if !self.backend.make_current(Some(handle)) { + return Reply::Err(EINVAL); + } + let read = if read == 0 { draw } else { read }; + let Some(g) = self.groups.get_mut(&group) else { return Reply::Err(EINVAL) }; + // A pbuffer is the size it was made; only a window's size + // follows its window. Resizing one here would throw away what + // a program had drawn in it. + if draw & PBUFFER_ID == 0 || !g.draws.contains_key(&draw) { + let samples = g.draws.get(&draw).map_or(0, |d| d.samples); + draw::ensure(&mut g.draws, self.backend.as_mut(), draw, w, h, samples); + } + if !g.draws.contains_key(&read) { + draw::ensure(&mut g.draws, self.backend.as_mut(), read, w, h, 0); + } + draw::bind(&g.draws, draw, read); + let samples = g.draws[&draw].samples; + // SAFETY: plain state in the context just made current. + unsafe { + // Multisample rasterisation follows the drawable: the + // context's own pixel format has no sample buffers. + if samples > 1 { + glEnable(GL_MULTISAMPLE); + } else { + glDisable(GL_MULTISAMPLE); + } + if first { + glViewport(0, 0, w, h); + } + } + let cl = self.clients.get_mut(&client).unwrap(); + cl.current = Some(id); + cl.draw = draw; + cl.read = read; + log::debug!("host GL: client {client} context {id} draws into {draw:#x}, reads {read:#x}, {w}x{h}"); + Reply::Ok(0, 0) + } + OP_PBUFFER => { + let [w, h, samples] = slots!(3); + let (w, h, samples) = (w as i32, h as i32, (samples as i32).clamp(0, 16)); + let Some(group) = self.clients[&client].current.and_then(|id| self.ctxs.get(&id)).map(|c| c.group) else { + return Reply::Err(EINVAL); + }; + if !(1..=MAX_DIM).contains(&w) || !(1..=MAX_DIM).contains(&h) || self.next_pbuffer >= 0x3fff_ffff { + return Reply::Err(EINVAL); + } + self.next_pbuffer += 1; + let id = PBUFFER_ID | self.next_pbuffer; + if let Some(g) = self.groups.get_mut(&group) { + draw::ensure(&mut g.draws, self.backend.as_mut(), id, w, h, samples); + } + // Making it left it bound: drawing goes back where it was. + self.rebind(client); + Reply::Ok(id as u64, 0) + } + OP_DRAWABLE_GONE => { + let [id] = slots!(1); + let id = id as u32; + // Its frames must be on the screen before it can go, and a + // window id used again for another drawable must not inherit + // what this one knew about presenting. + crate::present::drain(); + crate::present::forget(id); + self.in_groups(client, |g| { + if let Some(d) = g.draws.remove(&id) { + draw::delete(d); + } + }); + Reply::Ok(0, 0) + } + OP_SWAP_INTERVAL => { + let [n] = slots!(1); + let c = self.clients.get_mut(&client).unwrap(); + c.swap_interval = (n as u32).min(600); + // GLX_SGI_swap_control: 0 is "do not wait for the vertical + // retrace". Here that is the whole present, not just the + // retrace -- the frame goes to the presenting thread and the + // swap returns. Any other interval means the program wants to + // be paced, so its swaps wait as they always did. + c.swap_async = c.swap_interval == 0; + Reply::Ok(0, 0) + } + OP_VIDEO_SYNC => { + let [wait, divisor, remainder] = slots!(3); + let (divisor, remainder) = (divisor as u32 as u128, remainder as u32 as u128); + let elapsed = self.started.elapsed().as_nanos(); + let now = elapsed / FRAME_NS; + if wait != 0 && divisor > 0 { + // The count a display's retrace would reach next that + // satisfies the program, and how long until then. The + // program sleeps; the emulated machine must not. + let want = (now / divisor + 1) * divisor + remainder % divisor; + let ns = (want * FRAME_NS).saturating_sub(elapsed).min(MAX_WAIT_NS); + return Reply::Ok(want as u32 as u64, ns as u64); + } + Reply::Ok(now as u32 as u64, 0) + } + OP_GLX_STRING => { + let [which, buf, len] = slots!(3); + let s: &str = match which { + 0 => ext::GLX_EXTENSIONS, + 1 => "SGI", + _ => "1.2", + }; + if len == 0 || buf == 0 { + return Reply::Err(EINVAL); + } + self.finish(mem, args, vec![(buf, c_string(s.as_bytes(), len))], Reply::Ok(0, 0)) + } + OP_RELEASE => { + self.clients.get_mut(&client).unwrap().current = None; + self.backend.make_current(None); + Reply::Ok(0, 0) + } + OP_SWAP => { + // The fourth slot: nonzero when the program's visual has red + // in the low byte, so the frame comes back in that order. + // Then the window's top-left on the screen, valid when bit 0 + // of the seventh is set, for a display that composites. + let [buf, w, h, abgr, x, y, place] = slots!(7); + let at = (place & 1 != 0).then_some((x as i32, y as i32)); + let (buf, w, h) = (buf, (w as i32).clamp(0, MAX_DIM), (h as i32).clamp(0, MAX_DIM)); + let c = &self.clients[&client]; + let (window, interval, last_swap) = (c.draw, c.swap_interval, c.last_swap); + // A frame with a screen position goes to a display that + // composites it: it is queued whatever the swap interval, so + // the wait for the GPU and the present happen off the CPU + // thread (the first swap of each drawable is still inline: + // see present::presents). Pacing is the `wait` below, slept + // in the guest. + let sink = if c.swap_async || at.is_some() { draw::Sink::Queued } else { draw::Sink::Now }; + let Some(group) = c.current.and_then(|id| self.ctxs.get(&id)).map(|c| c.group) else { + return Reply::Err(EINVAL); + }; + let Some(d) = self.groups.get(&group).and_then(|g| g.draws.get(&window)) else { return Reply::Err(EINVAL) }; + // GLX_SGI_swap_control: this swap is due `interval` frames + // after the last. The program is told how long that is. + let now = Instant::now(); + let mut wait = Duration::ZERO; + if interval > 1 { + if let Some(last) = last_swap { + let due = last + Duration::from_nanos((FRAME_NS * interval as u128).min(MAX_WAIT_NS) as u64); + wait = due.saturating_duration_since(now); + } + } + self.clients.get_mut(&client).unwrap().last_swap = Some(now + wait); + let (dw, dh, samples) = (d.w, d.h, d.samples); + let frame = draw::swap(d, window, at, w, h, sink, abgr != 0); + // The window is a different size from the drawable, so the + // next frame is drawn at the new one. After the read, not + // before: the pixels presented are in the old buffer. + if (w, h) != (dw, dh) && w > 0 && h > 0 { + if let Some(g) = self.groups.get_mut(&group) { + draw::ensure(&mut g.draws, self.backend.as_mut(), window, w, h, samples); + } + } + self.rebind(client); + let wait = wait.as_nanos() as u64; + match frame { + // 1 tells the library the frame is already on screen. + None => Reply::Ok(1, wait), + Some(_) if buf == 0 => Reply::Err(EFAULT), + Some(frame) => self.finish(mem, args, vec![(buf, frame)], Reply::Ok(0, wait)), + } + } + OP_DESTROY => { + let [id] = slots!(1); + self.destroy(client, id as u32); + Reply::Ok(0, 0) + } + OP_FINISH => { + if self.clients[&client].current.is_some() { + // SAFETY: the client's context is current. + unsafe { glFinish() }; + } + // glFinish and glXWaitGL mean "everything I asked for has + // happened". With asynchronous swaps that includes frames + // still waiting to be presented. + crate::present::drain(); + Reply::Ok(0, 0) + } + OP_GETSTRING => { + let [name, buf, len] = slots!(3); + let name = name as u32; + if self.clients[&client].current.is_none() || len == 0 || buf == 0 { + return Reply::Err(EINVAL); + } + // What the program is told it is talking to is ours to state + // (see `ext`): the host's extension list names things an IRIX + // program has never heard of and whose entry points this + // library does not have, and its vendor, renderer and version + // are the Mac's. + log_host_strings(); + let s: Vec = if let Some(ours) = substituted(name) { + ours.as_bytes().to_vec() + } else { + // SAFETY: a context is current; the string is copied at once. + let p = unsafe { glGetString(name) }; + if p.is_null() { + return Reply::Err(EINVAL); + } + unsafe { std::ffi::CStr::from_ptr(p as *const std::ffi::c_char) }.to_bytes().to_vec() + }; + self.finish(mem, args, vec![(buf, c_string(&s, len))], Reply::Ok(0, 0)) + } + OP_PRESENT_STATS => { + let (queued, presented, replaced, waited) = crate::present::counters(); + log::debug!( + "host GL: presenter so far: {queued} frames queued, {presented} presented, \ + {replaced} replaced by a newer one, {waited} swaps waited for the queue" + ); + Reply::Ok(presented, replaced) + } + OP_GOODBYE => { + self.goodbye(client); + Reply::Ok(0, 0) + } + _ => Reply::Err(EINVAL), + } + } +} + +/// The host GL's own vendor, renderer and version, to the log, once. What a +/// guest is told is not what the host said, so a bug report that quotes the +/// guest's strings says nothing about the machine underneath; this is where +/// that is written down. Only called with a context current. +fn log_host_strings() { + use std::sync::OnceLock; + static LOGGED: OnceLock<()> = OnceLock::new(); + + LOGGED.get_or_init(|| { + let of = |name: u32| { + // SAFETY: a context is current; the string is copied at once. + let p = unsafe { glGetString(name) }; + if p.is_null() { + return String::from("(none)"); + } + unsafe { std::ffi::CStr::from_ptr(p as *const std::ffi::c_char) }.to_string_lossy().into_owned() + }; + log::debug!( + "host GL: the host's own strings are vendor {:?}, renderer {:?}, version {:?}; \ + guests are told {:?}, {:?}, {:?} (IRIS_HOSTGL_STRINGS=host passes the host's through)", + of(GL_VENDOR), + of(GL_RENDERER), + of(GL_VERSION), + ext::VENDOR, + ext::RENDERER, + ext::VERSION + ); + }); +} + +/// The string IRIS answers for `name`, or `None` to pass the host's through. +/// +/// `IRIS_HOSTGL_STRINGS=host` in the emulator's environment turns the +/// substitution off, for when the host GL is what is being debugged. The real +/// strings also go to the log either way, so a bug report has them without +/// anyone having to reproduce it twice. +fn substituted(name: u32) -> Option<&'static str> { + use std::sync::OnceLock; + static PASS_THROUGH: OnceLock = OnceLock::new(); + + if *PASS_THROUGH.get_or_init(|| std::env::var("IRIS_HOSTGL_STRINGS").as_deref() == Ok("host")) { + return None; + } + match name { + GL_VENDOR => Some(ext::VENDOR), + GL_RENDERER => Some(ext::RENDERER), + GL_VERSION => Some(ext::VERSION), + GL_EXTENSIONS => Some(ext::EXTENSIONS), + _ => None, + } +} + +impl Drop for GlService { + fn drop(&mut self) { + for (_, ctx) in self.ctxs.drain() { + self.backend.destroy_context(ctx.handle); + } + self.groups.clear(); + self.backend.make_current(None); + } +} + +/// `n` 8-byte big-endian argument slots at guest address `at`. +fn read_slots(mem: &mut dyn GuestMemory, at: u64) -> Result<[u64; N], Fault> { + let bytes = read_guest(mem, at, N * 8)?; + let mut out = [0u64; N]; + for (i, v) in out.iter_mut().enumerate() { + *v = u64::from_be_bytes(bytes[i * 8..i * 8 + 8].try_into().unwrap()); + } + Ok(out) +} + +/// `s` cut to fit a buffer of `len` bytes, NUL-terminated. +fn c_string(s: &[u8], len: u64) -> Vec { + let n = s.len().min(len.saturating_sub(1).min(1 << 20) as usize); + let mut out = s[..n].to_vec(); + out.push(0); + out +} + +/// Queued writes as disjoint extents, a later write winning where two +/// overlap. The framework skips a write it has already made *at the same +/// address* in this call, so two writes starting at one address would lose +/// the second; disjoint extents cannot collide. +pub fn merge(writes: Writes) -> Writes { + let mut out: Writes = Vec::new(); + for (addr, data) in writes { + let Some(end) = addr.checked_add(data.len() as u64) else { continue }; + if data.is_empty() { + continue; + } + let over: Vec = + out.iter().enumerate().filter(|(_, (a, d))| *a < end && addr < a + d.len() as u64).map(|(i, _)| i).collect(); + if over.is_empty() { + out.push((addr, data)); + continue; + } + let lo = over.iter().map(|&i| out[i].0).min().unwrap().min(addr); + let hi = over.iter().map(|&i| out[i].0 + out[i].1.len() as u64).max().unwrap().max(end); + let mut buf = vec![0u8; (hi - lo) as usize]; + for &i in &over { + let (a, ref d) = out[i]; + buf[(a - lo) as usize..(a - lo) as usize + d.len()].copy_from_slice(d); + } + buf[(addr - lo) as usize..(end - lo) as usize].copy_from_slice(&data); + for &i in over.iter().rev() { + out.remove(i); + } + out.push((lo, buf)); + } + out +} + +/// `IRIS_HOSTGL_CALLS=`: log each call whose name contains it, +/// with its first argument words, up to 4000 of them. `IRIS_HOSTGL_CALLS=Tex` +/// is every texture call. +fn trace_call(op: usize, c: &[u8]) { + static WANT: std::sync::OnceLock> = std::sync::OnceLock::new(); + static LEFT: std::sync::atomic::AtomicU32 = std::sync::atomic::AtomicU32::new(4000); + let Some(filter) = WANT.get_or_init(|| std::env::var("IRIS_HOSTGL_CALLS").ok().filter(|v| !v.is_empty())) else { + return; + }; + let name = calls::NAMES.get(op).copied().unwrap_or("?"); + use std::sync::atomic::Ordering::Relaxed; + // Taken with a compare-and-swap rather than a load and a store, so the + // count stays right whichever thread makes the calls. + let take = || { + let mut left = LEFT.load(Relaxed); + while left > 0 { + match LEFT.compare_exchange_weak(left, left - 1, Relaxed, Relaxed) { + Ok(_) => return true, + Err(now) => left = now, + } + } + false + }; + if name.contains(filter.as_str()) && take() { + let args: Vec = (1..c.len().min(40) / 4) + .map(|i| format!("{:#x}", u32::from_be_bytes([c[i * 4], c[i * 4 + 1], c[i * 4 + 2], c[i * 4 + 3]]))) + .collect(); + log::info!("[glcall] {name}({})", args.join(", ")); + } +} diff --git a/iris-hostgl/src/tests.rs b/iris-hostgl/src/tests.rs new file mode 100644 index 0000000..527cb99 --- /dev/null +++ b/iris-hostgl/src/tests.rs @@ -0,0 +1,1357 @@ +//! Tests: command buffers encoded the way the guest library encodes them +//! (big-endian, glshim.h), replayed on a real CGL context, with guest memory +//! that makes the service answer need-page. +//! +//! Two kinds of fake memory. [`Proc`] is a `GuestMemory` of its own with pages +//! that are absent or copy-on-write until touched, and *no* caching between +//! retries -- the worst case, as if the framework had dropped its record of +//! the call -- used by calling the service directly. [`Tlb`] is a +//! `PageAccess` behind the real `iris_hostcall::dispatch`, with a 48-entry +//! TLB, so a call needing more pages than that only completes because the +//! framework keeps what it has read. + +use std::collections::{HashSet, VecDeque}; +use std::cell::RefCell; +use std::rc::Rc; +use std::sync::Mutex; + +use iris_hostcall::{Fault, GuestMemory, PageAccess, Reply, Service, PAGE}; + +use crate::backend::cgl::Cgl; +use crate::calls; +use crate::service::*; + +const GL_COLOR_BUFFER_BIT: i32 = 0x4000; +const GL_TRIANGLES: i32 = 0x0004; +const GL_TRIANGLE_FAN: i32 = 0x0006; +const GL_QUADS: i32 = 0x0007; +const GL_PROJECTION: i32 = 0x1701; +const GL_MODELVIEW: i32 = 0x1700; +const GL_FLAT: i32 = 0x1D00; +const GL_SMOOTH: i32 = 0x1D01; +const GL_RGBA: i32 = 0x1908; +const GL_UNSIGNED_BYTE: i32 = 0x1401; +const GL_UNSIGNED_SHORT: i32 = 0x1403; +const GL_FLOAT: i32 = 0x1406; +const GL_BLEND: i32 = 0x0BE2; +const GL_ONE: i32 = 1; +const GL_VERTEX_ARRAY: i32 = 0x8074; +const GL_COLOR_ARRAY: i32 = 0x8076; +const GL_PACK_ALIGNMENT: i32 = 0x0D05; +const GL_UNPACK_ALIGNMENT: i32 = 0x0CF5; + +/// One argument, as the generated encoder lays it out. +pub(crate) enum V { + I(i32), + F(f32), + D(f64), + /// An array copied into the command: its element count and bytes. + Inline(u32, Vec), + /// An array by reference: its element count and guest address. + ByRef(u32, u64), + /// A guest address (eight bytes, high word first). + A(u64), +} + +/// Command buffers, big-endian, laid out exactly as tools/glshim.py's +/// `layout` and `gen_c` do: 4-byte slots from offset 4, doubles on 8, +/// addresses in 8 bytes, an array as (count, 8-byte offset-or-address) with +/// inline data after the fixed part. +#[derive(Default)] +pub(crate) struct Enc { + pub(crate) buf: Vec, +} + +impl Enc { + pub(crate) fn cmd(&mut self, name: &str, args: &[V]) -> &mut Self { + let op = calls::NAMES.iter().position(|n| *n == name).unwrap_or_else(|| panic!("no entry point {name}")); + let mut off = 4usize; + let mut slots = Vec::new(); + for a in args { + match a { + V::D(_) => { + off = (off + 7) & !7; + slots.push(off); + off += 8; + } + V::Inline(..) | V::ByRef(..) => { + slots.push(off); + off += 12; + } + V::A(_) => { + slots.push(off); + off += 8; + } + _ => { + slots.push(off); + off += 4; + } + } + } + let fixed = (off + 7) & !7; + let tail: usize = args.iter().map(|a| if let V::Inline(_, b) = a { (b.len() + 3) & !3 } else { 0 }).sum(); + let size = (fixed + tail + 7) & !7; + let mut c = vec![0u8; size]; + c[..4].copy_from_slice(&(((op as u32) << 16) | (size as u32 >> 2)).to_be_bytes()); + let mut at = fixed; + for (a, &o) in args.iter().zip(&slots) { + match a { + V::I(v) => c[o..o + 4].copy_from_slice(&v.to_be_bytes()), + V::F(v) => c[o..o + 4].copy_from_slice(&v.to_be_bytes()), + V::D(v) => c[o..o + 8].copy_from_slice(&v.to_be_bytes()), + V::Inline(n, b) => { + c[o..o + 4].copy_from_slice(&n.to_be_bytes()); + c[o + 4..o + 12].copy_from_slice(&(at as u64).to_be_bytes()); + c[at..at + b.len()].copy_from_slice(b); + at += (b.len() + 3) & !3; + } + V::ByRef(n, addr) => { + c[o..o + 4].copy_from_slice(&(n | 0x8000_0000).to_be_bytes()); + c[o + 4..o + 12].copy_from_slice(&addr.to_be_bytes()); + } + V::A(addr) => { + c[o..o + 8].copy_from_slice(&addr.to_be_bytes()); + } + } + } + self.buf.extend_from_slice(&c); + self + } + + pub(crate) fn take(&mut self) -> Vec { + std::mem::take(&mut self.buf) + } +} + +/// A process's memory: pages absent or copy-on-write until the program +/// touches them, and nothing remembered between calls. +pub(crate) struct Proc { + base: u64, + bytes: Vec, + absent: HashSet, + cow: HashSet, + pub(crate) next: u64, +} + +impl Proc { + fn new(pages: usize) -> Proc { + Proc::at(0x1000_0000, pages) + } + + /// Memory at `base`: a 64-bit program's stack and mappings sit above + /// 4 GB (IRIX puts the stack just under 0x10_0000_0000). + fn at(base: u64, pages: usize) -> Proc { + Proc { base, bytes: vec![0; pages * PAGE as usize], absent: HashSet::new(), cow: HashSet::new(), next: base } + } + + /// `len` bytes of fresh memory, 8-byte aligned, starting `skew` bytes + /// into a new page (so it straddles page boundaries where that matters). + pub(crate) fn alloc(&mut self, len: usize, skew: u64) -> u64 { + let at = ((self.next + PAGE - 1) & !(PAGE - 1)) + skew; + self.next = (at + len as u64 + 7) & !7; + assert!(self.next <= self.base + self.bytes.len() as u64, "test process out of memory"); + at + } + + pub(crate) fn put(&mut self, addr: u64, data: &[u8]) { + let o = (addr - self.base) as usize; + self.bytes[o..o + data.len()].copy_from_slice(data); + } + + pub(crate) fn get(&self, addr: u64, len: usize) -> &[u8] { + let o = (addr - self.base) as usize; + &self.bytes[o..o + len] + } + + /// Every page of [addr, addr+len) not yet paged in. + fn page_out(&mut self, addr: u64, len: usize) { + let mut p = addr & !(PAGE - 1); + while p < addr + len as u64 { + self.absent.insert(p); + p += PAGE; + } + } + + /// Every page of [addr, addr+len) shared copy-on-write. + fn share(&mut self, addr: u64, len: usize) { + let mut p = addr & !(PAGE - 1); + while p < addr + len as u64 { + self.cow.insert(p); + p += PAGE; + } + } + + /// What the library does with a need-page answer. + fn touch(&mut self, f: Fault) { + assert_eq!(f.page & (PAGE - 1), 0); + assert!(f.page >= self.base && f.page < self.base + self.bytes.len() as u64, "need-page outside the process: {f:?}"); + self.absent.remove(&f.page); + if f.write { + self.cow.remove(&f.page); + } + } + + fn check(&self, addr: u64, len: usize, write: bool) -> Result<(), Fault> { + let end = addr.checked_add(len as u64).ok_or(Fault { page: 0, write })?; + let mut p = addr & !(PAGE - 1); + while p < end { + if p < self.base || p >= self.base + self.bytes.len() as u64 || self.absent.contains(&p) || (write && self.cow.contains(&p)) { + return Err(Fault { page: p, write }); + } + p += PAGE; + } + Ok(()) + } +} + +impl GuestMemory for Proc { + fn read(&mut self, addr: u64, buf: &mut [u8]) -> Result<(), Fault> { + self.check(addr, buf.len(), false)?; + buf.copy_from_slice(self.get(addr, buf.len())); + Ok(()) + } + + fn write(&mut self, addr: u64, data: &[u8]) -> Result<(), Fault> { + self.check(addr, data.len(), true)?; + self.put(addr, data); + Ok(()) + } +} + +/// The guest library's side of the protocol, over a [`Proc`], calling a +/// service directly. +pub(crate) struct Guest { + svc: Rc>, + pub(crate) mem: Proc, + client: u64, + serial: u64, + slots: u64, + retries: usize, +} + +impl Guest { + pub(crate) fn new(pages: usize) -> Guest { + Guest::on(Rc::new(RefCell::new(GlService::new(Box::new(Cgl::new())))), pages) + } + + /// Another process of the same service. + fn on(svc: Rc>, pages: usize) -> Guest { + let mut mem = Proc::new(pages); + let slots = mem.alloc(64, 0); + let mut g = Guest { svc, mem, client: 0, serial: 0, slots, retries: 0 }; + let hello = g.svc.borrow_mut().call(&mut g.mem, &[OP_HELLO, PROTOCOL, 0, 0, 0, 0, 0, 0]); + match hello { + Reply::Ok(id, PROTOCOL) if id != 0 => g.client = id, + r => panic!("hello: {r:?}"), + } + g + } + + /// One call with its slots, need-page retries done the library's way. + pub(crate) fn call(&mut self, op: u64, slots: &[u64]) -> Reply { + let mut s = Vec::new(); + for v in slots { + s.extend_from_slice(&v.to_be_bytes()); + } + self.mem.put(self.slots, &s); + self.serial += 1; + let args = [op, self.slots, self.client, self.serial, 0, 0, 0, 0]; + for _ in 0..1_000_000 { + let r = self.svc.borrow_mut().call(&mut self.mem, &args); + match r { + Reply::NeedPage(f) => { + self.mem.touch(f); + self.retries += 1; + } + r => return r, + } + } + panic!("no progress"); + } + + /// A context current on a window of `w` x `h`. + pub(crate) fn context(&mut self, window: u64, w: u64, h: u64) -> u64 { + let Reply::Ok(ctx, _) = self.call(OP_CREATE, &[0]) else { panic!("create") }; + assert_ne!(ctx, 0, "no CGL context"); + assert_eq!(self.call(OP_MAKECURRENT, &[ctx, window, window, w, h]), Reply::Ok(0, 0)); + ctx + } + + /// Put a command buffer in guest memory at a fresh address and run it. + pub(crate) fn batch(&mut self, cmds: &[u8]) -> Reply { + let at = self.mem.alloc(cmds.len(), 0); + self.mem.put(at, cmds); + self.call(OP_BATCH, &[at, cmds.len() as u64]) + } +} + +pub(crate) fn ortho(e: &mut Enc, w: i32, h: i32) { + e.cmd("glViewport", &[V::I(0), V::I(0), V::I(w), V::I(h)]) + .cmd("glMatrixMode", &[V::I(GL_PROJECTION)]) + .cmd("glLoadIdentity", &[]) + .cmd("glOrtho", &[V::D(0.0), V::D(w as f64), V::D(0.0), V::D(h as f64), V::D(-1.0), V::D(1.0)]) + .cmd("glMatrixMode", &[V::I(GL_MODELVIEW)]) + .cmd("glLoadIdentity", &[]); +} + +pub(crate) fn pixel(buf: &[u8], w: usize, x: usize, y: usize) -> [u8; 4] { + let o = (y * w + x) * 4; + buf[o..o + 4].try_into().unwrap() +} + +/// The canonical first check: a cleared colour and a filled triangle come +/// back from glReadPixels, into memory that needs every page faulted in. +#[test] +fn clear_and_triangle_read_back() { + let mut g = Guest::new(256); + g.context(0x0040_0001, 64, 64); + let px = g.mem.alloc(64 * 64 * 4, 0x123); + g.mem.page_out(px, 64 * 64 * 4); + let mut e = Enc::default(); + ortho(&mut e, 64, 64); + e.cmd("glClearColor", &[V::F(0.2), V::F(0.4), V::F(0.6), V::F(1.0)]) + .cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]) + .cmd("glShadeModel", &[V::I(GL_FLAT)]) + .cmd("glBegin", &[V::I(GL_TRIANGLES)]) + .cmd("glColor3ub", &[V::I(0), V::I(0), V::I(255)]) + .cmd("glVertex2f", &[V::F(16.0), V::F(16.0)]) + .cmd("glVertex2f", &[V::F(48.0), V::F(16.0)]) + .cmd("glVertex2f", &[V::F(32.0), V::F(48.0)]) + .cmd("glEnd", &[]) + .cmd("glReadPixels", &[V::I(0), V::I(0), V::I(64), V::I(64), V::I(GL_RGBA), V::I(GL_UNSIGNED_BYTE), V::A(px as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let out = g.mem.get(px, 64 * 64 * 4).to_vec(); + assert_eq!(pixel(&out, 64, 1, 1), [51, 102, 153, 255], "clear colour"); + assert_eq!(pixel(&out, 64, 62, 62), [51, 102, 153, 255], "clear colour, top right"); + assert_eq!(pixel(&out, 64, 32, 28), [0, 0, 255, 255], "inside the triangle"); + assert!(g.retries >= 5, "the readback needed its five pages faulted in ({} retries)", g.retries); + assert_eq!(g.svc.borrow().pending(), 0, "nothing left part-way"); + // glGetError after all that: nothing went wrong on the host. + let mut e = Enc::default(); + e.cmd("glGetError", &[]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); +} + +/// Commands that ran before a read fault must not run again when the call is +/// retried: an additive draw done twice would read back twice as bright. +#[test] +fn a_read_fault_mid_batch_resumes_without_rerunning() { + let mut g = Guest::new(256); + g.context(0x0040_0002, 32, 32); + // A client array whose pages are not there yet. + let verts: Vec = vec![0.0, 0.0, 32.0, 0.0, 32.0, 32.0, 0.0, 32.0]; + let va = g.mem.alloc(verts.len() * 4, PAGE - 6); + let vb: Vec = verts.iter().flat_map(|v| v.to_be_bytes()).collect(); + g.mem.put(va, &vb); + g.mem.page_out(va, vb.len()); + let px = g.mem.alloc(32 * 32 * 4, 0); + + // The clear goes in a batch of its own: run again, a batch that cleared + // first would hide a draw done twice. + let mut e = Enc::default(); + ortho(&mut e, 32, 32); + e.cmd("glClearColor", &[V::F(0.0), V::F(0.0), V::F(0.0), V::F(0.0)]).cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + e.cmd("glEnable", &[V::I(GL_BLEND)]) + .cmd("glBlendFunc", &[V::I(GL_ONE), V::I(GL_ONE)]) + .cmd("glColor4f", &[V::F(0.2), V::F(0.2), V::F(0.2), V::F(0.2)]) + // Drawn once from the buffer itself... + .cmd("glBegin", &[V::I(GL_QUADS)]) + .cmd("glVertex2f", &[V::F(0.0), V::F(0.0)]) + .cmd("glVertex2f", &[V::F(32.0), V::F(0.0)]) + .cmd("glVertex2f", &[V::F(32.0), V::F(32.0)]) + .cmd("glVertex2f", &[V::F(0.0), V::F(32.0)]) + .cmd("glEnd", &[]) + // ...and once from the client array, which faults. + .cmd("glEnableClientState", &[V::I(GL_VERTEX_ARRAY)]) + .cmd("glVertexPointer", &[V::I(2), V::I(GL_FLOAT), V::I(0), V::A(va as u64)]) + .cmd("glDrawArrays", &[V::I(GL_QUADS), V::I(0), V::I(4)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + assert!(g.retries >= 2, "the array's two pages each needed a retry ({})", g.retries); + + let mut e = Enc::default(); + e.cmd("glDisableClientState", &[V::I(GL_VERTEX_ARRAY)]) + .cmd("glDisable", &[V::I(GL_BLEND)]) + .cmd("glReadPixels", &[V::I(0), V::I(0), V::I(32), V::I(32), V::I(GL_RGBA), V::I(GL_UNSIGNED_BYTE), V::A(px as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + // Two draws of 0.2 each: 0.4 = 102. Three (the first draw run again) + // would be 153. + assert_eq!(pixel(g.mem.get(px, 32 * 32 * 4), 32, 16, 16), [102, 102, 102, 102]); + assert_eq!(g.svc.borrow().pending(), 0); +} + +/// A readback into copy-on-write pages faults on write after the GL work is +/// done: the retries only write, and the draw before it in the batch is not +/// repeated. +#[test] +fn a_write_fault_retries_only_the_writes() { + let mut g = Guest::new(512); + g.context(0x0040_0003, 128, 128); + let px = g.mem.alloc(128 * 128 * 4, 7); + g.mem.put(px, &vec![0xEE; 128 * 128 * 4]); + g.mem.share(px, 128 * 128 * 4); + let mut e = Enc::default(); + ortho(&mut e, 128, 128); + e.cmd("glClearColor", &[V::F(0.0), V::F(0.0), V::F(0.0), V::F(0.0)]).cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + e.cmd("glEnable", &[V::I(GL_BLEND)]) + .cmd("glBlendFunc", &[V::I(GL_ONE), V::I(GL_ONE)]) + .cmd("glColor4f", &[V::F(0.2), V::F(0.2), V::F(0.2), V::F(0.2)]) + .cmd("glBegin", &[V::I(GL_QUADS)]) + .cmd("glVertex2f", &[V::F(0.0), V::F(0.0)]) + .cmd("glVertex2f", &[V::F(128.0), V::F(0.0)]) + .cmd("glVertex2f", &[V::F(128.0), V::F(128.0)]) + .cmd("glVertex2f", &[V::F(0.0), V::F(128.0)]) + .cmd("glEnd", &[]) + .cmd("glDisable", &[V::I(GL_BLEND)]) + .cmd("glPixelStorei", &[V::I(GL_PACK_ALIGNMENT), V::I(1)]) + .cmd("glReadPixels", &[V::I(0), V::I(0), V::I(128), V::I(128), V::I(GL_RGBA), V::I(GL_UNSIGNED_BYTE), V::A(px as u64)]); + let cmds = e.take(); + let before = g.retries; + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let pages = (128 * 128 * 4 + 7 + PAGE as usize - 1) / PAGE as usize; + assert!(g.retries - before >= pages - 1, "every shared page needed a write retry ({} for {pages})", g.retries - before); + let out = g.mem.get(px, 128 * 128 * 4); + assert!(out.chunks_exact(4).all(|p| p == [51, 51, 51, 51]), "one draw of 0.2 everywhere, first pixel {:?}", &out[..4]); + assert_eq!(g.svc.borrow().pending(), 0); +} + +/// glDrawPixels of 16-bit components by reference across page boundaries: +/// the host must undo the guest's byte order, and every page must arrive. +#[test] +fn pixels_by_reference_across_pages_in_guest_byte_order() { + let mut g = Guest::new(256); + g.context(0x0040_0004, 64, 64); + let (w, h) = (40usize, 40usize); + let src = g.mem.alloc(w * h * 8, PAGE - 13); + // RGBA, 16 bits each, big-endian: red 0xFF00 (254 or 255, as the host + // rounds), green 0, blue 0xFFFF, alpha 0xFFFF. Read in the wrong order, + // red would be 0x00FF: 0 or 1. + let mut data = Vec::new(); + for _ in 0..w * h { + for v in [0xFF00u16, 0x0000, 0xFFFF, 0xFFFF] { + data.extend_from_slice(&v.to_be_bytes()); + } + } + g.mem.put(src, &data); + g.mem.page_out(src, data.len()); + let px = g.mem.alloc(64 * 64 * 4, 0); + let mut e = Enc::default(); + ortho(&mut e, 64, 64); + e.cmd("glClearColor", &[V::F(0.0), V::F(0.0), V::F(0.0), V::F(1.0)]) + .cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]) + .cmd("glPixelStorei", &[V::I(GL_UNPACK_ALIGNMENT), V::I(2)]) + .cmd("glRasterPos2i", &[V::I(4), V::I(8)]) + .cmd("glDrawPixels", &[V::I(w as i32), V::I(h as i32), V::I(GL_RGBA), V::I(GL_UNSIGNED_SHORT), V::A(src as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + assert!(g.retries >= 3); + let mut e = Enc::default(); + e.cmd("glReadPixels", &[V::I(0), V::I(0), V::I(64), V::I(64), V::I(GL_RGBA), V::I(GL_UNSIGNED_BYTE), V::A(px as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let out = g.mem.get(px, 64 * 64 * 4).to_vec(); + for (x, y, what) in [(4, 8, "first pixel drawn"), (43, 47, "last pixel drawn")] { + let p = pixel(&out, 64, x, y); + assert!(p[0] >= 254 && p[1..] == [0, 255, 255], "{what}: {p:?}"); + } + assert_eq!(pixel(&out, 64, 44, 8), [0, 0, 0, 255], "just outside"); + assert_eq!(pixel(&out, 64, 3, 8), [0, 0, 0, 255], "just outside"); +} + +/// IRIX numbers UNSIGNED_SHORT_5_6_5 0x8362 and UNSIGNED_BYTE_2_3_3_REV +/// 0x8363, the other way round from the standard. Each must be sized and +/// drawn as the guest meant it, and read back the same way. +#[test] +fn irix_packed_5_6_5_and_2_3_3_rev_keep_their_meaning() { + const IRIX_5_6_5: i32 = 0x8362; + const IRIX_2_3_3_REV: i32 = 0x8363; + const GL_RGB: i32 = 0x1907; + let mut g = Guest::new(64); + g.context(0x0040_0004, 32, 32); + // Red in 5_6_5 is the top five bits of a big-endian short; in 2_3_3_REV + // it is the low three bits of a byte. Read with the other type's meaning + // either would come out some other colour, or be sized wrong. + let red565 = g.mem.alloc(8 * 8 * 2, 0); + g.mem.put(red565, &0xF800u16.to_be_bytes().repeat(8 * 8)); + let green233 = g.mem.alloc(8 * 8, 0); + g.mem.put(green233, &[0x38u8; 8 * 8]); + let px = g.mem.alloc(32 * 32 * 4, 0); + let back = g.mem.alloc(8 * 8 * 2, 0); + let mut e = Enc::default(); + ortho(&mut e, 32, 32); + e.cmd("glClearColor", &[V::F(0.0), V::F(0.0), V::F(0.0), V::F(1.0)]) + .cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]) + .cmd("glPixelStorei", &[V::I(GL_UNPACK_ALIGNMENT), V::I(1)]) + .cmd("glPixelStorei", &[V::I(GL_PACK_ALIGNMENT), V::I(1)]) + .cmd("glRasterPos2i", &[V::I(2), V::I(2)]) + .cmd("glDrawPixels", &[V::I(8), V::I(8), V::I(GL_RGB), V::I(IRIX_5_6_5), V::A(red565 as u64)]) + .cmd("glRasterPos2i", &[V::I(16), V::I(16)]) + .cmd("glDrawPixels", &[V::I(8), V::I(8), V::I(GL_RGB), V::I(IRIX_2_3_3_REV), V::A(green233 as u64)]) + .cmd("glReadPixels", &[V::I(0), V::I(0), V::I(32), V::I(32), V::I(GL_RGBA), V::I(GL_UNSIGNED_BYTE), V::A(px as u64)]) + .cmd("glReadPixels", &[V::I(2), V::I(2), V::I(8), V::I(8), V::I(GL_RGB), V::I(IRIX_5_6_5), V::A(back as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let out = g.mem.get(px, 32 * 32 * 4).to_vec(); + assert_eq!(pixel(&out, 32, 2, 2), [255, 0, 0, 255], "5_6_5 red, first pixel"); + assert_eq!(pixel(&out, 32, 9, 9), [255, 0, 0, 255], "5_6_5 red, last pixel"); + assert_eq!(pixel(&out, 32, 10, 2), [0, 0, 0, 255], "just past the 5_6_5 image"); + assert_eq!(pixel(&out, 32, 16, 16), [0, 255, 0, 255], "2_3_3_REV green"); + assert_eq!(pixel(&out, 32, 23, 23), [0, 255, 0, 255], "2_3_3_REV green, last pixel"); + let shorts = g.mem.get(back, 8 * 8 * 2).to_vec(); + assert!(shorts.chunks_exact(2).all(|b| b == [0xF8, 0x00]), "read back as big-endian 5_6_5: {:?}", &shorts[..4]); +} + +/// Decoding a by-reference array whose elements straddle a page boundary, +/// with the second page absent: the first attempt faults having changed +/// nothing, the second decodes every element in host order. +#[test] +fn addresses_above_4gb_arrive_whole() { + let mut mem = Proc::at(0xff_ffff_0000, 4); + let n = 4usize; + let at = mem.alloc(n * 4, 0); + mem.put(at, &[1.5f32, -2.0, 3.25, 8.0].iter().flat_map(|f| f.to_be_bytes()).collect::>()); + let mut cmd = vec![0u8; 24]; + cmd[4..8].copy_from_slice(&(n as u32 | 0x8000_0000).to_be_bytes()); + cmd[8..16].copy_from_slice(&at.to_be_bytes()); + let out = mem.alloc(8, 0); + cmd[16..24].copy_from_slice(&out.to_be_bytes()); + + let backend = Cgl::new(); + let (mut writes, mut funcs, mut reported) = (Vec::new(), Vec::new(), HashSet::new()); + let mut client = crate::exec::ClientSide::default(); + let draws = std::collections::HashMap::new(); + let mut x = crate::exec::Exec::new(&mut mem, &mut writes, &mut funcs, &mut reported, &backend, &mut client, &draws, 0); + assert_eq!(x.addr(&cmd, 16), out); + assert_eq!(x.arr::(&cmd, 4).expect("decoded"), vec![1.5, -2.0, 3.25, 8.0]); + x.put::(x.addr(&cmd, 16), &[0xdead_beef, 7]).expect("queued"); + drop(x); + assert_eq!(writes.len(), 1); + assert_eq!(writes[0].0, out); + assert!(out > u32::MAX as u64); +} + +#[test] +fn by_reference_array_decodes_across_a_page_boundary() { + let mut mem = Proc::new(16); + let n = 1500usize; // doubles: 12 KB, over three pages + let at = mem.alloc(n * 8, PAGE - 3); + let data: Vec = (0..n).flat_map(|i| (i as f64 * 1.25 - 7.0).to_be_bytes()).collect(); + mem.put(at, &data); + mem.page_out(at + PAGE, 1); + let mut cmd = vec![0u8; 16]; + cmd[4..8].copy_from_slice(&(n as u32 | 0x8000_0000).to_be_bytes()); + cmd[8..16].copy_from_slice(&at.to_be_bytes()); + + let backend = Cgl::new(); + let (mut writes, mut funcs, mut reported) = (Vec::new(), Vec::new(), HashSet::new()); + let mut client = crate::exec::ClientSide::default(); + let draws = std::collections::HashMap::new(); + { + let mut x = crate::exec::Exec::new(&mut mem, &mut writes, &mut funcs, &mut reported, &backend, &mut client, &draws, 0); + assert!(x.arr::(&cmd, 4).is_none()); + assert_eq!(x.fault, Some(Fault { page: (at & !(PAGE - 1)) + PAGE, write: false })); + } + mem.touch(Fault { page: (at & !(PAGE - 1)) + PAGE, write: false }); + let mut x = crate::exec::Exec::new(&mut mem, &mut writes, &mut funcs, &mut reported, &backend, &mut client, &draws, 0); + let v = x.arr::(&cmd, 4).expect("decoded"); + assert_eq!(x.fault, None); + assert_eq!(v.len(), n); + assert!(v.iter().enumerate().all(|(i, &d)| d == i as f64 * 1.25 - 7.0)); + + // Inline: the same count without BYREF names an offset in the command. + let mut inline = vec![0u8; 16 + 8 * 3]; + inline[4..8].copy_from_slice(&3u32.to_be_bytes()); + inline[8..16].copy_from_slice(&16u64.to_be_bytes()); + for (i, d) in [1.5f64, -2.0, 1e10].iter().enumerate() { + inline[16 + i * 8..24 + i * 8].copy_from_slice(&d.to_be_bytes()); + } + assert_eq!(x.arr::(&inline, 4), Some(vec![1.5, -2.0, 1e10])); + // A count that runs off the end of the command is refused, not read. + inline[4..8].copy_from_slice(&4u32.to_be_bytes()); + assert_eq!(x.arr::(&inline, 4), None); + assert_eq!(x.fault, None); +} + +/// An array shorter than its call reads -- glLoadMatrixf sent with one float +/// -- is zero-filled to what the host reads, and one longer is cut to it: +/// the host is never handed a pointer to less than it will read. +#[test] +fn array_arguments_hold_what_the_call_reads() { + let mut mem = Proc::new(4); + let mut cmd = vec![0u8; 20]; + cmd[4..8].copy_from_slice(&1u32.to_be_bytes()); + cmd[8..16].copy_from_slice(&16u64.to_be_bytes()); + cmd[16..20].copy_from_slice(&2.5f32.to_be_bytes()); + + let backend = Cgl::new(); + let (mut writes, mut funcs, mut reported) = (Vec::new(), Vec::new(), HashSet::new()); + let mut client = crate::exec::ClientSide::default(); + let draws = std::collections::HashMap::new(); + let mut x = crate::exec::Exec::new(&mut mem, &mut writes, &mut funcs, &mut reported, &backend, &mut client, &draws, 0); + let slack = crate::exec::ARRAY_SLACK; + let short = x.arr_padded::(&cmd, 4, 16).expect("decoded"); + assert_eq!(short.len(), 16 + slack); + assert_eq!(short[0], 2.5); + assert!(short[1..].iter().all(|&f| f == 0.0)); + let cut = x.arr_padded::(&cmd, 4, 0).expect("decoded"); + assert_eq!(cut, vec![0.0; slack]); + // glCallLists: n names of up to 4 bytes each, whatever the type. + let names = x.arr_typed_padded(&cmd, 4, 0x1401, 3).expect("decoded"); // GL_UNSIGNED_BYTE + assert_eq!(names.len(), 3 * 4 + slack); +} + +/// Every generated decoder sizes its arrays from the call's own arguments; +/// one that took the command's count would put the host back at the mercy of +/// the guest. +#[test] +fn generated_decoders_never_trust_an_array_count() { + let calls = include_str!("calls.rs"); + assert!(!calls.contains("x.arr::<"), "a decoder reads an array by the command's count"); + assert!(!calls.contains("x.arr_typed("), "a decoder reads glCallLists names by the command's count"); + assert!(calls.contains("x.arr_padded::<")); +} + +/// SWAP into a buffer of copy-on-write pages: the frame comes back as X's +/// big-endian 0x00RRGGBB, and the retries only write. +#[test] +fn swap_hands_the_frame_back() { + let mut g = Guest::new(512); + let window = 0x0040_0005; + g.context(window, 100, 50); + let mut e = Enc::default(); + ortho(&mut e, 100, 50); + e.cmd("glClearColor", &[V::F(0.2), V::F(0.4), V::F(0.6), V::F(1.0)]) + .cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]) + .cmd("glBegin", &[V::I(GL_QUADS)]) + .cmd("glColor3ub", &[V::I(255), V::I(0), V::I(0)]) + .cmd("glVertex2f", &[V::F(0.0), V::F(40.0)]) + .cmd("glVertex2f", &[V::F(10.0), V::F(40.0)]) + .cmd("glVertex2f", &[V::F(10.0), V::F(50.0)]) + .cmd("glVertex2f", &[V::F(0.0), V::F(50.0)]) + .cmd("glEnd", &[]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let buf = g.mem.alloc(100 * 50 * 4, 0); + g.mem.share(buf, 100 * 50 * 4); + let before = g.retries; + assert!(matches!(g.call(OP_SWAP, &[buf, 100, 50, 0, 0, 0, 0]), Reply::Ok(0, _))); + assert!(g.retries - before >= 4); + let f = g.mem.get(buf, 100 * 50 * 4).to_vec(); + // Top row first: the red square is in the top left corner. + assert_eq!(pixel(&f, 100, 5, 5)[1..], [255, 0, 0], "top left is red"); + assert_eq!(pixel(&f, 100, 50, 25)[1..], [51, 102, 153], "the rest is the clear colour"); + assert_eq!(pixel(&f, 100, 5, 45)[1..], [51, 102, 153], "bottom left is not red"); + assert_eq!(g.svc.borrow().pending(), 0); + + // For a visual with red in the low byte (IMPACT's), the same frame + // comes back as 0x00BBGGRR. + let low = g.mem.alloc(100 * 50 * 4, 0); + assert!(matches!(g.call(OP_SWAP, &[low, 100, 50, 1, 0, 0, 0]), Reply::Ok(0, _))); + let f = g.mem.get(low, 100 * 50 * 4).to_vec(); + assert_eq!(pixel(&f, 100, 5, 5)[1..], [0, 0, 255], "red, in the low byte"); + assert_eq!(pixel(&f, 100, 50, 25)[1..], [153, 102, 51], "the clear colour, turned round"); + + // A window grown since: the rows are the new width, the part the + // drawable had is there, and the next frame is drawn at the new size. + let big = g.mem.alloc(120 * 60 * 4, 0); + assert!(matches!(g.call(OP_SWAP, &[big, 120, 60, 0, 0, 0, 0]), Reply::Ok(0, _))); + let f = g.mem.get(big, 120 * 60 * 4).to_vec(); + assert_eq!(pixel(&f, 120, 5, 5)[1..], [255, 0, 0]); + assert_eq!(pixel(&f, 120, 99, 49)[1..], [51, 102, 153]); + assert_eq!(pixel(&f, 120, 110, 55)[1..], [0, 0, 0], "outside the old drawable nothing is read"); +} + +/// What a program reads from glGetString is IRIS's answer, not the Mac's: a +/// guest that switched on the renderer string would otherwise be deciding what +/// to do from the wrong machine, and anything logging them would record a +/// machine nobody is using. And an extension is only named once its entry +/// points are there to call. +#[test] +fn the_strings_a_program_reads_are_ours_not_the_hosts() { + let mut g = Guest::new(256); + g.context(0x0077_0010, 32, 32); + let buf = g.mem.alloc(4096, 0); + let get = |g: &mut Guest, name: u64| { + assert!(matches!(g.call(OP_GETSTRING, &[name, buf, 4096]), Reply::Ok(0, _)), "glGetString({name:#x})"); + let b = g.mem.get(buf, 4096); + String::from_utf8_lossy(&b[..b.iter().position(|&c| c == 0).unwrap_or(0)]).into_owned() + }; + + let vendor = get(&mut g, crate::gl::GL_VENDOR as u64); + let renderer = get(&mut g, crate::gl::GL_RENDERER as u64); + let version = get(&mut g, crate::gl::GL_VERSION as u64); + let extensions = get(&mut g, crate::gl::GL_EXTENSIONS as u64); + + assert_eq!(vendor, crate::ext::VENDOR); + assert_eq!(renderer, crate::ext::RENDERER); + assert_eq!(version, crate::ext::VERSION); + for (what, s) in [("vendor", &vendor), ("renderer", &renderer), ("version", &version)] { + // Whatever the machine underneath is, the guest is not told about it. + for leak in ["Apple", "Metal", "Intel", "NVIDIA", "AMD", "Radeon", "Mesa"] { + assert!(!s.contains(leak), "the {what} string leaks the host: {s:?}"); + } + } + // A GL version a program can parse: "." first, as the spec + // requires, or every version check in every program goes wrong. + let (major, rest) = version.split_once('.').expect("version starts major.minor"); + assert!(major.parse::().is_ok(), "version {version:?}"); + assert!(rest.chars().next().is_some_and(|c| c.is_ascii_digit()), "version {version:?}"); + + // Multitexture: named only because the entry points now exist. The two + // names are the same extension, and a program may probe for either. + assert!(extensions.contains("GL_ARB_multitexture"), "{extensions}"); + assert!(extensions.contains("GL_SGIS_multitexture"), "{extensions}"); + for name in [ + "glActiveTextureARB", + "glClientActiveTextureARB", + "glMultiTexCoord2fARB", + "glMultiTexCoord4svARB", + "glSelectTextureSGIS", + "glMTexCoord2fSGIS", + ] { + assert!(crate::calls::NAMES.contains(&name), "{name} is advertised but has no entry point"); + } +} + +/// The texture unit count a program reads, which decides whether multitexture +/// is used at all. +/// +/// Quake III resolves glActiveTextureARB and friends, then asks for 0x84E2, +/// and throws all three pointers away if the answer is below 2 -- "not using +/// GL_ARB_multitexture, < 2 texture units". Nothing else fails: the extension +/// stays advertised, the entry points stay resolvable, and the feature just +/// quietly does not happen. That is why this is a test and not a comment. +#[test] +fn a_program_asking_how_many_texture_units_gets_at_least_two() { + let mut g = Guest::new(256); + g.context(0x0077_0011, 32, 32); + let out = g.mem.alloc(64, 0); + + let mut e = Enc::default(); + e.cmd("glGetIntegerv", &[V::I(crate::gl::GL_MAX_TEXTURE_UNITS_ARB as i32), V::A(out as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let units = i32::from_be_bytes(g.mem.get(out, 4).try_into().unwrap()); + assert!(units >= 2, "0x84E2 answered {units}: multitexture would silently not be used"); + assert!( + units <= crate::exec::MAX_TEXTURE_UNITS as i32, + "0x84E2 answered {units}, above the {} this library stands behind", + crate::exec::MAX_TEXTURE_UNITS + ); + + // Floats and booleans come back through the same clamp, since a program + // may ask either way. + let mut e = Enc::default(); + e.cmd("glGetFloatv", &[V::I(crate::gl::GL_MAX_TEXTURE_UNITS_ARB as i32), V::A(out as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let f = f32::from_be_bytes(g.mem.get(out, 4).try_into().unwrap()); + assert_eq!(f, units as f32, "the same answer whichever way it is asked"); + + // A limit we do not speak for is the host's own answer, untouched. + let mut e = Enc::default(); + e.cmd("glGetIntegerv", &[V::I(0x0D33), V::A(out as u64)]); // GL_MAX_TEXTURE_SIZE + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let max_tex = i32::from_be_bytes(g.mem.get(out, 4).try_into().unwrap()); + assert!(max_tex >= 64, "GL_MAX_TEXTURE_SIZE {max_tex}"); +} + +/// The registered display is one per process, so the tests that install one +/// take turns. (Tests that do not install one are unaffected: every test +/// display answers false for a window that is not its own, which is the +/// hand-the-frame-back path they expect.) +fn display_turn() -> std::sync::MutexGuard<'static, ()> { + static TURN: Mutex<()> = Mutex::new(()); + TURN.lock().unwrap_or_else(|e| e.into_inner()) +} + +/// A registered display that knows the window gets the frame, BGRA top row +/// first, and the program's buffer is left alone. +#[test] +fn swap_presents_into_a_display_that_knows_the_window() { + let _turn = display_turn(); + struct Screen(Mutex>); + impl iris_hostcall::Display for Screen { + fn present(&self, window: u32, bgra: &[u8], stride: usize, width: usize, height: usize) -> bool { + if window != 0x0077_0001 { + return false; + } + let top_left: [u8; 4] = bgra[stride..stride + 4].try_into().unwrap(); + self.0.lock().unwrap().push((window, stride, width, height, top_left)); + true + } + } + let screen = std::sync::Arc::new(Screen(Mutex::new(Vec::new()))); + iris_hostcall::set_display(screen.clone()); + + let mut g = Guest::new(256); + g.context(0x0077_0001, 40, 30); + let mut e = Enc::default(); + ortho(&mut e, 40, 30); + e.cmd("glClearColor", &[V::F(0.2), V::F(0.4), V::F(0.6), V::F(1.0)]) + .cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]) + .cmd("glBegin", &[V::I(GL_QUADS)]) + .cmd("glColor3ub", &[V::I(0), V::I(255), V::I(0)]) + .cmd("glVertex2f", &[V::F(0.0), V::F(25.0)]) + .cmd("glVertex2f", &[V::F(5.0), V::F(25.0)]) + .cmd("glVertex2f", &[V::F(5.0), V::F(30.0)]) + .cmd("glVertex2f", &[V::F(0.0), V::F(30.0)]) + .cmd("glEnd", &[]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let buf = g.mem.alloc(40 * 30 * 4, 0); + g.mem.put(buf, &vec![0xAB; 40 * 30 * 4]); + assert!(matches!(g.call(OP_SWAP, &[buf, 40, 30, 0, 0, 0, 0]), Reply::Ok(1, _))); + assert!(g.mem.get(buf, 40 * 30 * 4).iter().all(|&b| b == 0xAB), "presented frames are not handed back"); + let seen = screen.0.lock().unwrap().clone(); + assert_eq!(seen.len(), 1); + let (window, stride, w, h, px) = seen[0]; + assert_eq!((window, w, h), (0x0077_0001, 40, 30)); + assert!(stride >= 40 * 4); + assert_eq!(px, [0, 255, 0, 255], "row 1, pixel 0 is green BGRA: the top row comes first"); +} + +/// A swap that says where its window is goes to the display's `present_at` +/// with that position (a compositing display cannot know X window ids); one +/// that does not goes to `present` as before. +#[test] +fn swap_with_a_position_presents_at_it() { + let _turn = display_turn(); + struct Screen(Mutex>>); + impl iris_hostcall::Display for Screen { + // Only its own window, so the other tests' frames still come back. + fn present(&self, window: u32, _bgra: &[u8], _stride: usize, _width: usize, _height: usize) -> bool { + if window != 0x0077_0002 { + return false; + } + self.0.lock().unwrap().push(None); + true + } + fn present_at(&self, window: u32, x: i32, y: i32, _bgra: &[u8], _stride: usize, _width: usize, _height: usize) -> bool { + if window != 0x0077_0002 { + return false; + } + self.0.lock().unwrap().push(Some((x, y))); + true + } + } + let screen = std::sync::Arc::new(Screen(Mutex::new(Vec::new()))); + iris_hostcall::set_display(screen.clone()); + + let mut g = Guest::new(256); + g.context(0x0077_0002, 32, 16); + let buf = g.mem.alloc(32 * 16 * 4, 0); + assert!(matches!(g.call(OP_SWAP, &[buf, 32, 16, 0, 300, 200, 1]), Reply::Ok(1, _))); + assert!(matches!(g.call(OP_SWAP, &[buf, 32, 16, 0, 300, 200, 0]), Reply::Ok(1, _))); + assert_eq!(*screen.0.lock().unwrap(), vec![Some((300, 200)), None]); +} + +/// glXSwapIntervalSGI(0): the first swap of a drawable still presents inline +/// (that is how the host learns the window can be presented into at all), and +/// later ones hand the frame to the presenting thread and return without +/// waiting. glFinish drains, so by then every frame really has been presented, +/// and no frame is ever handed back to the program. +#[test] +fn swap_interval_zero_presents_without_the_program_waiting() { + let _turn = display_turn(); + struct Screen(Mutex>); + impl iris_hostcall::Display for Screen { + fn present(&self, window: u32, bgra: &[u8], stride: usize, _w: usize, h: usize) -> bool { + if window != 0x0077_0002 { + return false; + } + // Touch the pixels: a queued frame must own its bytes, not borrow + // the GL's, so this must be safe long after the swap returned. + assert!(bgra.len() >= stride * h); + self.0.lock().unwrap().push(window); + true + } + } + let screen = std::sync::Arc::new(Screen(Mutex::new(Vec::new()))); + iris_hostcall::set_display(screen.clone()); + + let mut g = Guest::new(256); + g.context(0x0077_0002, 40, 30); + let buf = g.mem.alloc(40 * 30 * 4, 0); + g.mem.put(buf, &vec![0xAB; 40 * 30 * 4]); + + // Synchronous to begin with, whatever the interval: the drawable is not + // yet known to present. + assert!(matches!(g.call(OP_SWAP_INTERVAL, &[0]), Reply::Ok(0, 0))); + assert!(matches!(g.call(OP_SWAP, &[buf, 40, 30, 0, 0, 0, 0]), Reply::Ok(1, _))); + assert_eq!(screen.0.lock().unwrap().len(), 1, "the first swap presents before it returns"); + + // Now asynchronous. More swaps than can be in flight at once, so the + // throttle and the replacement rule both run. + for i in 0..8 { + let r = g.call(OP_SWAP, &[buf, 40, 30, 0, 0, 0, 0]); + assert!(matches!(r, Reply::Ok(1, _)), "swap {i}: {r:?}, presented={}", crate::present::presents(0x0077_0002)); + } + assert!(g.mem.get(buf, 40 * 30 * 4).iter().all(|&b| b == 0xAB), "a presented frame is never handed back"); + + // glFinish means what it says: nothing is still waiting to be presented. + assert!(matches!(g.call(OP_FINISH, &[]), Reply::Ok(0, 0))); + let seen = screen.0.lock().unwrap().len(); + assert!(seen > 1, "asynchronous swaps reach the display: {seen}"); + assert!(seen <= 9, "no frame is presented more than once: {seen}"); + crate::present::drain(); + assert_eq!(screen.0.lock().unwrap().len(), seen, "nothing was left queued after glFinish"); +} + +/// Two processes, each with its own context current: their calls interleave +/// and each draws into its own. +#[test] +fn clients_keep_their_own_current_context() { + let mut a = Guest::new(128); + let mut b = Guest::on(a.svc.clone(), 128); + assert_ne!(a.client, b.client); + a.context(0x0040_0101, 16, 16); + b.context(0x0040_0101, 16, 16); // the same X id, a different client's + let clear = |r: f32, g: f32, b: f32| { + let mut e = Enc::default(); + e.cmd("glClearColor", &[V::F(r), V::F(g), V::F(b), V::F(1.0)]).cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]); + e.take() + }; + assert_eq!(a.batch(&clear(1.0, 0.0, 0.0)), Reply::Ok(0, 0)); + assert_eq!(b.batch(&clear(0.0, 0.0, 1.0)), Reply::Ok(0, 0)); + let read = |g: &mut Guest| { + let px = g.mem.alloc(16 * 16 * 4, 0); + let mut e = Enc::default(); + e.cmd("glReadPixels", &[V::I(0), V::I(0), V::I(16), V::I(16), V::I(GL_RGBA), V::I(GL_UNSIGNED_BYTE), V::A(px as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + pixel(g.mem.get(px, 16 * 16 * 4), 16, 8, 8) + }; + assert_eq!(read(&mut a), [255, 0, 0, 255]); + assert_eq!(read(&mut b), [0, 0, 255, 255]); + assert_eq!(read(&mut a), [255, 0, 0, 255]); + // b's goodbye leaves a's context alone, and b is a stranger after it. + assert_eq!(b.call(OP_GOODBYE, &[]), Reply::Ok(0, 0)); + assert_eq!(read(&mut a), [255, 0, 0, 255]); + assert_eq!(b.call(OP_FINISH, &[]), Reply::Err(22)); + // A client may not use another's context. + let mut c = Guest::on(a.svc.clone(), 16); + let Reply::Ok(ctx_c, _) = c.call(OP_CREATE, &[0]) else { panic!() }; + assert_ne!(ctx_c, 0); + assert_eq!(a.call(OP_MAKECURRENT, &[ctx_c, 1, 1, 8, 8]), Reply::Err(22)); +} + +/// Array arguments both ways -- copied into the command, and by reference +/// straddling pages -- and a result written through a pointer (glGetFloatv's +/// sixteen values); a count no real call has is refused without allocating. +#[test] +fn inline_and_by_reference_arrays_and_results() { + let mut g = Guest::new(64); + g.context(0x0040_0600, 8, 8); + let m1: Vec = (0..16).map(|i| i as f32 * 0.5 + 1.0).collect(); + let m2: Vec = (0..16).map(|i| 100.0 - i as f32).collect(); + let be = |m: &[f32]| m.iter().flat_map(|v| v.to_be_bytes()).collect::>(); + let byref = g.mem.alloc(64, PAGE - 20); + g.mem.put(byref, &be(&m2)); + g.mem.page_out(byref, 64); + let out = g.mem.alloc(64, PAGE - 8); + g.mem.page_out(out, 64); + const GL_MODELVIEW_MATRIX: i32 = 0x0BA6; + + let mut e = Enc::default(); + e.cmd("glMatrixMode", &[V::I(GL_MODELVIEW)]) + .cmd("glLoadMatrixf", &[V::Inline(16, be(&m1))]) + .cmd("glGetFloatv", &[V::I(GL_MODELVIEW_MATRIX), V::A(out as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let got: Vec = g.mem.get(out, 64).chunks_exact(4).map(|c| f32::from_be_bytes(c.try_into().unwrap())).collect(); + assert_eq!(got, m1, "inline matrix in, sixteen floats out in guest order"); + + e.cmd("glLoadMatrixf", &[V::ByRef(16, byref as u64)]).cmd("glGetFloatv", &[V::I(GL_MODELVIEW_MATRIX), V::A(out as u64)]); + let cmds = e.take(); + let before = g.retries; + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + assert!(g.retries - before >= 2, "the by-reference matrix's two pages"); + let got: Vec = g.mem.get(out, 64).chunks_exact(4).map(|c| f32::from_be_bytes(c.try_into().unwrap())).collect(); + assert_eq!(got, m2); + + // glGenTextures of a billion names: refused as bad data, nothing + // allocated, nothing written; the call after it still runs. + let names = g.mem.alloc(16, 0); + g.mem.put(names, &[0x5A; 16]); + e.cmd("glGenTextures", &[V::I(1 << 30), V::A(names as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + assert_eq!(g.mem.get(names, 16), &[0x5A; 16]); + e.cmd("glGenTextures", &[V::I(2), V::A(names as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let a = u32::from_be_bytes(g.mem.get(names, 4).try_into().unwrap()); + let b = u32::from_be_bytes(g.mem.get(names + 4, 4).try_into().unwrap()); + assert!(a != 0 && b != 0 && a != b, "two names generated: {a} {b}"); + assert_eq!(g.mem.get(names + 8, 8), &[0x5A; 8], "and nothing written past them"); +} + +#[test] +fn hello_and_unknown_clients() { + let mut svc = GlService::new(Box::new(Cgl::new())); + let mut mem = Proc::new(4); + assert_eq!(svc.call(&mut mem, &[OP_HELLO, PROTOCOL + 1, 0, 0, 0, 0, 0, 0]), Reply::Ok(0, PROTOCOL), "a mismatch gets no client"); + assert_eq!(svc.call(&mut mem, &[OP_FINISH, 0, 99, 1, 0, 0, 0, 0]), Reply::Err(22)); + let Reply::Ok(a, PROTOCOL) = svc.call(&mut mem, &[OP_HELLO, PROTOCOL, 0, 0, 0, 0, 0, 0]) else { panic!() }; + let Reply::Ok(b, PROTOCOL) = svc.call(&mut mem, &[OP_HELLO, PROTOCOL, 0, 0, 0, 0, 0, 0]) else { panic!() }; + assert!(a != 0 && b != 0 && a != b); + // Operations that need a context without one. + let slots = mem.alloc(24, 0); + assert_eq!(svc.call(&mut mem, &[OP_SWAP, slots, a, 1, 0, 0, 0, 0]), Reply::Err(22)); + assert_eq!(svc.call(&mut mem, &[OP_BATCH, slots, a, 2, 0, 0, 0, 0]), Reply::Ok(0, 0), "a zero-length batch"); + assert_eq!(svc.call(&mut mem, &[0x7777, slots, a, 3, 0, 0, 0, 0]), Reply::Err(22), "an unknown operation"); +} + +/// The slots themselves on a page that is not there: need-page, and nothing +/// happens until the retry. +#[test] +fn slots_on_an_absent_page() { + let mut g = Guest::new(64); + g.mem.page_out(g.slots, 8); + let Reply::Ok(ctx, _) = g.call(OP_CREATE, &[0]) else { panic!() }; + assert_ne!(ctx, 0); + assert_eq!(g.retries, 1); + // Exactly one context was made: the next is numbered one on. + let Reply::Ok(next, _) = g.call(OP_CREATE, &[0]) else { panic!() }; + assert_eq!(next, ctx + 1); +} + +#[test] +fn glx_and_gl_strings() { + let mut g = Guest::new(64); + g.context(0x0040_0200, 8, 8); + let buf = g.mem.alloc(4096, PAGE - 100); + g.mem.page_out(buf, 4096); + assert_eq!(g.call(OP_GETSTRING, &[0x1F03, buf, 4096]), Reply::Ok(0, 0)); + let s = g.mem.get(buf, 4096); + let end = s.iter().position(|&b| b == 0).unwrap(); + let ext = std::str::from_utf8(&s[..end]).unwrap(); + assert!(ext.contains("GL_EXT_abgr") && ext.contains("GL_SGIX_clipmap"), "{ext}"); + assert_eq!(g.call(OP_GLX_STRING, &[0, buf, 16]), Reply::Ok(0, 0)); + assert_eq!(g.mem.get(buf, 16), b"GLX_EXT_visual_\0", "cut to the buffer, terminated"); + assert_eq!(g.call(OP_GETSTRING, &[0x1F01, buf, 256]), Reply::Ok(0, 0)); // RENDERER + assert_ne!(g.mem.get(buf, 1)[0], 0); +} + +#[test] +fn pbuffers_keep_their_pixels_and_the_window_its_own() { + let mut g = Guest::new(128); + let window = 0x0040_0300; + let ctx = g.context(window, 16, 16); + let clear = |r: f32| { + let mut e = Enc::default(); + e.cmd("glClearColor", &[V::F(r), V::F(0.0), V::F(0.0), V::F(1.0)]).cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]); + e.take() + }; + let c1 = clear(1.0); + assert_eq!(g.batch(&c1), Reply::Ok(0, 0)); + let Reply::Ok(pb, _) = g.call(OP_PBUFFER, &[8, 8, 0]) else { panic!() }; + assert_eq!(pb & 0xC000_0000, 0x4000_0000); + // Making the pbuffer must not have taken drawing away from the window. + let c2 = clear(0.2); + assert_eq!(g.batch(&c2), Reply::Ok(0, 0)); + assert_eq!(g.call(OP_MAKECURRENT, &[ctx, pb, pb, 8, 8]), Reply::Ok(0, 0)); + let c3 = clear(0.6); + assert_eq!(g.batch(&c3), Reply::Ok(0, 0)); + let read = |g: &mut Guest| { + let px = g.mem.alloc(64, 0); + let mut e = Enc::default(); + e.cmd("glReadPixels", &[V::I(0), V::I(0), V::I(1), V::I(1), V::I(GL_RGBA), V::I(GL_UNSIGNED_BYTE), V::A(px as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + g.mem.get(px, 4)[0] + }; + assert_eq!(read(&mut g), 153); + assert_eq!(g.call(OP_MAKECURRENT, &[ctx, window, window, 16, 16]), Reply::Ok(0, 0)); + assert_eq!(read(&mut g), 51); + assert_eq!(g.call(OP_DRAWABLE_GONE, &[pb]), Reply::Ok(0, 0)); + assert_eq!(read(&mut g), 51, "the window is still bound after the pbuffer went"); + assert_eq!(g.call(OP_DESTROY, &[ctx]), Reply::Ok(0, 0)); +} + +/// GLX_SGI_make_current_read with a multisampled pbuffer to read from: a read +/// resolves the samples, and drawing stays in the window. And the stencil +/// buffer glXGetConfig promises is there. +#[test] +fn multisampled_read_drawable_and_stencil() { + let mut g = Guest::new(128); + let window = 0x0040_0700; + let ctx = g.context(window, 16, 16); + let Reply::Ok(pb, _) = g.call(OP_PBUFFER, &[16, 16, 4]) else { panic!() }; + let clear = |r: f32, gr: f32, b: f32| { + let mut e = Enc::default(); + e.cmd("glClearColor", &[V::F(r), V::F(gr), V::F(b), V::F(1.0)]).cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]); + e.take() + }; + let read = |g: &mut Guest| { + let px = g.mem.alloc(64, 0); + let mut e = Enc::default(); + e.cmd("glReadPixels", &[V::I(8), V::I(8), V::I(1), V::I(1), V::I(GL_RGBA), V::I(GL_UNSIGNED_BYTE), V::A(px as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + <[u8; 4]>::try_from(g.mem.get(px, 4)).unwrap() + }; + assert_eq!(g.call(OP_MAKECURRENT, &[ctx, pb, pb, 16, 16]), Reply::Ok(0, 0)); + let red = clear(1.0, 0.0, 0.0); + assert_eq!(g.batch(&red), Reply::Ok(0, 0)); + assert_eq!(read(&mut g), [255, 0, 0, 255], "the multisampled pbuffer resolves for a read"); + // Draw into the window, read the pbuffer. + assert_eq!(g.call(OP_MAKECURRENT, &[ctx, window, pb, 16, 16]), Reply::Ok(0, 0)); + let blue = clear(0.0, 0.0, 1.0); + assert_eq!(g.batch(&blue), Reply::Ok(0, 0)); + assert_eq!(read(&mut g), [255, 0, 0, 255], "reads come from the pbuffer"); + // After that read's resolve, drawing must still go to the window. + let green = clear(0.0, 1.0, 0.0); + assert_eq!(g.batch(&green), Reply::Ok(0, 0)); + assert_eq!(read(&mut g), [255, 0, 0, 255], "the pbuffer was not drawn into"); + assert_eq!(g.call(OP_MAKECURRENT, &[ctx, window, window, 16, 16]), Reply::Ok(0, 0)); + assert_eq!(read(&mut g), [0, 255, 0, 255], "the window was"); + + let out = g.mem.alloc(16, 0); + let mut e = Enc::default(); + e.cmd("glGetIntegerv", &[V::I(0x0D57), V::A(out as u64)]); // STENCIL_BITS + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + assert_eq!(u32::from_be_bytes(g.mem.get(out, 4).try_into().unwrap()), 8, "an 8-bit stencil buffer"); +} + +#[test] +fn video_sync_answers_without_sleeping() { + let mut g = Guest::new(16); + let t = std::time::Instant::now(); + let Reply::Ok(count, wait) = g.call(OP_VIDEO_SYNC, &[1, 30, 0]) else { panic!() }; + assert!(t.elapsed() < std::time::Duration::from_millis(100), "the host must not block the CPU thread"); + assert_eq!(count % 30, 0); + assert!(wait > 0 && wait <= 500_000_000 + 1, "{wait}"); +} + +#[test] +fn merged_writes_are_disjoint_and_later_ones_win() { + let w = merge(vec![(100, vec![1; 10]), (105, vec![2; 10]), (200, vec![3; 4]), (98, vec![4; 3]), (110, vec![])]); + let mut w = w; + w.sort(); + assert_eq!(w.len(), 2); + assert_eq!(w[0].0, 98); + // 98..101 the last write; 101..105 the first; 105..115 the second. + let mut want = vec![4u8, 4, 4]; + want.extend_from_slice(&[1; 4]); + want.extend_from_slice(&[2; 10]); + assert_eq!(w[0].1, want); + assert_eq!(w[1], (200, vec![3; 4])); +} + +/// A process whose memory sits behind a 48-entry TLB, reached through the real +/// `iris_hostcall::dispatch` -- the framework's page cache included. +struct Tlb { + proc_: Proc, + entries: VecDeque, +} + +impl PageAccess for Tlb { + fn space(&self) -> u64 { + 5 + } + fn read_page(&mut self, page: u64, buf: &mut [u8; PAGE as usize]) -> Result<(), Fault> { + if !self.entries.contains(&page) { + return Err(Fault { page, write: false }); + } + self.proc_.read(page, buf) + } + fn write_in_page(&mut self, addr: u64, data: &[u8]) -> Result<(), Fault> { + let page = addr & !(PAGE - 1); + if !self.entries.contains(&page) { + return Err(Fault { page, write: true }); + } + self.proc_.write(addr, data) + } +} + +impl Tlb { + fn touch(&mut self, f: Fault) { + self.proc_.touch(f); + if !self.entries.contains(&f.page) { + if self.entries.len() == 48 { + self.entries.pop_front(); + } + self.entries.push_back(f.page); + } + } + + fn call(&mut self, args: [u64; 8]) -> (Reply, usize) { + let mut n = 0; + loop { + match iris_hostcall::dispatch(iris_hostcall::GL, self, &args).expect("registered") { + Reply::NeedPage(f) => { + self.touch(f); + n += 1; + assert!(n < 100_000, "no progress"); + } + r => return (r, n), + } + } + } +} + +/// Through the real framework: a 128 KB command buffer and a 1 MB readback, +/// each far more pages than the TLB holds. +#[test] +fn through_the_framework_with_a_48_entry_tlb() { + iris_hostcall::register(iris_hostcall::GL, Box::new(GlService::new(Box::new(Cgl::new())))); + let mut t = Tlb { proc_: Proc::new(2048), entries: VecDeque::new() }; + let slots = t.proc_.alloc(64, 0); + let (r, _) = t.call([OP_HELLO, PROTOCOL, 0, 0, 0, 0, 0, 0]); + let Reply::Ok(client, _) = r else { panic!("{r:?}") }; + let mut serial = 0; + let mut call = |t: &mut Tlb, op: u64, s: &[u64]| { + let b: Vec = s.iter().flat_map(|v| v.to_be_bytes()).collect(); + t.proc_.put(slots, &b); + serial += 1; + t.call([op, slots, client, serial, 0, 0, 0, 0]) + }; + let (Reply::Ok(ctx, _), _) = call(&mut t, OP_CREATE, &[0]) else { panic!() }; + assert_eq!(call(&mut t, OP_MAKECURRENT, &[ctx, 0x0040_0400, 0x0040_0400, 512, 512]).0, Reply::Ok(0, 0)); + + // A buffer of thousands of tiny additive quads, then the readback. + let mut e = Enc::default(); + ortho(&mut e, 512, 512); + e.cmd("glClearColor", &[V::F(0.0), V::F(0.0), V::F(0.0), V::F(0.0)]) + .cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]) + .cmd("glColor3ub", &[V::I(0), V::I(200), V::I(0)]) + .cmd("glBegin", &[V::I(GL_QUADS)]); + let mut k = 0; + while e.buf.len() < 120 << 10 { + let (x, y) = ((k % 512) as f32, ((k / 512) % 512) as f32); + e.cmd("glVertex2f", &[V::F(x), V::F(y)]) + .cmd("glVertex2f", &[V::F(x + 1.0), V::F(y)]) + .cmd("glVertex2f", &[V::F(x + 1.0), V::F(y + 1.0)]) + .cmd("glVertex2f", &[V::F(x), V::F(y + 1.0)]); + k += 1; + } + e.cmd("glEnd", &[]); + let px = t.proc_.alloc(512 * 512 * 4, 0); + t.proc_.share(px, 512 * 512 * 4); + e.cmd("glReadPixels", &[V::I(0), V::I(0), V::I(512), V::I(512), V::I(GL_RGBA), V::I(GL_UNSIGNED_BYTE), V::A(px as u64)]); + let cmds = e.take(); + let at = t.proc_.alloc(cmds.len(), 0); + t.proc_.put(at, &cmds); + let (r, retries) = call(&mut t, OP_BATCH, &[at, cmds.len() as u64]); + assert_eq!(r, Reply::Ok(0, 0)); + assert!(retries >= 256 + 28, "both the buffer and the readback outgrew the TLB ({retries})"); + let out = t.proc_.get(px, 512 * 512 * 4); + let quads = k; + assert_eq!(pixel(out, 512, 0, 0), [0, 200, 0, 255]); + let last = quads - 1; + assert_eq!(pixel(out, 512, last % 512, last / 512), [0, 200, 0, 255]); + assert_eq!(pixel(out, 512, 511, 511), [0, 0, 0, 0], "no quad there"); + assert_eq!(call(&mut t, OP_GOODBYE, &[]).0, Reply::Ok(0, 0)); +} + +/// glcheck.c's frames, replayed here: its exact-pixel checks, and the +/// checksums it prints, for comparison with a run in the emulator. Run with +/// `--nocapture` to see them. +#[test] +fn glcheck_reference() { + const DISC: usize = 1024; + let (frames, size) = (60usize, 256usize); + let mut g = Guest::new(1024); + g.context(0x0040_0500, size as u64, size as u64); + let n = DISC + 2; + let xy = g.mem.alloc(n * 8, 0); + let rgba = g.mem.alloc(n * 4, 0); + let mut vx = vec![0f32; 2 * n]; + let mut vc = vec![255u8; 4 * n]; + for k in 0..=DISC { + let (tx, ty) = ((k % DISC) as i32, ((k + DISC / 4) % DISC) as i32); + let half = (DISC / 2) as i32; + let q = (DISC / 4) as i32; + vx[2 * (k + 1)] = (if tx > half { tx - half } else { half - tx } - q) as f32 / q as f32; + vx[2 * (k + 1) + 1] = (if ty > half { ty - half } else { half - ty } - q) as f32 / q as f32; + vc[4 * (k + 1)] = (k * 255 / DISC) as u8; + vc[4 * (k + 1) + 1] = (255 - k * 255 / DISC) as u8; + vc[4 * (k + 1) + 2] = 128; + vc[4 * (k + 1) + 3] = 255; + } + vx[0] = 0.0; + vx[1] = 0.0; + let xyb: Vec = vx.iter().flat_map(|v| v.to_be_bytes()).collect(); + g.mem.put(xy, &xyb); + g.mem.put(rgba, &vc); + let px = g.mem.alloc(size * size * 4, 0); + + let fnv = |data: &[u8], mut h: u32| { + for &b in data { + h ^= b as u32; + h = h.wrapping_mul(16_777_619); + } + h + }; + let mut all = 2_166_136_261u32; + let mut e = Enc::default(); + e.cmd("glPixelStorei", &[V::I(GL_PACK_ALIGNMENT), V::I(1)]); + for i in 0..frames { + let s = size as i32; + e.cmd("glViewport", &[V::I(0), V::I(0), V::I(s), V::I(s)]) + .cmd("glMatrixMode", &[V::I(GL_PROJECTION)]) + .cmd("glLoadIdentity", &[]) + .cmd("glOrtho", &[V::D(-1.0), V::D(1.0), V::D(-1.0), V::D(1.0), V::D(-1.0), V::D(1.0)]) + .cmd("glMatrixMode", &[V::I(GL_MODELVIEW)]) + .cmd("glLoadIdentity", &[]) + .cmd("glClearColor", &[V::F(0.2), V::F(0.4), V::F(0.6), V::F(1.0)]) + .cmd("glClear", &[V::I(GL_COLOR_BUFFER_BIT)]); + if i == 0 { + e.cmd("glShadeModel", &[V::I(GL_FLAT)]); + } else { + e.cmd("glShadeModel", &[V::I(GL_SMOOTH)]).cmd("glRotatef", &[V::F((i * 6 % 360) as f32), V::F(0.0), V::F(0.0), V::F(1.0)]); + } + e.cmd("glBegin", &[V::I(GL_TRIANGLES)]) + .cmd("glColor3ub", &[V::I(255), V::I(0), V::I(0)]) + .cmd("glVertex2f", &[V::F(0.0), V::F(0.8)]) + .cmd("glColor3ub", &[V::I(0), V::I(255), V::I(0)]) + .cmd("glVertex2f", &[V::F(-0.7), V::F(-0.5)]) + .cmd("glColor3ub", &[V::I(0), V::I(0), V::I(255)]) + .cmd("glVertex2f", &[V::F(0.7), V::F(-0.5)]) + .cmd("glEnd", &[]); + if i > 0 { + e.cmd("glLoadIdentity", &[]) + .cmd("glTranslatef", &[V::F(-0.6), V::F(0.6), V::F(0.0)]) + .cmd("glScalef", &[V::F(0.3), V::F(0.3), V::F(1.0)]) + .cmd("glEnableClientState", &[V::I(GL_VERTEX_ARRAY)]) + .cmd("glEnableClientState", &[V::I(GL_COLOR_ARRAY)]) + .cmd("glVertexPointer", &[V::I(2), V::I(GL_FLOAT), V::I(0), V::A(xy as u64)]) + .cmd("glColorPointer", &[V::I(4), V::I(GL_UNSIGNED_BYTE), V::I(0), V::A(rgba as u64)]) + .cmd("glDrawArrays", &[V::I(GL_TRIANGLE_FAN), V::I(0), V::I(n as i32)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + e.cmd("glDisableClientState", &[V::I(GL_COLOR_ARRAY)]).cmd("glDisableClientState", &[V::I(GL_VERTEX_ARRAY)]); + } + e.cmd("glReadPixels", &[V::I(0), V::I(0), V::I(s), V::I(s), V::I(GL_RGBA), V::I(GL_UNSIGNED_BYTE), V::A(px as u64)]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + let out = g.mem.get(px, size * size * 4).to_vec(); + if i == 0 { + assert_eq!(pixel(&out, size, 1, 1), [51, 102, 153, 255]); + assert_eq!(pixel(&out, size, size - 2, size - 2), [51, 102, 153, 255]); + assert_eq!(pixel(&out, size, size / 2, size / 2), [0, 0, 255, 255]); + e.cmd("glGetError", &[]); + let cmds = e.take(); + assert_eq!(g.batch(&cmds), Reply::Ok(0, 0)); + } + let sum = fnv(&out, 2_166_136_261); + println!("glcheck: frame {i} checksum {sum:#010x}"); + all = fnv(&sum.to_be_bytes(), all); + // glXSwapBuffers. + let frame = g.mem.alloc(size * size * 4, 0); + assert!(matches!(g.call(OP_SWAP, &[frame, size as u64, size as u64, 0, 0, 0, 0]), Reply::Ok(0, _))); + g.mem.next = frame; // reuse the address space frame after frame + } + println!("glcheck: all frames checksum {all:#010x} (glcheck {frames} {size})"); +} diff --git a/iris-hostgl/tools/glapi.json b/iris-hostgl/tools/glapi.json new file mode 100644 index 0000000..c00c0e1 --- /dev/null +++ b/iris-hostgl/tools/glapi.json @@ -0,0 +1,14068 @@ +{ + "functions": [ + { + "name": "glAccum", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "op", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "value", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glAlphaFunc", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "func", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "ref", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glAreTexturesResident", + "ret": "GLboolean", + "params": [ + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "textures", + "ptr": 1, + "const": true, + "elem": "u32", + "kind": "inline", + "count": "n" + }, + { + "type": "GLboolean", + "name": "residences", + "ptr": 1, + "const": false, + "elem": "u8", + "kind": "out", + "count": "n" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glAreTexturesResidentEXT", + "ret": "GLboolean", + "params": [ + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "textures", + "ptr": 1, + "const": true, + "elem": "u32", + "kind": "inline", + "count": "n" + }, + { + "type": "GLboolean", + "name": "residences", + "ptr": 1, + "const": false, + "elem": "u8", + "kind": "out", + "count": "n" + } + ], + "sync": true, + "ext": "EXT_texture_object" + }, + { + "name": "glArrayElement", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "i", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glArrayElementEXT", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "i", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_vertex_array" + }, + { + "name": "glBegin", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glBindTexture", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "texture", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glBindTextureEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "texture", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_texture_object" + }, + { + "name": "glBitmap", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "xorig", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "yorig", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "xmove", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "ymove", + "ptr": 0, + "const": false + }, + { + "type": "GLubyte", + "name": "bitmap", + "ptr": 1, + "const": true, + "elem": "u8", + "kind": "image", + "dims": [ + "width", + "height" + ], + "bitmap": true + } + ], + "sync": true, + "ext": null + }, + { + "name": "glBlendColor", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glBlendColorEXT", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_blend_color" + }, + { + "name": "glBlendEquation", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glBlendEquationEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glBlendFunc", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "sfactor", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "dfactor", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCallList", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "list", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCallLists", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "lists", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "inline", + "count": "n", + "typed": "type" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glClear", + "ret": "void", + "params": [ + { + "type": "GLbitfield", + "name": "mask", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glClearAccum", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glClearColor", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glClearDepth", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "depth", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glClearIndex", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "c", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glClearStencil", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "s", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glClipPlane", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "plane", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "equation", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3b", + "ret": "void", + "params": [ + { + "type": "GLbyte", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLbyte", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLbyte", + "name": "blue", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3bv", + "ret": "void", + "params": [ + { + "type": "GLbyte", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i8", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "blue", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "blue", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "blue", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "blue", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3ub", + "ret": "void", + "params": [ + { + "type": "GLubyte", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLubyte", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLubyte", + "name": "blue", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3ubv", + "ret": "void", + "params": [ + { + "type": "GLubyte", + "name": "v", + "ptr": 1, + "const": true, + "elem": "u8", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3ui", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "blue", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3uiv", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "u32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3us", + "ret": "void", + "params": [ + { + "type": "GLushort", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLushort", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLushort", + "name": "blue", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor3usv", + "ret": "void", + "params": [ + { + "type": "GLushort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "u16", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4b", + "ret": "void", + "params": [ + { + "type": "GLbyte", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLbyte", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLbyte", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLbyte", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4bv", + "ret": "void", + "params": [ + { + "type": "GLbyte", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i8", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4ub", + "ret": "void", + "params": [ + { + "type": "GLubyte", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLubyte", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLubyte", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLubyte", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4ubv", + "ret": "void", + "params": [ + { + "type": "GLubyte", + "name": "v", + "ptr": 1, + "const": true, + "elem": "u8", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4ui", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4uiv", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "u32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4us", + "ret": "void", + "params": [ + { + "type": "GLushort", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLushort", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLushort", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLushort", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColor4usv", + "ret": "void", + "params": [ + { + "type": "GLushort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "u16", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColorMask", + "ret": "void", + "params": [ + { + "type": "GLboolean", + "name": "red", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "green", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "blue", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "alpha", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColorMaterial", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "face", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColorPointer", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "size", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "Color" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColorPointerEXT", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "size", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "Color" + } + ], + "sync": false, + "ext": "EXT_vertex_array" + }, + { + "name": "glColorSubTable", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "start", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "data", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "count" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glColorTable", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "table", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glColorTableParameterfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "ColorTableParameterfvSGI", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColorTableParameterfvSGI", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "ColorTableParameterfvSGI", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": "SGI_color_table" + }, + { + "name": "glColorTableParameteriv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "ColorTableParameterivSGI", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glColorTableParameterivSGI", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "ColorTableParameterivSGI", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": "SGI_color_table" + }, + { + "name": "glColorTableSGI", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "table", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "SGI_color_table" + }, + { + "name": "glConvolutionFilter1D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "image", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glConvolutionFilter1DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "image", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_convolution" + }, + { + "name": "glConvolutionFilter2D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "image", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glConvolutionFilter2DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "image", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_convolution" + }, + { + "name": "glConvolutionParameterf", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glConvolutionParameterfEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_convolution" + }, + { + "name": "glConvolutionParameterfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "ConvolutionParameterfvEXT", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glConvolutionParameterfvEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "ConvolutionParameterfvEXT", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": "EXT_convolution" + }, + { + "name": "glConvolutionParameteri", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glConvolutionParameteriEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_convolution" + }, + { + "name": "glConvolutionParameteriv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "ConvolutionParameterivEXT", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glConvolutionParameterivEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "ConvolutionParameterivEXT", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": "EXT_convolution" + }, + { + "name": "glCopyColorSubTable", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "start", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyColorTable", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyColorTableSGI", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGI_color_table" + }, + { + "name": "glCopyConvolutionFilter1D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyConvolutionFilter1DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyConvolutionFilter2D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyConvolutionFilter2DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyPixels", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyTexImage1D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "border", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyTexImage1DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "border", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_copy_texture" + }, + { + "name": "glCopyTexImage2D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "border", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyTexImage2DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "border", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_copy_texture" + }, + { + "name": "glCopyTexSubImage1D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyTexSubImage1DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_copy_texture" + }, + { + "name": "glCopyTexSubImage2D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "yoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyTexSubImage2DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "yoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_copy_texture" + }, + { + "name": "glCopyTexSubImage3D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "yoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "zoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glCopyTexSubImage3DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "yoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "zoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_copy_texture" + }, + { + "name": "glCullFace", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDeformSGIX", + "ret": "void", + "params": [ + { + "type": "GLbitfield", + "name": "mask", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIX_polynomial_ffd" + }, + { + "name": "glDeformationMap3dSGIX", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "u1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "u2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "ustride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "uorder", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "vstride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "vorder", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "w1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "w2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "wstride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "worder", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "points", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "map", + "target": "target", + "orders": [ + [ + "uorder", + "ustride" + ], + [ + "vorder", + "vstride" + ], + [ + "worder", + "wstride" + ] + ] + } + ], + "sync": false, + "ext": "SGIX_polynomial_ffd" + }, + { + "name": "glDeformationMap3fSGIX", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "u1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "u2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "ustride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "uorder", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "vstride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "vorder", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "w1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "w2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "wstride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "worder", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "points", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "map", + "target": "target", + "orders": [ + [ + "uorder", + "ustride" + ], + [ + "vorder", + "vstride" + ], + [ + "worder", + "wstride" + ] + ] + } + ], + "sync": false, + "ext": "SGIX_polynomial_ffd" + }, + { + "name": "glDeleteLists", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "list", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "range", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDeleteTextures", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "textures", + "ptr": 1, + "const": true, + "elem": "u32", + "kind": "inline", + "count": "n" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDeleteTexturesEXT", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "textures", + "ptr": 1, + "const": true, + "elem": "u32", + "kind": "inline", + "count": "n" + } + ], + "sync": false, + "ext": "EXT_texture_object" + }, + { + "name": "glDepthFunc", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "func", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDepthMask", + "ret": "void", + "params": [ + { + "type": "GLboolean", + "name": "flag", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDepthRange", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "f", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDetailTexFuncSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "points", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "n*2" + } + ], + "sync": false, + "ext": "SGIS_detail_texture" + }, + { + "name": "glDisable", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "cap", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDisableClientState", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "array", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDrawArrays", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "first", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDrawArraysEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "first", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_vertex_array" + }, + { + "name": "glDrawBuffer", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "buf", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDrawElements", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "indices", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "drawindices", + "count": "count", + "type_param": "type" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glDrawPixels", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glDrawRangeElements", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "start", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "end", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "indices", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "drawindices", + "count": "count", + "type_param": "type" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEdgeFlag", + "ret": "void", + "params": [ + { + "type": "GLboolean", + "name": "flag", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEdgeFlagPointer", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "u8", + "kind": "array", + "array": "EdgeFlag" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEdgeFlagPointerEXT", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "u8", + "kind": "array", + "array": "EdgeFlag" + } + ], + "sync": false, + "ext": "EXT_vertex_array" + }, + { + "name": "glEdgeFlagv", + "ret": "void", + "params": [ + { + "type": "GLboolean", + "name": "flag", + "ptr": 1, + "const": true, + "elem": "u8", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEnable", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "cap", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEnableClientState", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "array", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEnd", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glEndList", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord1d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "u", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord1dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "u", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord1f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "u", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord1fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "u", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord2d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "u", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord2dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "u", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord2f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "u", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord2fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "u", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalMesh1", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "i1", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "i2", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalMesh2", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "i1", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "i2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "j1", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "j2", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalPoint1", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "i", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glEvalPoint2", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "i", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "j", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glFeedbackBuffer", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "size", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "buffer", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "deferred", + "count": "size" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glFinish", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glFlush", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glFlushRasterSGIX", + "ret": "void", + "params": [], + "sync": false, + "ext": "SGIX_flush_raster" + }, + { + "name": "glFogFuncSGIS", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "points", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "n*2" + } + ], + "sync": false, + "ext": "SGIS_fog_function" + }, + { + "name": "glFogf", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glFogfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "Fogfv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glFogi", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glFogiv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "Fogiv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glFrameZoomSGIX", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "factor", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIX_framezoom" + }, + { + "name": "glFrontFace", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glFrustum", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "left", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "right", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "bottom", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "top", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "zNear", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "zFar", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glGenLists", + "ret": "GLuint", + "params": [ + { + "type": "GLsizei", + "name": "range", + "ptr": 0, + "const": false + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGenTextures", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "textures", + "ptr": 1, + "const": false, + "elem": "u32", + "kind": "out", + "count": "n" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGenTexturesEXT", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "textures", + "ptr": 1, + "const": false, + "elem": "u32", + "kind": "out", + "count": "n" + } + ], + "sync": true, + "ext": "EXT_texture_object" + }, + { + "name": "glGetBooleanv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "data", + "ptr": 1, + "const": false, + "elem": "u8", + "kind": "out", + "get": "pname" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetClipPlane", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "plane", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "equation", + "ptr": 1, + "const": false, + "elem": "f64", + "kind": "out", + "count": "4" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetColorTable", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "table", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "ColorTable", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetColorTableParameterfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "table": "ColorTableParameterfvSGI", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetColorTableParameterfvSGI", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "table": "ColorTableParameterfvSGI", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": "SGI_color_table" + }, + { + "name": "glGetColorTableParameteriv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "table": "ColorTableParameterivSGI", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetColorTableParameterivSGI", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "table": "ColorTableParameterivSGI", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": "SGI_color_table" + }, + { + "name": "glGetColorTableSGI", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "table", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "ColorTable", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "SGI_color_table" + }, + { + "name": "glGetConvolutionFilter", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "image", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "ConvolutionFilter", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetConvolutionFilterEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "image", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "ConvolutionFilter", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_convolution" + }, + { + "name": "glGetConvolutionParameterfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "table": "ConvolutionParameterfvEXT", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetConvolutionParameterfvEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "table": "ConvolutionParameterfvEXT", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": "EXT_convolution" + }, + { + "name": "glGetConvolutionParameteriv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "table": "ConvolutionParameterivEXT", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetConvolutionParameterivEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "table": "ConvolutionParameterivEXT", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": "EXT_convolution" + }, + { + "name": "glGetDetailTexFuncSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "points", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "emulated": "DetailTexFunc" + } + ], + "sync": true, + "ext": "SGIS_detail_texture" + }, + { + "name": "glGetDoublev", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "data", + "ptr": 1, + "const": false, + "elem": "f64", + "kind": "out", + "get": "pname" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetError", + "ret": "GLenum", + "params": [], + "sync": true, + "ext": null + }, + { + "name": "glGetFloatv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "data", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "get": "pname" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetHistogram", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "reset", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "values", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "Histogram", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetHistogramEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "reset", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "values", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "Histogram", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_histogram" + }, + { + "name": "glGetHistogramParameterfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetHistogramParameterfvEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": "EXT_histogram" + }, + { + "name": "glGetHistogramParameteriv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetHistogramParameterivEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": "EXT_histogram" + }, + { + "name": "glGetInstrumentsSGIX", + "ret": "GLint", + "params": [], + "sync": true, + "ext": "SGIX_instruments" + }, + { + "name": "glGetIntegerv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "data", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "get": "pname" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetLightfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "light", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "table": "Lightfv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetLightiv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "light", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "table": "Lightiv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetListParameterfvSGIX", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "list", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": "SGIX_list_priority" + }, + { + "name": "glGetListParameterivSGIX", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "list", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": "SGIX_list_priority" + }, + { + "name": "glGetMapdv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "query", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": false, + "elem": "f64", + "kind": "out", + "mapquery": [ + "target", + "query" + ] + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetMapfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "query", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "mapquery": [ + "target", + "query" + ] + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetMapiv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "query", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "mapquery": [ + "target", + "query" + ] + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetMaterialfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "face", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "table": "Materialfv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetMaterialiv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "face", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "table": "Materialiv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetMinmax", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "reset", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "values", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "Minmax", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetMinmaxEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "reset", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "values", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "Minmax", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_histogram" + }, + { + "name": "glGetMinmaxParameterfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetMinmaxParameterfvEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": "EXT_histogram" + }, + { + "name": "glGetMinmaxParameteriv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetMinmaxParameterivEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": "EXT_histogram" + }, + { + "name": "glGetPixelMapfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "map", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "values", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "pixelmap": "map" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetPixelMapuiv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "map", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "values", + "ptr": 1, + "const": false, + "elem": "u32", + "kind": "out", + "pixelmap": "map" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetPixelMapusv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "map", + "ptr": 0, + "const": false + }, + { + "type": "GLushort", + "name": "values", + "ptr": 1, + "const": false, + "elem": "u16", + "kind": "out", + "pixelmap": "map" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetPointerv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "params", + "ptr": 2, + "const": false, + "elem": "void", + "kind": "out", + "pointer": "pname" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetPointervEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "params", + "ptr": 2, + "const": false, + "elem": "void", + "kind": "out", + "pointer": "pname" + } + ], + "sync": true, + "ext": "EXT_vertex_array" + }, + { + "name": "glGetPolygonStipple", + "ret": "void", + "params": [ + { + "type": "GLubyte", + "name": "mask", + "ptr": 1, + "const": false, + "elem": "u8", + "kind": "outimage", + "dims": [ + "32", + "32" + ], + "bitmap": true + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetSeparableFilter", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "row", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.row", + "format_param": "format", + "type_param": "type" + }, + { + "type": "void", + "name": "column", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.column", + "format_param": "format", + "type_param": "type" + }, + { + "type": "void", + "name": "span", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.span", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetSeparableFilterEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "row", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.row", + "format_param": "format", + "type_param": "type" + }, + { + "type": "void", + "name": "column", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.column", + "format_param": "format", + "type_param": "type" + }, + { + "type": "void", + "name": "span", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.span", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_convolution" + }, + { + "name": "glGetSharpenTexFuncSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "points", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "emulated": "SharpenTexFunc" + } + ], + "sync": true, + "ext": "SGIS_sharpen_texture" + }, + { + "name": "glGetString", + "ret": "const GLubyte *", + "params": [ + { + "type": "GLenum", + "name": "name", + "ptr": 0, + "const": false + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetTexEnvfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "table": "TexEnvfv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetTexEnviv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "table": "TexEnviv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetTexFilterFuncSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "filter", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "weights", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "emulated": "TexFilterFunc" + } + ], + "sync": true, + "ext": "SGIS_texture_filter4" + }, + { + "name": "glGetTexGendv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "coord", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f64", + "kind": "out", + "table": "TexGendv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetTexGenfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "coord", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "table": "TexGenfv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetTexGeniv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "coord", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "table": "TexGeniv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetTexImage", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims_from": "TexImage", + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetTexLevelParameterfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetTexLevelParameteriv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetTexParameterfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": false, + "elem": "f32", + "kind": "out", + "table": "TexParameterfv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glGetTexParameteriv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "table": "TexParameteriv", + "key": "pname", + "default": 1 + } + ], + "sync": true, + "ext": null + }, + { + "name": "glHint", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glHistogram", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "sink", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glHistogramEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "sink", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_histogram" + }, + { + "name": "glIndexMask", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "mask", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexPointer", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "Index" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexPointerEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "Index" + } + ], + "sync": false, + "ext": "EXT_vertex_array" + }, + { + "name": "glIndexd", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "c", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexdv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "c", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexf", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "c", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexfv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "c", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexi", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "c", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexiv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "c", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexs", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "c", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexsv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "c", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexub", + "ret": "void", + "params": [ + { + "type": "GLubyte", + "name": "c", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIndexubv", + "ret": "void", + "params": [ + { + "type": "GLubyte", + "name": "c", + "ptr": 1, + "const": true, + "elem": "u8", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glInitNames", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glInstrumentsBufferSGIX", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "size", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "buffer", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "deferred", + "count": "size" + } + ], + "sync": false, + "ext": "SGIX_instruments" + }, + { + "name": "glInterleavedArrays", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "Interleaved" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glIsEnabled", + "ret": "GLboolean", + "params": [ + { + "type": "GLenum", + "name": "cap", + "ptr": 0, + "const": false + } + ], + "sync": true, + "ext": null + }, + { + "name": "glIsList", + "ret": "GLboolean", + "params": [ + { + "type": "GLuint", + "name": "list", + "ptr": 0, + "const": false + } + ], + "sync": true, + "ext": null + }, + { + "name": "glIsTexture", + "ret": "GLboolean", + "params": [ + { + "type": "GLuint", + "name": "texture", + "ptr": 0, + "const": false + } + ], + "sync": true, + "ext": null + }, + { + "name": "glIsTextureEXT", + "ret": "GLboolean", + "params": [ + { + "type": "GLuint", + "name": "texture", + "ptr": 0, + "const": false + } + ], + "sync": true, + "ext": "EXT_texture_object" + }, + { + "name": "glLightModelf", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLightModelfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "LightModelfv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLightModeli", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLightModeliv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "LightModeliv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLightf", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "light", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLightfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "light", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "Lightfv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLighti", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "light", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLightiv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "light", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "Lightiv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLineStipple", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "factor", + "ptr": 0, + "const": false + }, + { + "type": "GLushort", + "name": "pattern", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLineWidth", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "width", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glListBase", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "base", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glListParameterfSGIX", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "list", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIX_list_priority" + }, + { + "name": "glListParameterfvSGIX", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "list", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": "SGIX_list_priority" + }, + { + "name": "glListParameteriSGIX", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "list", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIX_list_priority" + }, + { + "name": "glListParameterivSGIX", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "list", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": "SGIX_list_priority" + }, + { + "name": "glLoadIdentity", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glLoadIdentityDeformationMapSGIX", + "ret": "void", + "params": [ + { + "type": "GLbitfield", + "name": "mask", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIX_polynomial_ffd" + }, + { + "name": "glLoadMatrixd", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "m", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "16" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLoadMatrixf", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "m", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "16" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLoadName", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "name", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glLogicOp", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "opcode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMap1d", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "u1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "u2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "order", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "points", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "map", + "target": "target", + "orders": [ + [ + "order", + "stride" + ] + ] + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMap1f", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "u1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "u2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "order", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "points", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "map", + "target": "target", + "orders": [ + [ + "order", + "stride" + ] + ] + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMap2d", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "u1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "u2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "ustride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "uorder", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "vstride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "vorder", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "points", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "map", + "target": "target", + "orders": [ + [ + "uorder", + "ustride" + ], + [ + "vorder", + "vstride" + ] + ] + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMap2f", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "u1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "u2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "ustride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "uorder", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "vstride", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "vorder", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "points", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "map", + "target": "target", + "orders": [ + [ + "uorder", + "ustride" + ], + [ + "vorder", + "vstride" + ] + ] + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMapGrid1d", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "un", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "u1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "u2", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMapGrid1f", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "un", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "u1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "u2", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMapGrid2d", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "un", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "u1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "u2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "vn", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v2", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMapGrid2f", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "un", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "u1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "u2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "vn", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v2", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMaterialf", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "face", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMaterialfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "face", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "Materialfv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMateriali", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "face", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMaterialiv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "face", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "Materialiv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMatrixMode", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMinmax", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "sink", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMinmaxEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "sink", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_histogram" + }, + { + "name": "glMultMatrixd", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "m", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "16" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glMultMatrixf", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "m", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "16" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNewList", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "list", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormal3b", + "ret": "void", + "params": [ + { + "type": "GLbyte", + "name": "nx", + "ptr": 0, + "const": false + }, + { + "type": "GLbyte", + "name": "ny", + "ptr": 0, + "const": false + }, + { + "type": "GLbyte", + "name": "nz", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormal3bv", + "ret": "void", + "params": [ + { + "type": "GLbyte", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i8", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormal3d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "nx", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "ny", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "nz", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormal3dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormal3f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "nx", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "ny", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "nz", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormal3fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormal3i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "nx", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "ny", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "nz", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormal3iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormal3s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "nx", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "ny", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "nz", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormal3sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormalPointer", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "Normal" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glNormalPointerEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "Normal" + } + ], + "sync": false, + "ext": "EXT_vertex_array" + }, + { + "name": "glOrtho", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "left", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "right", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "bottom", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "top", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "zNear", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "zFar", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPassThrough", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "token", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPixelMapfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "map", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "mapsize", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "values", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "mapsize" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPixelMapuiv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "map", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "mapsize", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "values", + "ptr": 1, + "const": true, + "elem": "u32", + "kind": "inline", + "count": "mapsize" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPixelMapusv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "map", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "mapsize", + "ptr": 0, + "const": false + }, + { + "type": "GLushort", + "name": "values", + "ptr": 1, + "const": true, + "elem": "u16", + "kind": "inline", + "count": "mapsize" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPixelStoref", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPixelStorei", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPixelTexGenSGIX", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIX_pixel_texture" + }, + { + "name": "glPixelTransferf", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPixelTransferi", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPixelZoom", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "xfactor", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "yfactor", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPointParameterfSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIS_point_parameters" + }, + { + "name": "glPointParameterfvSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "PointParameterfvSGIS", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": "SGIS_point_parameters" + }, + { + "name": "glPointSize", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "size", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPollInstrumentsSGIX", + "ret": "GLint", + "params": [ + { + "type": "GLint", + "name": "marker_p", + "ptr": 1, + "const": false, + "elem": "i32", + "kind": "out", + "count": "1" + } + ], + "sync": true, + "ext": "SGIX_instruments" + }, + { + "name": "glPolygonMode", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "face", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPolygonOffset", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "factor", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "units", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPolygonOffsetEXT", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "factor", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "bias", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_polygon_offset" + }, + { + "name": "glPolygonStipple", + "ret": "void", + "params": [ + { + "type": "GLubyte", + "name": "mask", + "ptr": 1, + "const": true, + "elem": "u8", + "kind": "image", + "dims": [ + "32", + "32" + ], + "bitmap": true + } + ], + "sync": true, + "ext": null + }, + { + "name": "glPopAttrib", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glPopClientAttrib", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glPopMatrix", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glPopName", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glPrioritizeTextures", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "textures", + "ptr": 1, + "const": true, + "elem": "u32", + "kind": "inline", + "count": "n" + }, + { + "type": "GLfloat", + "name": "priorities", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "n" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPrioritizeTexturesEXT", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "textures", + "ptr": 1, + "const": true, + "elem": "u32", + "kind": "inline", + "count": "n" + }, + { + "type": "GLclampf", + "name": "priorities", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "n" + } + ], + "sync": false, + "ext": "EXT_texture_object" + }, + { + "name": "glPushAttrib", + "ret": "void", + "params": [ + { + "type": "GLbitfield", + "name": "mask", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPushClientAttrib", + "ret": "void", + "params": [ + { + "type": "GLbitfield", + "name": "mask", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glPushMatrix", + "ret": "void", + "params": [], + "sync": false, + "ext": null + }, + { + "name": "glPushName", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "name", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "y", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "z", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "w", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "z", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "w", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "z", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "w", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "z", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "w", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glReadBuffer", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "src", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glReadInstrumentsSGIX", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "marker", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIX_instruments" + }, + { + "name": "glReadPixels", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": false, + "elem": "void", + "kind": "outimage", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glRectd", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "x1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y1", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "x2", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y2", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRectdv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v1", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "2" + }, + { + "type": "GLdouble", + "name": "v2", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRectf", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "x1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y1", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "x2", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y2", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRectfv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v1", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "2" + }, + { + "type": "GLfloat", + "name": "v2", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRecti", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x1", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y1", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "x2", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y2", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRectiv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v1", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "2" + }, + { + "type": "GLint", + "name": "v2", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRects", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "x1", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "y1", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "x2", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "y2", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRectsv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v1", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "2" + }, + { + "type": "GLshort", + "name": "v2", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glReferencePlaneSGIX", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "equation", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": "SGIX_reference_plane" + }, + { + "name": "glRenderMode", + "ret": "GLint", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": true, + "ext": null + }, + { + "name": "glResetHistogram", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glResetHistogramEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_histogram" + }, + { + "name": "glResetMinmax", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glResetMinmaxEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "EXT_histogram" + }, + { + "name": "glRotated", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "angle", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glRotatef", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "angle", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glSampleMaskSGIS", + "ret": "void", + "params": [ + { + "type": "GLclampf", + "name": "value", + "ptr": 0, + "const": false + }, + { + "type": "GLboolean", + "name": "invert", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIS_multisample" + }, + { + "name": "glSamplePatternSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pattern", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIS_multisample" + }, + { + "name": "glScaled", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glScalef", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glScissor", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glSelectBuffer", + "ret": "void", + "params": [ + { + "type": "GLsizei", + "name": "size", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "buffer", + "ptr": 1, + "const": false, + "elem": "u32", + "kind": "deferred", + "count": "size" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glSeparableFilter2D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "row", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + }, + { + "type": "void", + "name": "column", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "height" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glSeparableFilter2DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "row", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + }, + { + "type": "void", + "name": "column", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "height" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_convolution" + }, + { + "name": "glShadeModel", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "mode", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glSharpenTexFuncSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "points", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "n*2" + } + ], + "sync": false, + "ext": "SGIS_sharpen_texture" + }, + { + "name": "glSpriteParameterfSGIX", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIX_sprite" + }, + { + "name": "glSpriteParameterfvSGIX", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "SpriteParameterfvSGIX", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": "SGIX_sprite" + }, + { + "name": "glSpriteParameteriSGIX", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIX_sprite" + }, + { + "name": "glSpriteParameterivSGIX", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "SpriteParameterivSGIX", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": "SGIX_sprite" + }, + { + "name": "glStartInstrumentsSGIX", + "ret": "void", + "params": [], + "sync": false, + "ext": "SGIX_instruments" + }, + { + "name": "glStencilFunc", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "func", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "ref", + "ptr": 0, + "const": false + }, + { + "type": "GLuint", + "name": "mask", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glStencilMask", + "ret": "void", + "params": [ + { + "type": "GLuint", + "name": "mask", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glStencilOp", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "fail", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "zfail", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "zpass", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glStopInstrumentsSGIX", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "marker", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIX_instruments" + }, + { + "name": "glTagSampleBufferSGIX", + "ret": "void", + "params": [], + "sync": false, + "ext": "SGIX_tag_sample_buffer" + }, + { + "name": "glTexCoord1d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "s", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "s", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "s", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "s", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "t", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "t", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "t", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "t", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "r", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "r", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "r", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "r", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "r", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "q", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "r", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "q", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "r", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "q", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "r", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "q", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoordPointer", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "size", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "TexCoord" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexCoordPointerEXT", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "size", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "TexCoord" + } + ], + "sync": false, + "ext": "EXT_vertex_array" + }, + { + "name": "glTexEnvf", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexEnvfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "TexEnvfv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexEnvi", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexEnviv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "TexEnviv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexFilterFuncSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "filter", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "n", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "weights", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "n" + } + ], + "sync": false, + "ext": "SGIS_texture_filter4" + }, + { + "name": "glTexGend", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "coord", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexGendv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "coord", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "table": "TexGendv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexGenf", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "coord", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexGenfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "coord", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "TexGenfv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexGeni", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "coord", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexGeniv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "coord", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "TexGeniv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexImage1D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "border", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glTexImage2D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "border", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glTexImage3D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "depth", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "border", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glTexImage3DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "depth", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "border", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_texture3D" + }, + { + "name": "glTexImage4DSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "internalformat", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "depth", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "size4d", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "border", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth", + "size4d" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "SGIS_texture4D" + }, + { + "name": "glTexParameterf", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexParameterfv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "params", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "table": "TexParameterfv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexParameteri", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "param", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexParameteriv", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "pname", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "params", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "table": "TexParameteriv", + "key": "pname", + "default": 1 + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTexSubImage1D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glTexSubImage1DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_subtexture" + }, + { + "name": "glTexSubImage2D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "yoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glTexSubImage2DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "yoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_subtexture" + }, + { + "name": "glTexSubImage3D", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "yoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "zoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "depth", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": null + }, + { + "name": "glTexSubImage3DEXT", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "yoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "zoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "depth", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "EXT_texture3D" + }, + { + "name": "glTexSubImage4DSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "level", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "xoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "yoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "zoffset", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "woffset", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "depth", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "size4d", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "format", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pixels", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth", + "size4d" + ], + "format_param": "format", + "type_param": "type" + } + ], + "sync": true, + "ext": "SGIS_texture4D" + }, + { + "name": "glTranslated", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glTranslatef", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex2d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex2dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex2f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex2fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex2i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex2iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex2s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "y", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex2sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex3d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex3dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex3f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex3fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex3i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex3iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex3s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "z", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex3sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex4d", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "z", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "w", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex4dv", + "ret": "void", + "params": [ + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex4f", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "z", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "w", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex4fv", + "ret": "void", + "params": [ + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex4i", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "z", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "w", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex4iv", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex4s", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "z", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "w", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertex4sv", + "ret": "void", + "params": [ + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertexPointer", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "size", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "Vertex" + } + ], + "sync": false, + "ext": null + }, + { + "name": "glVertexPointerEXT", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "size", + "ptr": 0, + "const": false + }, + { + "type": "GLenum", + "name": "type", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "stride", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "count", + "ptr": 0, + "const": false + }, + { + "type": "void", + "name": "pointer", + "ptr": 1, + "const": true, + "elem": "void", + "kind": "array", + "array": "Vertex" + } + ], + "sync": false, + "ext": "EXT_vertex_array" + }, + { + "name": "glViewport", + "ret": "void", + "params": [ + { + "type": "GLint", + "name": "x", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "y", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "width", + "ptr": 0, + "const": false + }, + { + "type": "GLsizei", + "name": "height", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": null + }, + { + "name": "glActiveTextureARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "texture", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glClientActiveTextureARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "texture", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1dARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "s", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1dvARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1fARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "s", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1fvARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1iARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "s", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1ivARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1sARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "s", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1svARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "1" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2dARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "t", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2dvARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2fARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "t", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2fvARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2iARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "t", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2ivARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2sARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "t", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2svARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3dARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "r", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3dvARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3fARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "r", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3fvARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3iARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "r", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3ivARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3sARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "r", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3svARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "3" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4dARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "r", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "q", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4dvARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLdouble", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f64", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4fARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "r", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "q", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4fvARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4iARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "r", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "q", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4ivARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLint", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i32", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4sARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "t", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "r", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "q", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4svARB", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLshort", + "name": "v", + "ptr": 1, + "const": true, + "elem": "i16", + "kind": "inline", + "count": "4" + } + ], + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glSelectTextureSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIS_multitexture" + }, + { + "name": "glMTexCoord2fSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "t", + "ptr": 0, + "const": false + } + ], + "sync": false, + "ext": "SGIS_multitexture" + }, + { + "name": "glMTexCoord2fvSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true, + "elem": "f32", + "kind": "inline", + "count": "2" + } + ], + "sync": false, + "ext": "SGIS_multitexture" + } + ], + "enums": { + "GL_ACCUM_CLEAR_VALUE": 2944, + "GL_AMBIENT": 4608, + "GL_AMBIENT_AND_DIFFUSE": 5634, + "GL_BLEND_COLOR": 32773, + "GL_BLEND_COLOR_EXT": 32773, + "GL_COLOR_CLEAR_VALUE": 3106, + "GL_COLOR_INDEXES": 5635, + "GL_COLOR_MATRIX": 32945, + "GL_COLOR_MATRIX_SGI": 32945, + "GL_COLOR_TABLE_BIAS": 32983, + "GL_COLOR_TABLE_BIAS_SGI": 32983, + "GL_COLOR_TABLE_SCALE": 32982, + "GL_COLOR_TABLE_SCALE_SGI": 32982, + "GL_COLOR_WRITEMASK": 3107, + "GL_CONSTANT_ATTENUATION": 4615, + "GL_CONVOLUTION_BORDER_MODE": 32787, + "GL_CONVOLUTION_BORDER_MODE_EXT": 32787, + "GL_CONVOLUTION_FILTER_BIAS": 32789, + "GL_CONVOLUTION_FILTER_BIAS_EXT": 32789, + "GL_CONVOLUTION_FILTER_SCALE": 32788, + "GL_CONVOLUTION_FILTER_SCALE_EXT": 32788, + "GL_CONVOLUTION_FORMAT": 32791, + "GL_CONVOLUTION_FORMAT_EXT": 32791, + "GL_CONVOLUTION_HEIGHT": 32793, + "GL_CONVOLUTION_HEIGHT_EXT": 32793, + "GL_CONVOLUTION_WIDTH": 32792, + "GL_CONVOLUTION_WIDTH_EXT": 32792, + "GL_CURRENT_COLOR": 2816, + "GL_CURRENT_NORMAL": 2818, + "GL_CURRENT_RASTER_COLOR": 2820, + "GL_CURRENT_RASTER_POSITION": 2823, + "GL_CURRENT_RASTER_TEXTURE_COORDS": 2822, + "GL_CURRENT_TEXTURE_COORDS": 2819, + "GL_DEPTH_RANGE": 2928, + "GL_DETAIL_TEXTURE_LEVEL_SGIS": 32922, + "GL_DETAIL_TEXTURE_MODE_SGIS": 32923, + "GL_DIFFUSE": 4609, + "GL_DISTANCE_ATTENUATION_SGIS": 33065, + "GL_DUAL_TEXTURE_SELECT_SGIS": 33060, + "GL_EMISSION": 5632, + "GL_EYE_PLANE": 9474, + "GL_FOG_COLOR": 2918, + "GL_FOG_DENSITY": 2914, + "GL_FOG_END": 2916, + "GL_FOG_INDEX": 2913, + "GL_FOG_MODE": 2917, + "GL_FOG_OFFSET_VALUE_SGIX": 33177, + "GL_FOG_START": 2915, + "GL_LIGHT_MODEL_AMBIENT": 2899, + "GL_LIGHT_MODEL_LOCAL_VIEWER": 2897, + "GL_LIGHT_MODEL_TWO_SIDE": 2898, + "GL_LINEAR_ATTENUATION": 4616, + "GL_LINE_WIDTH_RANGE": 2850, + "GL_MAP1_GRID_DOMAIN": 3536, + "GL_MAP2_GRID_DOMAIN": 3538, + "GL_MAP2_GRID_SEGMENTS": 3539, + "GL_MAX_CONVOLUTION_HEIGHT": 32795, + "GL_MAX_CONVOLUTION_HEIGHT_EXT": 32795, + "GL_MAX_CONVOLUTION_WIDTH": 32794, + "GL_MAX_CONVOLUTION_WIDTH_EXT": 32794, + "GL_MAX_VIEWPORT_DIMS": 3386, + "GL_MODELVIEW_MATRIX": 2982, + "GL_OBJECT_PLANE": 9473, + "GL_POINT_FADE_THRESHOLD_SIZE_SGIS": 33064, + "GL_POINT_SIZE_MAX_SGIS": 33063, + "GL_POINT_SIZE_MIN_SGIS": 33062, + "GL_POINT_SIZE_RANGE": 2834, + "GL_POLYGON_MODE": 2880, + "GL_POSITION": 4611, + "GL_POST_TEXTURE_FILTER_BIAS_SGIX": 33145, + "GL_POST_TEXTURE_FILTER_SCALE_SGIX": 33146, + "GL_PROJECTION_MATRIX": 2983, + "GL_QUADRATIC_ATTENUATION": 4617, + "GL_QUAD_TEXTURE_SELECT_SGIS": 33061, + "GL_REFERENCE_PLANE_EQUATION_SGIX": 33150, + "GL_SCISSOR_BOX": 3088, + "GL_SHININESS": 5633, + "GL_SPECULAR": 4610, + "GL_SPOT_CUTOFF": 4614, + "GL_SPOT_DIRECTION": 4612, + "GL_SPOT_EXPONENT": 4613, + "GL_SPRITE_AXIS_SGIX": 33098, + "GL_SPRITE_MODE_SGIX": 33097, + "GL_SPRITE_TRANSLATION_SGIX": 33099, + "GL_TEXTURE_BASE_LEVEL": 33084, + "GL_TEXTURE_BASE_LEVEL_SGIS": 33084, + "GL_TEXTURE_BORDER_COLOR": 4100, + "GL_TEXTURE_CLIPMAP_CENTER_SGIX": 33137, + "GL_TEXTURE_CLIPMAP_FRAME_SGIX": 33138, + "GL_TEXTURE_CLIPMAP_OFFSET_SGIX": 33139, + "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX": 33140, + "GL_TEXTURE_COMPARE_OPERATOR_SGIX": 33179, + "GL_TEXTURE_COMPARE_SGIX": 33178, + "GL_TEXTURE_ENV_COLOR": 8705, + "GL_TEXTURE_ENV_MODE": 8704, + "GL_TEXTURE_GEN_MODE": 9472, + "GL_TEXTURE_MAG_FILTER": 10240, + "GL_TEXTURE_MATRIX": 2984, + "GL_TEXTURE_MAX_LEVEL": 33085, + "GL_TEXTURE_MAX_LEVEL_SGIS": 33085, + "GL_TEXTURE_MAX_LOD": 33083, + "GL_TEXTURE_MAX_LOD_SGIS": 33083, + "GL_TEXTURE_MIN_FILTER": 10241, + "GL_TEXTURE_MIN_LOD": 33082, + "GL_TEXTURE_MIN_LOD_SGIS": 33082, + "GL_TEXTURE_WRAP_R": 32882, + "GL_TEXTURE_WRAP_R_EXT": 32882, + "GL_TEXTURE_WRAP_S": 10242, + "GL_TEXTURE_WRAP_T": 10243, + "GL_VIEWPORT": 2978 + }, + "extensions": [ + "EXT_abgr", + "EXT_blend_color", + "EXT_blend_logic_op", + "EXT_blend_minmax", + "EXT_blend_subtract", + "EXT_cmyka", + "EXT_convolution", + "EXT_copy_texture", + "EXT_histogram", + "EXT_packed_pixels", + "EXT_polygon_offset", + "EXT_rescale_normal", + "EXT_subtexture", + "EXT_texture", + "EXT_texture3D", + "EXT_texture_object", + "EXT_vertex_array", + "SGIS_detail_texture", + "SGIS_fog_function", + "SGIS_generate_mipmap", + "SGIS_multisample", + "SGIS_point_line_texgen", + "SGIS_point_parameters", + "SGIS_sharpen_texture", + "SGIS_texture4D", + "SGIS_texture_border_clamp", + "SGIS_texture_edge_clamp", + "SGIS_texture_filter4", + "SGIS_texture_lod", + "SGIS_texture_select", + "SGIX_calligraphic_fragment", + "SGIX_clipmap", + "SGIX_depth_texture", + "SGIX_flush_raster", + "SGIX_fog_offset", + "SGIX_framezoom", + "SGIX_impact_pixel_texture", + "SGIX_instruments", + "SGIX_interlace", + "SGIX_ir_instrument1", + "SGIX_list_priority", + "SGIX_pixel_texture", + "SGIX_pixel_tiles", + "SGIX_polynomial_ffd", + "SGIX_reference_plane", + "SGIX_shadow", + "SGIX_shadow_ambient", + "SGIX_sprite", + "SGIX_tag_sample_buffer", + "SGIX_texture_add_env", + "SGIX_texture_lod_bias", + "SGIX_texture_multi_buffer", + "SGIX_texture_scale_bias", + "SGIX_ycrcb", + "SGI_color_matrix", + "SGI_color_table", + "SGI_fft", + "SGI_texture_color_table", + "ARB_multitexture", + "SGIS_multitexture" + ], + "sizes": { + "CallLists": { + "GL_MAX_CONVOLUTION_WIDTH_EXT": 32794, + "GL_MAX_CONVOLUTION_HEIGHT": 98385 + }, + "ColorTableParameterfvSGI": { + "GL_COLOR_TABLE_SCALE": 4, + "GL_COLOR_TABLE_SCALE_SGI": 4, + "GL_COLOR_TABLE_BIAS": 4, + "GL_COLOR_TABLE_BIAS_SGI": 4 + }, + "ColorTableParameterivSGI": { + "GL_COLOR_TABLE_SCALE": 4, + "GL_COLOR_TABLE_SCALE_SGI": 4, + "GL_COLOR_TABLE_BIAS": 4, + "GL_COLOR_TABLE_BIAS_SGI": 4 + }, + "ConvolutionParameterfvEXT": { + "GL_CONVOLUTION_BORDER_MODE": 1, + "GL_CONVOLUTION_BORDER_MODE_EXT": 1, + "GL_CONVOLUTION_FILTER_SCALE": 4, + "GL_CONVOLUTION_FILTER_SCALE_EXT": 4, + "GL_CONVOLUTION_FILTER_BIAS": 4, + "GL_CONVOLUTION_FILTER_BIAS_EXT": 4 + }, + "ConvolutionParameterivEXT": { + "GL_CONVOLUTION_BORDER_MODE": 1, + "GL_CONVOLUTION_BORDER_MODE_EXT": 1, + "GL_CONVOLUTION_FILTER_SCALE": 4, + "GL_CONVOLUTION_FILTER_SCALE_EXT": 4, + "GL_CONVOLUTION_FILTER_BIAS": 4, + "GL_CONVOLUTION_FILTER_BIAS_EXT": 4 + }, + "Fogfv": { + "GL_FOG_INDEX": 1, + "GL_FOG_DENSITY": 1, + "GL_FOG_START": 1, + "GL_FOG_END": 1, + "GL_FOG_MODE": 1, + "GL_FOG_COLOR": 4, + "GL_FOG_OFFSET_VALUE_SGIX": 4 + }, + "Fogiv": { + "GL_FOG_INDEX": 1, + "GL_FOG_DENSITY": 1, + "GL_FOG_START": 1, + "GL_FOG_END": 1, + "GL_FOG_MODE": 1, + "GL_FOG_COLOR": 4, + "GL_FOG_OFFSET_VALUE_SGIX": 4 + }, + "LightModelfv": { + "GL_LIGHT_MODEL_LOCAL_VIEWER": 1, + "GL_LIGHT_MODEL_TWO_SIDE": 1, + "GL_LIGHT_MODEL_AMBIENT": 4 + }, + "LightModeliv": { + "GL_LIGHT_MODEL_LOCAL_VIEWER": 1, + "GL_LIGHT_MODEL_TWO_SIDE": 1, + "GL_LIGHT_MODEL_AMBIENT": 4 + }, + "Lightfv": { + "GL_AMBIENT": 4, + "GL_DIFFUSE": 4, + "GL_SPECULAR": 4, + "GL_POSITION": 4, + "GL_SPOT_DIRECTION": 3, + "GL_SPOT_EXPONENT": 1, + "GL_SPOT_CUTOFF": 1, + "GL_CONSTANT_ATTENUATION": 1, + "GL_LINEAR_ATTENUATION": 1, + "GL_QUADRATIC_ATTENUATION": 1 + }, + "Lightiv": { + "GL_AMBIENT": 4, + "GL_DIFFUSE": 4, + "GL_SPECULAR": 4, + "GL_POSITION": 4, + "GL_SPOT_DIRECTION": 3, + "GL_SPOT_EXPONENT": 1, + "GL_SPOT_CUTOFF": 1, + "GL_CONSTANT_ATTENUATION": 1, + "GL_LINEAR_ATTENUATION": 1, + "GL_QUADRATIC_ATTENUATION": 1 + }, + "Materialfv": { + "GL_AMBIENT": 4, + "GL_DIFFUSE": 4, + "GL_SPECULAR": 4, + "GL_EMISSION": 4, + "GL_SHININESS": 1, + "GL_AMBIENT_AND_DIFFUSE": 4, + "GL_COLOR_INDEXES": 3 + }, + "Materialiv": { + "GL_AMBIENT": 4, + "GL_DIFFUSE": 4, + "GL_SPECULAR": 4, + "GL_EMISSION": 4, + "GL_SHININESS": 1, + "GL_AMBIENT_AND_DIFFUSE": 4, + "GL_COLOR_INDEXES": 3 + }, + "PixelTransformParameterfvSGI": { + "GL_CONVOLUTION_BORDER_MODE": 1, + "GL_CONVOLUTION_BORDER_MODE_EXT": 1, + "GL_CONVOLUTION_FILTER_SCALE": 4, + "GL_CONVOLUTION_FILTER_SCALE_EXT": 4, + "GL_CONVOLUTION_FILTER_BIAS": 4, + "GL_CONVOLUTION_FILTER_BIAS_EXT": 4, + "GL_CONVOLUTION_FORMAT": 1, + "GL_CONVOLUTION_FORMAT_EXT": 1, + "GL_CONVOLUTION_WIDTH": 1, + "GL_CONVOLUTION_WIDTH_EXT": 1, + "GL_CONVOLUTION_HEIGHT": 1, + "GL_CONVOLUTION_HEIGHT_EXT": 1, + "GL_MAX_CONVOLUTION_WIDTH": 1, + "GL_MAX_CONVOLUTION_WIDTH_EXT": 1, + "GL_MAX_CONVOLUTION_HEIGHT": 1, + "GL_MAX_CONVOLUTION_HEIGHT_EXT": 1 + }, + "PixelTransformParameterivSGI": { + "GL_CONVOLUTION_BORDER_MODE": 1, + "GL_CONVOLUTION_BORDER_MODE_EXT": 1, + "GL_CONVOLUTION_FILTER_SCALE": 4, + "GL_CONVOLUTION_FILTER_SCALE_EXT": 4, + "GL_CONVOLUTION_FILTER_BIAS": 4, + "GL_CONVOLUTION_FILTER_BIAS_EXT": 4, + "GL_CONVOLUTION_FORMAT": 1, + "GL_CONVOLUTION_FORMAT_EXT": 1, + "GL_CONVOLUTION_WIDTH": 1, + "GL_CONVOLUTION_WIDTH_EXT": 1, + "GL_CONVOLUTION_HEIGHT": 1, + "GL_CONVOLUTION_HEIGHT_EXT": 1, + "GL_MAX_CONVOLUTION_WIDTH": 1, + "GL_MAX_CONVOLUTION_WIDTH_EXT": 1, + "GL_MAX_CONVOLUTION_HEIGHT": 1, + "GL_MAX_CONVOLUTION_HEIGHT_EXT": 1 + }, + "PointParameterfvSGIS": { + "GL_POINT_SIZE_MIN_SGIS": 1, + "GL_POINT_SIZE_MAX_SGIS": 1, + "GL_POINT_FADE_THRESHOLD_SIZE_SGIS": 1, + "GL_DISTANCE_ATTENUATION_SGIS": 3 + }, + "SpriteParameterfvSGIX": { + "GL_SPRITE_MODE_SGIX": 1, + "GL_SPRITE_AXIS_SGIX": 3, + "GL_SPRITE_TRANSLATION_SGIX": 3 + }, + "SpriteParameterivSGIX": { + "GL_SPRITE_MODE_SGIX": 1, + "GL_SPRITE_AXIS_SGIX": 3, + "GL_SPRITE_TRANSLATION_SGIX": 3 + }, + "TexEnvfv": { + "GL_TEXTURE_ENV_MODE": 1, + "GL_TEXTURE_ENV_COLOR": 4 + }, + "TexEnviv": { + "GL_TEXTURE_ENV_MODE": 1, + "GL_TEXTURE_ENV_COLOR": 4 + }, + "TexGendv": { + "GL_TEXTURE_GEN_MODE": 1, + "GL_OBJECT_PLANE": 4, + "GL_EYE_PLANE": 4 + }, + "TexGenfv": { + "GL_TEXTURE_GEN_MODE": 1, + "GL_OBJECT_PLANE": 4, + "GL_EYE_PLANE": 4 + }, + "TexGeniv": { + "GL_TEXTURE_GEN_MODE": 1, + "GL_OBJECT_PLANE": 4, + "GL_EYE_PLANE": 4 + }, + "TexParameterfv": { + "GL_TEXTURE_BORDER_COLOR": 4, + "GL_TEXTURE_MAG_FILTER": 1, + "GL_TEXTURE_MIN_FILTER": 1, + "GL_TEXTURE_WRAP_S": 1, + "GL_TEXTURE_WRAP_T": 1, + "GL_TEXTURE_WRAP_R": 1, + "GL_TEXTURE_WRAP_R_EXT": 1, + "GL_DETAIL_TEXTURE_LEVEL_SGIS": 1, + "GL_DETAIL_TEXTURE_MODE_SGIS": 1, + "GL_DUAL_TEXTURE_SELECT_SGIS": 1, + "GL_QUAD_TEXTURE_SELECT_SGIS": 1, + "GL_TEXTURE_MIN_LOD": 1, + "GL_TEXTURE_MIN_LOD_SGIS": 1, + "GL_TEXTURE_MAX_LOD": 1, + "GL_TEXTURE_MAX_LOD_SGIS": 1, + "GL_TEXTURE_BASE_LEVEL": 1, + "GL_TEXTURE_BASE_LEVEL_SGIS": 1, + "GL_TEXTURE_MAX_LEVEL": 1, + "GL_TEXTURE_MAX_LEVEL_SGIS": 1, + "GL_TEXTURE_CLIPMAP_CENTER_SGIX": 2, + "GL_TEXTURE_CLIPMAP_FRAME_SGIX": 1, + "GL_TEXTURE_CLIPMAP_OFFSET_SGIX": 2, + "GL_POST_TEXTURE_FILTER_BIAS_SGIX": 4, + "GL_POST_TEXTURE_FILTER_SCALE_SGIX": 4, + "GL_TEXTURE_COMPARE_SGIX": 1, + "GL_TEXTURE_COMPARE_OPERATOR_SGIX": 1, + "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX": 3 + }, + "TexParameteriv": { + "GL_TEXTURE_BORDER_COLOR": 4, + "GL_TEXTURE_MAG_FILTER": 1, + "GL_TEXTURE_MIN_FILTER": 1, + "GL_TEXTURE_WRAP_S": 1, + "GL_TEXTURE_WRAP_T": 1, + "GL_TEXTURE_WRAP_R": 1, + "GL_TEXTURE_WRAP_R_EXT": 1, + "GL_DETAIL_TEXTURE_LEVEL_SGIS": 1, + "GL_DETAIL_TEXTURE_MODE_SGIS": 1, + "GL_DUAL_TEXTURE_SELECT_SGIS": 1, + "GL_QUAD_TEXTURE_SELECT_SGIS": 1, + "GL_TEXTURE_MIN_LOD": 1, + "GL_TEXTURE_MIN_LOD_SGIS": 1, + "GL_TEXTURE_MAX_LOD": 1, + "GL_TEXTURE_MAX_LOD_SGIS": 1, + "GL_TEXTURE_BASE_LEVEL": 1, + "GL_TEXTURE_BASE_LEVEL_SGIS": 1, + "GL_TEXTURE_MAX_LEVEL": 1, + "GL_TEXTURE_MAX_LEVEL_SGIS": 1, + "GL_TEXTURE_CLIPMAP_CENTER_SGIX": 2, + "GL_TEXTURE_CLIPMAP_FRAME_SGIX": 1, + "GL_TEXTURE_CLIPMAP_OFFSET_SGIX": 2, + "GL_POST_TEXTURE_FILTER_BIAS_SGIX": 4, + "GL_POST_TEXTURE_FILTER_SCALE_SGIX": 4, + "GL_TEXTURE_COMPARE_SGIX": 1, + "GL_TEXTURE_COMPARE_OPERATOR_SGIX": 1, + "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX": 3 + }, + "GetTexParameterfv": { + "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX": 3 + }, + "GetTexParameteriv": { + "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX": 3 + } + }, + "get_multi": { + "GL_CURRENT_COLOR": 4, + "GL_CURRENT_NORMAL": 3, + "GL_CURRENT_TEXTURE_COORDS": 4, + "GL_CURRENT_RASTER_COLOR": 4, + "GL_CURRENT_RASTER_POSITION": 4, + "GL_CURRENT_RASTER_TEXTURE_COORDS": 4, + "GL_MODELVIEW_MATRIX": 16, + "GL_PROJECTION_MATRIX": 16, + "GL_TEXTURE_MATRIX": 16, + "GL_VIEWPORT": 4, + "GL_DEPTH_RANGE": 2, + "GL_FOG_COLOR": 4, + "GL_LIGHT_MODEL_AMBIENT": 4, + "GL_POLYGON_MODE": 2, + "GL_COLOR_CLEAR_VALUE": 4, + "GL_COLOR_WRITEMASK": 4, + "GL_ACCUM_CLEAR_VALUE": 4, + "GL_SCISSOR_BOX": 4, + "GL_MAP1_GRID_DOMAIN": 2, + "GL_MAP2_GRID_DOMAIN": 4, + "GL_MAP2_GRID_SEGMENTS": 2, + "GL_MAX_VIEWPORT_DIMS": 2, + "GL_POINT_SIZE_RANGE": 2, + "GL_LINE_WIDTH_RANGE": 2, + "GL_BLEND_COLOR_EXT": 4, + "GL_BLEND_COLOR": 4, + "GL_COLOR_MATRIX_SGI": 16, + "GL_COLOR_MATRIX": 16, + "GL_DISTANCE_ATTENUATION_SGIS": 3, + "GL_FOG_OFFSET_VALUE_SGIX": 4, + "GL_SPRITE_AXIS_SGIX": 3, + "GL_SPRITE_TRANSLATION_SGIX": 3, + "GL_REFERENCE_PLANE_EQUATION_SGIX": 4 + } +} diff --git a/iris-hostgl/tools/glapi_annotations.json b/iris-hostgl/tools/glapi_annotations.json new file mode 100644 index 0000000..dc632cc --- /dev/null +++ b/iris-hostgl/tools/glapi_annotations.json @@ -0,0 +1,5597 @@ +{ + "_about": [ + "Our half of glapi.json; the other half is the Khronos OpenGL registry (khronos/gl.xml).", + "glapi_from_registry.py merges them. Everything here is ours: how each argument crosses to the", + "host (kind, counts, size tables, which calls must wait), the entry-point order -- which IS the", + "wire protocol's op numbering, so never reorder, only append -- and where IRIX 6.5's own", + "declarations differ from the registry's (irix_overrides, irix_only), which the guest's encoders", + "must follow to compile against IRIX's .", + "The size tables (sizes: values a parameter-named array holds; get_multi: values a glGet returns)", + "are the counts the OpenGL 1.1/1.2 specification's state tables and each extension's specification", + "give for those parameters." + ], + "irix_overrides": { + "glTexImage3D": { + "params": { + "2": { + "type": "GLenum" + } + }, + "why": "IRIX 6.5 declares internalformat GLenum (from EXT_texture3D); the registry has GLint. Different C types: the guest's definition must match IRIX's prototype." + }, + "glEdgeFlagPointer": { + "params": { + "1": { + "type": "GLboolean" + } + }, + "why": "IRIX 6.5 declares the pointer const GLboolean *; the registry has const void *. Different pointer types: the guest's definition must match IRIX's prototype." + } + }, + "irix_only": { + "glSelectTextureSGIS": { + "name": "glSelectTextureSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + } + ], + "why": "SGIS_multitexture, withdrawn in favour of ARB_multitexture and never in the registry; IRIX 6.5 has it and its programs use it." + }, + "glMTexCoord2fSGIS": { + "name": "glMTexCoord2fSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "s", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "t", + "ptr": 0, + "const": false + } + ], + "why": "SGIS_multitexture, as glSelectTextureSGIS." + }, + "glMTexCoord2fvSGIS": { + "name": "glMTexCoord2fvSGIS", + "ret": "void", + "params": [ + { + "type": "GLenum", + "name": "target", + "ptr": 0, + "const": false + }, + { + "type": "GLfloat", + "name": "v", + "ptr": 1, + "const": true + } + ], + "why": "SGIS_multitexture, as glSelectTextureSGIS." + } + }, + "functions": [ + { + "name": "glAccum", + "sync": false, + "ext": null + }, + { + "name": "glAlphaFunc", + "sync": false, + "ext": null + }, + { + "name": "glAreTexturesResident", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "u32", + "kind": "inline", + "count": "n" + }, + { + "elem": "u8", + "kind": "out", + "count": "n" + } + ] + }, + { + "name": "glAreTexturesResidentEXT", + "sync": true, + "ext": "EXT_texture_object", + "params": [ + {}, + { + "elem": "u32", + "kind": "inline", + "count": "n" + }, + { + "elem": "u8", + "kind": "out", + "count": "n" + } + ] + }, + { + "name": "glArrayElement", + "sync": false, + "ext": null + }, + { + "name": "glArrayElementEXT", + "sync": false, + "ext": "EXT_vertex_array" + }, + { + "name": "glBegin", + "sync": false, + "ext": null + }, + { + "name": "glBindTexture", + "sync": false, + "ext": null + }, + { + "name": "glBindTextureEXT", + "sync": false, + "ext": "EXT_texture_object" + }, + { + "name": "glBitmap", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "u8", + "kind": "image", + "dims": [ + "width", + "height" + ], + "bitmap": true + } + ] + }, + { + "name": "glBlendColor", + "sync": false, + "ext": null + }, + { + "name": "glBlendColorEXT", + "sync": false, + "ext": "EXT_blend_color" + }, + { + "name": "glBlendEquation", + "sync": false, + "ext": null + }, + { + "name": "glBlendEquationEXT", + "sync": false, + "ext": null + }, + { + "name": "glBlendFunc", + "sync": false, + "ext": null + }, + { + "name": "glCallList", + "sync": false, + "ext": null + }, + { + "name": "glCallLists", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "void", + "kind": "inline", + "count": "n", + "typed": "type" + } + ] + }, + { + "name": "glClear", + "sync": false, + "ext": null + }, + { + "name": "glClearAccum", + "sync": false, + "ext": null + }, + { + "name": "glClearColor", + "sync": false, + "ext": null + }, + { + "name": "glClearDepth", + "sync": false, + "ext": null + }, + { + "name": "glClearIndex", + "sync": false, + "ext": null + }, + { + "name": "glClearStencil", + "sync": false, + "ext": null + }, + { + "name": "glClipPlane", + "sync": false, + "ext": null, + "params": [ + {}, + { + "elem": "f64", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glColor3b", + "sync": false, + "ext": null + }, + { + "name": "glColor3bv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i8", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glColor3d", + "sync": false, + "ext": null + }, + { + "name": "glColor3dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glColor3f", + "sync": false, + "ext": null + }, + { + "name": "glColor3fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glColor3i", + "sync": false, + "ext": null + }, + { + "name": "glColor3iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glColor3s", + "sync": false, + "ext": null + }, + { + "name": "glColor3sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glColor3ub", + "sync": false, + "ext": null + }, + { + "name": "glColor3ubv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "u8", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glColor3ui", + "sync": false, + "ext": null + }, + { + "name": "glColor3uiv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "u32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glColor3us", + "sync": false, + "ext": null + }, + { + "name": "glColor3usv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "u16", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glColor4b", + "sync": false, + "ext": null + }, + { + "name": "glColor4bv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i8", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glColor4d", + "sync": false, + "ext": null + }, + { + "name": "glColor4dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glColor4f", + "sync": false, + "ext": null + }, + { + "name": "glColor4fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glColor4i", + "sync": false, + "ext": null + }, + { + "name": "glColor4iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glColor4s", + "sync": false, + "ext": null + }, + { + "name": "glColor4sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glColor4ub", + "sync": false, + "ext": null + }, + { + "name": "glColor4ubv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "u8", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glColor4ui", + "sync": false, + "ext": null + }, + { + "name": "glColor4uiv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "u32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glColor4us", + "sync": false, + "ext": null + }, + { + "name": "glColor4usv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "u16", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glColorMask", + "sync": false, + "ext": null + }, + { + "name": "glColorMaterial", + "sync": false, + "ext": null + }, + { + "name": "glColorPointer", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "Color" + } + ] + }, + { + "name": "glColorPointerEXT", + "sync": false, + "ext": "EXT_vertex_array", + "params": [ + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "Color" + } + ] + }, + { + "name": "glColorSubTable", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "count" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glColorTable", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glColorTableParameterfv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "table": "ColorTableParameterfvSGI", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glColorTableParameterfvSGI", + "sync": false, + "ext": "SGI_color_table", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "table": "ColorTableParameterfvSGI", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glColorTableParameteriv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "inline", + "table": "ColorTableParameterivSGI", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glColorTableParameterivSGI", + "sync": false, + "ext": "SGI_color_table", + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "inline", + "table": "ColorTableParameterivSGI", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glColorTableSGI", + "sync": true, + "ext": "SGI_color_table", + "params": [ + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glConvolutionFilter1D", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glConvolutionFilter1DEXT", + "sync": true, + "ext": "EXT_convolution", + "params": [ + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glConvolutionFilter2D", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glConvolutionFilter2DEXT", + "sync": true, + "ext": "EXT_convolution", + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glConvolutionParameterf", + "sync": false, + "ext": null + }, + { + "name": "glConvolutionParameterfEXT", + "sync": false, + "ext": "EXT_convolution" + }, + { + "name": "glConvolutionParameterfv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "table": "ConvolutionParameterfvEXT", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glConvolutionParameterfvEXT", + "sync": false, + "ext": "EXT_convolution", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "table": "ConvolutionParameterfvEXT", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glConvolutionParameteri", + "sync": false, + "ext": null + }, + { + "name": "glConvolutionParameteriEXT", + "sync": false, + "ext": "EXT_convolution" + }, + { + "name": "glConvolutionParameteriv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "inline", + "table": "ConvolutionParameterivEXT", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glConvolutionParameterivEXT", + "sync": false, + "ext": "EXT_convolution", + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "inline", + "table": "ConvolutionParameterivEXT", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glCopyColorSubTable", + "sync": false, + "ext": null + }, + { + "name": "glCopyColorTable", + "sync": false, + "ext": null + }, + { + "name": "glCopyColorTableSGI", + "sync": false, + "ext": "SGI_color_table" + }, + { + "name": "glCopyConvolutionFilter1D", + "sync": false, + "ext": null + }, + { + "name": "glCopyConvolutionFilter1DEXT", + "sync": false, + "ext": null + }, + { + "name": "glCopyConvolutionFilter2D", + "sync": false, + "ext": null + }, + { + "name": "glCopyConvolutionFilter2DEXT", + "sync": false, + "ext": null + }, + { + "name": "glCopyPixels", + "sync": false, + "ext": null + }, + { + "name": "glCopyTexImage1D", + "sync": false, + "ext": null + }, + { + "name": "glCopyTexImage1DEXT", + "sync": false, + "ext": "EXT_copy_texture" + }, + { + "name": "glCopyTexImage2D", + "sync": false, + "ext": null + }, + { + "name": "glCopyTexImage2DEXT", + "sync": false, + "ext": "EXT_copy_texture" + }, + { + "name": "glCopyTexSubImage1D", + "sync": false, + "ext": null + }, + { + "name": "glCopyTexSubImage1DEXT", + "sync": false, + "ext": "EXT_copy_texture" + }, + { + "name": "glCopyTexSubImage2D", + "sync": false, + "ext": null + }, + { + "name": "glCopyTexSubImage2DEXT", + "sync": false, + "ext": "EXT_copy_texture" + }, + { + "name": "glCopyTexSubImage3D", + "sync": false, + "ext": null + }, + { + "name": "glCopyTexSubImage3DEXT", + "sync": false, + "ext": "EXT_copy_texture" + }, + { + "name": "glCullFace", + "sync": false, + "ext": null + }, + { + "name": "glDeformSGIX", + "sync": false, + "ext": "SGIX_polynomial_ffd" + }, + { + "name": "glDeformationMap3dSGIX", + "sync": false, + "ext": "SGIX_polynomial_ffd", + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "f64", + "kind": "map", + "target": "target", + "orders": [ + [ + "uorder", + "ustride" + ], + [ + "vorder", + "vstride" + ], + [ + "worder", + "wstride" + ] + ] + } + ] + }, + { + "name": "glDeformationMap3fSGIX", + "sync": false, + "ext": "SGIX_polynomial_ffd", + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "f32", + "kind": "map", + "target": "target", + "orders": [ + [ + "uorder", + "ustride" + ], + [ + "vorder", + "vstride" + ], + [ + "worder", + "wstride" + ] + ] + } + ] + }, + { + "name": "glDeleteLists", + "sync": false, + "ext": null + }, + { + "name": "glDeleteTextures", + "sync": false, + "ext": null, + "params": [ + {}, + { + "elem": "u32", + "kind": "inline", + "count": "n" + } + ] + }, + { + "name": "glDeleteTexturesEXT", + "sync": false, + "ext": "EXT_texture_object", + "params": [ + {}, + { + "elem": "u32", + "kind": "inline", + "count": "n" + } + ] + }, + { + "name": "glDepthFunc", + "sync": false, + "ext": null + }, + { + "name": "glDepthMask", + "sync": false, + "ext": null + }, + { + "name": "glDepthRange", + "sync": false, + "ext": null + }, + { + "name": "glDetailTexFuncSGIS", + "sync": false, + "ext": "SGIS_detail_texture", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "count": "n*2" + } + ] + }, + { + "name": "glDisable", + "sync": false, + "ext": null + }, + { + "name": "glDisableClientState", + "sync": false, + "ext": null + }, + { + "name": "glDrawArrays", + "sync": false, + "ext": null + }, + { + "name": "glDrawArraysEXT", + "sync": false, + "ext": "EXT_vertex_array" + }, + { + "name": "glDrawBuffer", + "sync": false, + "ext": null + }, + { + "name": "glDrawElements", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "drawindices", + "count": "count", + "type_param": "type" + } + ] + }, + { + "name": "glDrawPixels", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glDrawRangeElements", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "drawindices", + "count": "count", + "type_param": "type" + } + ] + }, + { + "name": "glEdgeFlag", + "sync": false, + "ext": null + }, + { + "name": "glEdgeFlagPointer", + "sync": false, + "ext": null, + "params": [ + {}, + { + "elem": "u8", + "kind": "array", + "array": "EdgeFlag" + } + ] + }, + { + "name": "glEdgeFlagPointerEXT", + "sync": false, + "ext": "EXT_vertex_array", + "params": [ + {}, + {}, + { + "elem": "u8", + "kind": "array", + "array": "EdgeFlag" + } + ] + }, + { + "name": "glEdgeFlagv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "u8", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glEnable", + "sync": false, + "ext": null + }, + { + "name": "glEnableClientState", + "sync": false, + "ext": null + }, + { + "name": "glEnd", + "sync": false, + "ext": null + }, + { + "name": "glEndList", + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord1d", + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord1dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glEvalCoord1f", + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord1fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glEvalCoord2d", + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord2dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glEvalCoord2f", + "sync": false, + "ext": null + }, + { + "name": "glEvalCoord2fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glEvalMesh1", + "sync": false, + "ext": null + }, + { + "name": "glEvalMesh2", + "sync": false, + "ext": null + }, + { + "name": "glEvalPoint1", + "sync": false, + "ext": null + }, + { + "name": "glEvalPoint2", + "sync": false, + "ext": null + }, + { + "name": "glFeedbackBuffer", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "deferred", + "count": "size" + } + ] + }, + { + "name": "glFinish", + "sync": false, + "ext": null + }, + { + "name": "glFlush", + "sync": false, + "ext": null + }, + { + "name": "glFlushRasterSGIX", + "sync": false, + "ext": "SGIX_flush_raster" + }, + { + "name": "glFogFuncSGIS", + "sync": false, + "ext": "SGIS_fog_function", + "params": [ + {}, + { + "elem": "f32", + "kind": "inline", + "count": "n*2" + } + ] + }, + { + "name": "glFogf", + "sync": false, + "ext": null + }, + { + "name": "glFogfv", + "sync": false, + "ext": null, + "params": [ + {}, + { + "elem": "f32", + "kind": "inline", + "table": "Fogfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glFogi", + "sync": false, + "ext": null + }, + { + "name": "glFogiv", + "sync": false, + "ext": null, + "params": [ + {}, + { + "elem": "i32", + "kind": "inline", + "table": "Fogiv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glFrameZoomSGIX", + "sync": false, + "ext": "SGIX_framezoom" + }, + { + "name": "glFrontFace", + "sync": false, + "ext": null + }, + { + "name": "glFrustum", + "sync": false, + "ext": null + }, + { + "name": "glGenLists", + "sync": true, + "ext": null + }, + { + "name": "glGenTextures", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "u32", + "kind": "out", + "count": "n" + } + ] + }, + { + "name": "glGenTexturesEXT", + "sync": true, + "ext": "EXT_texture_object", + "params": [ + {}, + { + "elem": "u32", + "kind": "out", + "count": "n" + } + ] + }, + { + "name": "glGetBooleanv", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "u8", + "kind": "out", + "get": "pname" + } + ] + }, + { + "name": "glGetClipPlane", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "f64", + "kind": "out", + "count": "4" + } + ] + }, + { + "name": "glGetColorTable", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "ColorTable", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetColorTableParameterfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "table": "ColorTableParameterfvSGI", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetColorTableParameterfvSGI", + "sync": true, + "ext": "SGI_color_table", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "table": "ColorTableParameterfvSGI", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetColorTableParameteriv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "table": "ColorTableParameterivSGI", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetColorTableParameterivSGI", + "sync": true, + "ext": "SGI_color_table", + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "table": "ColorTableParameterivSGI", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetColorTableSGI", + "sync": true, + "ext": "SGI_color_table", + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "ColorTable", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetConvolutionFilter", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "ConvolutionFilter", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetConvolutionFilterEXT", + "sync": true, + "ext": "EXT_convolution", + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "ConvolutionFilter", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetConvolutionParameterfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "table": "ConvolutionParameterfvEXT", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetConvolutionParameterfvEXT", + "sync": true, + "ext": "EXT_convolution", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "table": "ConvolutionParameterfvEXT", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetConvolutionParameteriv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "table": "ConvolutionParameterivEXT", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetConvolutionParameterivEXT", + "sync": true, + "ext": "EXT_convolution", + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "table": "ConvolutionParameterivEXT", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetDetailTexFuncSGIS", + "sync": true, + "ext": "SGIS_detail_texture", + "params": [ + {}, + { + "elem": "f32", + "kind": "out", + "emulated": "DetailTexFunc" + } + ] + }, + { + "name": "glGetDoublev", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "f64", + "kind": "out", + "get": "pname" + } + ] + }, + { + "name": "glGetError", + "sync": true, + "ext": null + }, + { + "name": "glGetFloatv", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "f32", + "kind": "out", + "get": "pname" + } + ] + }, + { + "name": "glGetHistogram", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "Histogram", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetHistogramEXT", + "sync": true, + "ext": "EXT_histogram", + "params": [ + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "Histogram", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetHistogramParameterfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetHistogramParameterfvEXT", + "sync": true, + "ext": "EXT_histogram", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetHistogramParameteriv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetHistogramParameterivEXT", + "sync": true, + "ext": "EXT_histogram", + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetInstrumentsSGIX", + "sync": true, + "ext": "SGIX_instruments" + }, + { + "name": "glGetIntegerv", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "i32", + "kind": "out", + "get": "pname" + } + ] + }, + { + "name": "glGetLightfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "table": "Lightfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetLightiv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "table": "Lightiv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetListParameterfvSGIX", + "sync": true, + "ext": "SGIX_list_priority", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetListParameterivSGIX", + "sync": true, + "ext": "SGIX_list_priority", + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetMapdv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f64", + "kind": "out", + "mapquery": [ + "target", + "query" + ] + } + ] + }, + { + "name": "glGetMapfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "mapquery": [ + "target", + "query" + ] + } + ] + }, + { + "name": "glGetMapiv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "mapquery": [ + "target", + "query" + ] + } + ] + }, + { + "name": "glGetMaterialfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "table": "Materialfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetMaterialiv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "table": "Materialiv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetMinmax", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "Minmax", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetMinmaxEXT", + "sync": true, + "ext": "EXT_histogram", + "params": [ + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "Minmax", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetMinmaxParameterfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetMinmaxParameterfvEXT", + "sync": true, + "ext": "EXT_histogram", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetMinmaxParameteriv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetMinmaxParameterivEXT", + "sync": true, + "ext": "EXT_histogram", + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetPixelMapfv", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "f32", + "kind": "out", + "pixelmap": "map" + } + ] + }, + { + "name": "glGetPixelMapuiv", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "u32", + "kind": "out", + "pixelmap": "map" + } + ] + }, + { + "name": "glGetPixelMapusv", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "u16", + "kind": "out", + "pixelmap": "map" + } + ] + }, + { + "name": "glGetPointerv", + "sync": true, + "ext": null, + "params": [ + {}, + { + "elem": "void", + "kind": "out", + "pointer": "pname" + } + ] + }, + { + "name": "glGetPointervEXT", + "sync": true, + "ext": "EXT_vertex_array", + "params": [ + {}, + { + "elem": "void", + "kind": "out", + "pointer": "pname" + } + ] + }, + { + "name": "glGetPolygonStipple", + "sync": true, + "ext": null, + "params": [ + { + "elem": "u8", + "kind": "outimage", + "dims": [ + "32", + "32" + ], + "bitmap": true + } + ] + }, + { + "name": "glGetSeparableFilter", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.row", + "format_param": "format", + "type_param": "type" + }, + { + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.column", + "format_param": "format", + "type_param": "type" + }, + { + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.span", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetSeparableFilterEXT", + "sync": true, + "ext": "EXT_convolution", + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.row", + "format_param": "format", + "type_param": "type" + }, + { + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.column", + "format_param": "format", + "type_param": "type" + }, + { + "elem": "void", + "kind": "outimage", + "dims_from": "SeparableFilter.span", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetSharpenTexFuncSGIS", + "sync": true, + "ext": "SGIS_sharpen_texture", + "params": [ + {}, + { + "elem": "f32", + "kind": "out", + "emulated": "SharpenTexFunc" + } + ] + }, + { + "name": "glGetString", + "sync": true, + "ext": null + }, + { + "name": "glGetTexEnvfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "table": "TexEnvfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetTexEnviv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "table": "TexEnviv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetTexFilterFuncSGIS", + "sync": true, + "ext": "SGIS_texture_filter4", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "emulated": "TexFilterFunc" + } + ] + }, + { + "name": "glGetTexGendv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f64", + "kind": "out", + "table": "TexGendv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetTexGenfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "table": "TexGenfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetTexGeniv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "table": "TexGeniv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetTexImage", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims_from": "TexImage", + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glGetTexLevelParameterfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + { + "elem": "f32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetTexLevelParameteriv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + { + "elem": "i32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glGetTexParameterfv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "out", + "table": "TexParameterfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glGetTexParameteriv", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "out", + "table": "TexParameteriv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glHint", + "sync": false, + "ext": null + }, + { + "name": "glHistogram", + "sync": false, + "ext": null + }, + { + "name": "glHistogramEXT", + "sync": false, + "ext": "EXT_histogram" + }, + { + "name": "glIndexMask", + "sync": false, + "ext": null + }, + { + "name": "glIndexPointer", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "Index" + } + ] + }, + { + "name": "glIndexPointerEXT", + "sync": false, + "ext": "EXT_vertex_array", + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "Index" + } + ] + }, + { + "name": "glIndexd", + "sync": false, + "ext": null + }, + { + "name": "glIndexdv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glIndexf", + "sync": false, + "ext": null + }, + { + "name": "glIndexfv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glIndexi", + "sync": false, + "ext": null + }, + { + "name": "glIndexiv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glIndexs", + "sync": false, + "ext": null + }, + { + "name": "glIndexsv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glIndexub", + "sync": false, + "ext": null + }, + { + "name": "glIndexubv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "u8", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glInitNames", + "sync": false, + "ext": null + }, + { + "name": "glInstrumentsBufferSGIX", + "sync": false, + "ext": "SGIX_instruments", + "params": [ + {}, + { + "elem": "i32", + "kind": "deferred", + "count": "size" + } + ] + }, + { + "name": "glInterleavedArrays", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "Interleaved" + } + ] + }, + { + "name": "glIsEnabled", + "sync": true, + "ext": null + }, + { + "name": "glIsList", + "sync": true, + "ext": null + }, + { + "name": "glIsTexture", + "sync": true, + "ext": null + }, + { + "name": "glIsTextureEXT", + "sync": true, + "ext": "EXT_texture_object" + }, + { + "name": "glLightModelf", + "sync": false, + "ext": null + }, + { + "name": "glLightModelfv", + "sync": false, + "ext": null, + "params": [ + {}, + { + "elem": "f32", + "kind": "inline", + "table": "LightModelfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glLightModeli", + "sync": false, + "ext": null + }, + { + "name": "glLightModeliv", + "sync": false, + "ext": null, + "params": [ + {}, + { + "elem": "i32", + "kind": "inline", + "table": "LightModeliv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glLightf", + "sync": false, + "ext": null + }, + { + "name": "glLightfv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "table": "Lightfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glLighti", + "sync": false, + "ext": null + }, + { + "name": "glLightiv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "inline", + "table": "Lightiv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glLineStipple", + "sync": false, + "ext": null + }, + { + "name": "glLineWidth", + "sync": false, + "ext": null + }, + { + "name": "glListBase", + "sync": false, + "ext": null + }, + { + "name": "glListParameterfSGIX", + "sync": false, + "ext": "SGIX_list_priority" + }, + { + "name": "glListParameterfvSGIX", + "sync": false, + "ext": "SGIX_list_priority", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glListParameteriSGIX", + "sync": false, + "ext": "SGIX_list_priority" + }, + { + "name": "glListParameterivSGIX", + "sync": false, + "ext": "SGIX_list_priority", + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glLoadIdentity", + "sync": false, + "ext": null + }, + { + "name": "glLoadIdentityDeformationMapSGIX", + "sync": false, + "ext": "SGIX_polynomial_ffd" + }, + { + "name": "glLoadMatrixd", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "16" + } + ] + }, + { + "name": "glLoadMatrixf", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "16" + } + ] + }, + { + "name": "glLoadName", + "sync": false, + "ext": null + }, + { + "name": "glLogicOp", + "sync": false, + "ext": null + }, + { + "name": "glMap1d", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + { + "elem": "f64", + "kind": "map", + "target": "target", + "orders": [ + [ + "order", + "stride" + ] + ] + } + ] + }, + { + "name": "glMap1f", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + { + "elem": "f32", + "kind": "map", + "target": "target", + "orders": [ + [ + "order", + "stride" + ] + ] + } + ] + }, + { + "name": "glMap2d", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "f64", + "kind": "map", + "target": "target", + "orders": [ + [ + "uorder", + "ustride" + ], + [ + "vorder", + "vstride" + ] + ] + } + ] + }, + { + "name": "glMap2f", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "f32", + "kind": "map", + "target": "target", + "orders": [ + [ + "uorder", + "ustride" + ], + [ + "vorder", + "vstride" + ] + ] + } + ] + }, + { + "name": "glMapGrid1d", + "sync": false, + "ext": null + }, + { + "name": "glMapGrid1f", + "sync": false, + "ext": null + }, + { + "name": "glMapGrid2d", + "sync": false, + "ext": null + }, + { + "name": "glMapGrid2f", + "sync": false, + "ext": null + }, + { + "name": "glMaterialf", + "sync": false, + "ext": null + }, + { + "name": "glMaterialfv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "table": "Materialfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glMateriali", + "sync": false, + "ext": null + }, + { + "name": "glMaterialiv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "inline", + "table": "Materialiv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glMatrixMode", + "sync": false, + "ext": null + }, + { + "name": "glMinmax", + "sync": false, + "ext": null + }, + { + "name": "glMinmaxEXT", + "sync": false, + "ext": "EXT_histogram" + }, + { + "name": "glMultMatrixd", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "16" + } + ] + }, + { + "name": "glMultMatrixf", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "16" + } + ] + }, + { + "name": "glNewList", + "sync": false, + "ext": null + }, + { + "name": "glNormal3b", + "sync": false, + "ext": null + }, + { + "name": "glNormal3bv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i8", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glNormal3d", + "sync": false, + "ext": null + }, + { + "name": "glNormal3dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glNormal3f", + "sync": false, + "ext": null + }, + { + "name": "glNormal3fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glNormal3i", + "sync": false, + "ext": null + }, + { + "name": "glNormal3iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glNormal3s", + "sync": false, + "ext": null + }, + { + "name": "glNormal3sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glNormalPointer", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "Normal" + } + ] + }, + { + "name": "glNormalPointerEXT", + "sync": false, + "ext": "EXT_vertex_array", + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "Normal" + } + ] + }, + { + "name": "glOrtho", + "sync": false, + "ext": null + }, + { + "name": "glPassThrough", + "sync": false, + "ext": null + }, + { + "name": "glPixelMapfv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "count": "mapsize" + } + ] + }, + { + "name": "glPixelMapuiv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "u32", + "kind": "inline", + "count": "mapsize" + } + ] + }, + { + "name": "glPixelMapusv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "u16", + "kind": "inline", + "count": "mapsize" + } + ] + }, + { + "name": "glPixelStoref", + "sync": false, + "ext": null + }, + { + "name": "glPixelStorei", + "sync": false, + "ext": null + }, + { + "name": "glPixelTexGenSGIX", + "sync": false, + "ext": "SGIX_pixel_texture" + }, + { + "name": "glPixelTransferf", + "sync": false, + "ext": null + }, + { + "name": "glPixelTransferi", + "sync": false, + "ext": null + }, + { + "name": "glPixelZoom", + "sync": false, + "ext": null + }, + { + "name": "glPointParameterfSGIS", + "sync": false, + "ext": "SGIS_point_parameters" + }, + { + "name": "glPointParameterfvSGIS", + "sync": false, + "ext": "SGIS_point_parameters", + "params": [ + {}, + { + "elem": "f32", + "kind": "inline", + "table": "PointParameterfvSGIS", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glPointSize", + "sync": false, + "ext": null + }, + { + "name": "glPollInstrumentsSGIX", + "sync": true, + "ext": "SGIX_instruments", + "params": [ + { + "elem": "i32", + "kind": "out", + "count": "1" + } + ] + }, + { + "name": "glPolygonMode", + "sync": false, + "ext": null + }, + { + "name": "glPolygonOffset", + "sync": false, + "ext": null + }, + { + "name": "glPolygonOffsetEXT", + "sync": false, + "ext": "EXT_polygon_offset" + }, + { + "name": "glPolygonStipple", + "sync": true, + "ext": null, + "params": [ + { + "elem": "u8", + "kind": "image", + "dims": [ + "32", + "32" + ], + "bitmap": true + } + ] + }, + { + "name": "glPopAttrib", + "sync": false, + "ext": null + }, + { + "name": "glPopClientAttrib", + "sync": false, + "ext": null + }, + { + "name": "glPopMatrix", + "sync": false, + "ext": null + }, + { + "name": "glPopName", + "sync": false, + "ext": null + }, + { + "name": "glPrioritizeTextures", + "sync": false, + "ext": null, + "params": [ + {}, + { + "elem": "u32", + "kind": "inline", + "count": "n" + }, + { + "elem": "f32", + "kind": "inline", + "count": "n" + } + ] + }, + { + "name": "glPrioritizeTexturesEXT", + "sync": false, + "ext": "EXT_texture_object", + "params": [ + {}, + { + "elem": "u32", + "kind": "inline", + "count": "n" + }, + { + "elem": "f32", + "kind": "inline", + "count": "n" + } + ] + }, + { + "name": "glPushAttrib", + "sync": false, + "ext": null + }, + { + "name": "glPushClientAttrib", + "sync": false, + "ext": null + }, + { + "name": "glPushMatrix", + "sync": false, + "ext": null + }, + { + "name": "glPushName", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2d", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glRasterPos2f", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glRasterPos2i", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glRasterPos2s", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos2sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glRasterPos3d", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glRasterPos3f", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glRasterPos3i", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glRasterPos3s", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos3sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glRasterPos4d", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glRasterPos4f", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glRasterPos4i", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glRasterPos4s", + "sync": false, + "ext": null + }, + { + "name": "glRasterPos4sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glReadBuffer", + "sync": false, + "ext": null + }, + { + "name": "glReadInstrumentsSGIX", + "sync": false, + "ext": "SGIX_instruments" + }, + { + "name": "glReadPixels", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "outimage", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glRectd", + "sync": false, + "ext": null + }, + { + "name": "glRectdv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "2" + }, + { + "elem": "f64", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glRectf", + "sync": false, + "ext": null + }, + { + "name": "glRectfv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "2" + }, + { + "elem": "f32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glRecti", + "sync": false, + "ext": null + }, + { + "name": "glRectiv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "2" + }, + { + "elem": "i32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glRects", + "sync": false, + "ext": null + }, + { + "name": "glRectsv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "2" + }, + { + "elem": "i16", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glReferencePlaneSGIX", + "sync": false, + "ext": "SGIX_reference_plane", + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glRenderMode", + "sync": true, + "ext": null + }, + { + "name": "glResetHistogram", + "sync": false, + "ext": null + }, + { + "name": "glResetHistogramEXT", + "sync": false, + "ext": "EXT_histogram" + }, + { + "name": "glResetMinmax", + "sync": false, + "ext": null + }, + { + "name": "glResetMinmaxEXT", + "sync": false, + "ext": "EXT_histogram" + }, + { + "name": "glRotated", + "sync": false, + "ext": null + }, + { + "name": "glRotatef", + "sync": false, + "ext": null + }, + { + "name": "glSampleMaskSGIS", + "sync": false, + "ext": "SGIS_multisample" + }, + { + "name": "glSamplePatternSGIS", + "sync": false, + "ext": "SGIS_multisample" + }, + { + "name": "glScaled", + "sync": false, + "ext": null + }, + { + "name": "glScalef", + "sync": false, + "ext": null + }, + { + "name": "glScissor", + "sync": false, + "ext": null + }, + { + "name": "glSelectBuffer", + "sync": false, + "ext": null, + "params": [ + {}, + { + "elem": "u32", + "kind": "deferred", + "count": "size" + } + ] + }, + { + "name": "glSeparableFilter2D", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + }, + { + "elem": "void", + "kind": "image", + "dims": [ + "height" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glSeparableFilter2DEXT", + "sync": true, + "ext": "EXT_convolution", + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + }, + { + "elem": "void", + "kind": "image", + "dims": [ + "height" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glShadeModel", + "sync": false, + "ext": null + }, + { + "name": "glSharpenTexFuncSGIS", + "sync": false, + "ext": "SGIS_sharpen_texture", + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "count": "n*2" + } + ] + }, + { + "name": "glSpriteParameterfSGIX", + "sync": false, + "ext": "SGIX_sprite" + }, + { + "name": "glSpriteParameterfvSGIX", + "sync": false, + "ext": "SGIX_sprite", + "params": [ + {}, + { + "elem": "f32", + "kind": "inline", + "table": "SpriteParameterfvSGIX", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glSpriteParameteriSGIX", + "sync": false, + "ext": "SGIX_sprite" + }, + { + "name": "glSpriteParameterivSGIX", + "sync": false, + "ext": "SGIX_sprite", + "params": [ + {}, + { + "elem": "i32", + "kind": "inline", + "table": "SpriteParameterivSGIX", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glStartInstrumentsSGIX", + "sync": false, + "ext": "SGIX_instruments" + }, + { + "name": "glStencilFunc", + "sync": false, + "ext": null + }, + { + "name": "glStencilMask", + "sync": false, + "ext": null + }, + { + "name": "glStencilOp", + "sync": false, + "ext": null + }, + { + "name": "glStopInstrumentsSGIX", + "sync": false, + "ext": "SGIX_instruments" + }, + { + "name": "glTagSampleBufferSGIX", + "sync": false, + "ext": "SGIX_tag_sample_buffer" + }, + { + "name": "glTexCoord1d", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glTexCoord1f", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glTexCoord1i", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glTexCoord1s", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord1sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glTexCoord2d", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glTexCoord2f", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glTexCoord2i", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glTexCoord2s", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord2sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glTexCoord3d", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glTexCoord3f", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glTexCoord3i", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glTexCoord3s", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord3sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glTexCoord4d", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glTexCoord4f", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glTexCoord4i", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glTexCoord4s", + "sync": false, + "ext": null + }, + { + "name": "glTexCoord4sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glTexCoordPointer", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "TexCoord" + } + ] + }, + { + "name": "glTexCoordPointerEXT", + "sync": false, + "ext": "EXT_vertex_array", + "params": [ + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "TexCoord" + } + ] + }, + { + "name": "glTexEnvf", + "sync": false, + "ext": null + }, + { + "name": "glTexEnvfv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "table": "TexEnvfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glTexEnvi", + "sync": false, + "ext": null + }, + { + "name": "glTexEnviv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "inline", + "table": "TexEnviv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glTexFilterFuncSGIS", + "sync": false, + "ext": "SGIS_texture_filter4", + "params": [ + {}, + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "count": "n" + } + ] + }, + { + "name": "glTexGend", + "sync": false, + "ext": null + }, + { + "name": "glTexGendv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f64", + "kind": "inline", + "table": "TexGendv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glTexGenf", + "sync": false, + "ext": null + }, + { + "name": "glTexGenfv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "table": "TexGenfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glTexGeni", + "sync": false, + "ext": null + }, + { + "name": "glTexGeniv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "inline", + "table": "TexGeniv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glTexImage1D", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexImage2D", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexImage3D", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexImage3DEXT", + "sync": true, + "ext": "EXT_texture3D", + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexImage4DSGIS", + "sync": true, + "ext": "SGIS_texture4D", + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth", + "size4d" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexParameterf", + "sync": false, + "ext": null + }, + { + "name": "glTexParameterfv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "f32", + "kind": "inline", + "table": "TexParameterfv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glTexParameteri", + "sync": false, + "ext": null + }, + { + "name": "glTexParameteriv", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + { + "elem": "i32", + "kind": "inline", + "table": "TexParameteriv", + "key": "pname", + "default": 1 + } + ] + }, + { + "name": "glTexSubImage1D", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexSubImage1DEXT", + "sync": true, + "ext": "EXT_subtexture", + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexSubImage2D", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexSubImage2DEXT", + "sync": true, + "ext": "EXT_subtexture", + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexSubImage3D", + "sync": true, + "ext": null, + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexSubImage3DEXT", + "sync": true, + "ext": "EXT_texture3D", + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTexSubImage4DSGIS", + "sync": true, + "ext": "SGIS_texture4D", + "params": [ + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "image", + "dims": [ + "width", + "height", + "depth", + "size4d" + ], + "format_param": "format", + "type_param": "type" + } + ] + }, + { + "name": "glTranslated", + "sync": false, + "ext": null + }, + { + "name": "glTranslatef", + "sync": false, + "ext": null + }, + { + "name": "glVertex2d", + "sync": false, + "ext": null + }, + { + "name": "glVertex2dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glVertex2f", + "sync": false, + "ext": null + }, + { + "name": "glVertex2fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glVertex2i", + "sync": false, + "ext": null + }, + { + "name": "glVertex2iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glVertex2s", + "sync": false, + "ext": null + }, + { + "name": "glVertex2sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glVertex3d", + "sync": false, + "ext": null + }, + { + "name": "glVertex3dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glVertex3f", + "sync": false, + "ext": null + }, + { + "name": "glVertex3fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glVertex3i", + "sync": false, + "ext": null + }, + { + "name": "glVertex3iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glVertex3s", + "sync": false, + "ext": null + }, + { + "name": "glVertex3sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glVertex4d", + "sync": false, + "ext": null + }, + { + "name": "glVertex4dv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f64", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glVertex4f", + "sync": false, + "ext": null + }, + { + "name": "glVertex4fv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "f32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glVertex4i", + "sync": false, + "ext": null + }, + { + "name": "glVertex4iv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glVertex4s", + "sync": false, + "ext": null + }, + { + "name": "glVertex4sv", + "sync": false, + "ext": null, + "params": [ + { + "elem": "i16", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glVertexPointer", + "sync": false, + "ext": null, + "params": [ + {}, + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "Vertex" + } + ] + }, + { + "name": "glVertexPointerEXT", + "sync": false, + "ext": "EXT_vertex_array", + "params": [ + {}, + {}, + {}, + {}, + { + "elem": "void", + "kind": "array", + "array": "Vertex" + } + ] + }, + { + "name": "glViewport", + "sync": false, + "ext": null + }, + { + "name": "glActiveTextureARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glClientActiveTextureARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1dARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1dvARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "f64", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glMultiTexCoord1fARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1fvARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "f32", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glMultiTexCoord1iARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1ivARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "i32", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glMultiTexCoord1sARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord1svARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "i16", + "kind": "inline", + "count": "1" + } + ] + }, + { + "name": "glMultiTexCoord2dARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2dvARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "f64", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glMultiTexCoord2fARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2fvARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "f32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glMultiTexCoord2iARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2ivARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "i32", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glMultiTexCoord2sARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord2svARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "i16", + "kind": "inline", + "count": "2" + } + ] + }, + { + "name": "glMultiTexCoord3dARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3dvARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "f64", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glMultiTexCoord3fARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3fvARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "f32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glMultiTexCoord3iARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3ivARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "i32", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glMultiTexCoord3sARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord3svARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "i16", + "kind": "inline", + "count": "3" + } + ] + }, + { + "name": "glMultiTexCoord4dARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4dvARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "f64", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glMultiTexCoord4fARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4fvARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "f32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glMultiTexCoord4iARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4ivARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "i32", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glMultiTexCoord4sARB", + "sync": false, + "ext": "ARB_multitexture" + }, + { + "name": "glMultiTexCoord4svARB", + "sync": false, + "ext": "ARB_multitexture", + "params": [ + {}, + { + "elem": "i16", + "kind": "inline", + "count": "4" + } + ] + }, + { + "name": "glSelectTextureSGIS", + "sync": false, + "ext": "SGIS_multitexture" + }, + { + "name": "glMTexCoord2fSGIS", + "sync": false, + "ext": "SGIS_multitexture" + }, + { + "name": "glMTexCoord2fvSGIS", + "sync": false, + "ext": "SGIS_multitexture", + "params": [ + {}, + { + "elem": "f32", + "kind": "inline", + "count": "2" + } + ] + } + ], + "extensions": [ + "EXT_abgr", + "EXT_blend_color", + "EXT_blend_logic_op", + "EXT_blend_minmax", + "EXT_blend_subtract", + "EXT_cmyka", + "EXT_convolution", + "EXT_copy_texture", + "EXT_histogram", + "EXT_packed_pixels", + "EXT_polygon_offset", + "EXT_rescale_normal", + "EXT_subtexture", + "EXT_texture", + "EXT_texture3D", + "EXT_texture_object", + "EXT_vertex_array", + "SGIS_detail_texture", + "SGIS_fog_function", + "SGIS_generate_mipmap", + "SGIS_multisample", + "SGIS_point_line_texgen", + "SGIS_point_parameters", + "SGIS_sharpen_texture", + "SGIS_texture4D", + "SGIS_texture_border_clamp", + "SGIS_texture_edge_clamp", + "SGIS_texture_filter4", + "SGIS_texture_lod", + "SGIS_texture_select", + "SGIX_calligraphic_fragment", + "SGIX_clipmap", + "SGIX_depth_texture", + "SGIX_flush_raster", + "SGIX_fog_offset", + "SGIX_framezoom", + "SGIX_impact_pixel_texture", + "SGIX_instruments", + "SGIX_interlace", + "SGIX_ir_instrument1", + "SGIX_list_priority", + "SGIX_pixel_texture", + "SGIX_pixel_tiles", + "SGIX_polynomial_ffd", + "SGIX_reference_plane", + "SGIX_shadow", + "SGIX_shadow_ambient", + "SGIX_sprite", + "SGIX_tag_sample_buffer", + "SGIX_texture_add_env", + "SGIX_texture_lod_bias", + "SGIX_texture_multi_buffer", + "SGIX_texture_scale_bias", + "SGIX_ycrcb", + "SGI_color_matrix", + "SGI_color_table", + "SGI_fft", + "SGI_texture_color_table", + "ARB_multitexture", + "SGIS_multitexture" + ], + "sizes": { + "CallLists": { + "GL_MAX_CONVOLUTION_WIDTH_EXT": 32794, + "GL_MAX_CONVOLUTION_HEIGHT": 98385 + }, + "ColorTableParameterfvSGI": { + "GL_COLOR_TABLE_SCALE": 4, + "GL_COLOR_TABLE_SCALE_SGI": 4, + "GL_COLOR_TABLE_BIAS": 4, + "GL_COLOR_TABLE_BIAS_SGI": 4 + }, + "ColorTableParameterivSGI": { + "GL_COLOR_TABLE_SCALE": 4, + "GL_COLOR_TABLE_SCALE_SGI": 4, + "GL_COLOR_TABLE_BIAS": 4, + "GL_COLOR_TABLE_BIAS_SGI": 4 + }, + "ConvolutionParameterfvEXT": { + "GL_CONVOLUTION_BORDER_MODE": 1, + "GL_CONVOLUTION_BORDER_MODE_EXT": 1, + "GL_CONVOLUTION_FILTER_SCALE": 4, + "GL_CONVOLUTION_FILTER_SCALE_EXT": 4, + "GL_CONVOLUTION_FILTER_BIAS": 4, + "GL_CONVOLUTION_FILTER_BIAS_EXT": 4 + }, + "ConvolutionParameterivEXT": { + "GL_CONVOLUTION_BORDER_MODE": 1, + "GL_CONVOLUTION_BORDER_MODE_EXT": 1, + "GL_CONVOLUTION_FILTER_SCALE": 4, + "GL_CONVOLUTION_FILTER_SCALE_EXT": 4, + "GL_CONVOLUTION_FILTER_BIAS": 4, + "GL_CONVOLUTION_FILTER_BIAS_EXT": 4 + }, + "Fogfv": { + "GL_FOG_INDEX": 1, + "GL_FOG_DENSITY": 1, + "GL_FOG_START": 1, + "GL_FOG_END": 1, + "GL_FOG_MODE": 1, + "GL_FOG_COLOR": 4, + "GL_FOG_OFFSET_VALUE_SGIX": 4 + }, + "Fogiv": { + "GL_FOG_INDEX": 1, + "GL_FOG_DENSITY": 1, + "GL_FOG_START": 1, + "GL_FOG_END": 1, + "GL_FOG_MODE": 1, + "GL_FOG_COLOR": 4, + "GL_FOG_OFFSET_VALUE_SGIX": 4 + }, + "LightModelfv": { + "GL_LIGHT_MODEL_LOCAL_VIEWER": 1, + "GL_LIGHT_MODEL_TWO_SIDE": 1, + "GL_LIGHT_MODEL_AMBIENT": 4 + }, + "LightModeliv": { + "GL_LIGHT_MODEL_LOCAL_VIEWER": 1, + "GL_LIGHT_MODEL_TWO_SIDE": 1, + "GL_LIGHT_MODEL_AMBIENT": 4 + }, + "Lightfv": { + "GL_AMBIENT": 4, + "GL_DIFFUSE": 4, + "GL_SPECULAR": 4, + "GL_POSITION": 4, + "GL_SPOT_DIRECTION": 3, + "GL_SPOT_EXPONENT": 1, + "GL_SPOT_CUTOFF": 1, + "GL_CONSTANT_ATTENUATION": 1, + "GL_LINEAR_ATTENUATION": 1, + "GL_QUADRATIC_ATTENUATION": 1 + }, + "Lightiv": { + "GL_AMBIENT": 4, + "GL_DIFFUSE": 4, + "GL_SPECULAR": 4, + "GL_POSITION": 4, + "GL_SPOT_DIRECTION": 3, + "GL_SPOT_EXPONENT": 1, + "GL_SPOT_CUTOFF": 1, + "GL_CONSTANT_ATTENUATION": 1, + "GL_LINEAR_ATTENUATION": 1, + "GL_QUADRATIC_ATTENUATION": 1 + }, + "Materialfv": { + "GL_AMBIENT": 4, + "GL_DIFFUSE": 4, + "GL_SPECULAR": 4, + "GL_EMISSION": 4, + "GL_SHININESS": 1, + "GL_AMBIENT_AND_DIFFUSE": 4, + "GL_COLOR_INDEXES": 3 + }, + "Materialiv": { + "GL_AMBIENT": 4, + "GL_DIFFUSE": 4, + "GL_SPECULAR": 4, + "GL_EMISSION": 4, + "GL_SHININESS": 1, + "GL_AMBIENT_AND_DIFFUSE": 4, + "GL_COLOR_INDEXES": 3 + }, + "PixelTransformParameterfvSGI": { + "GL_CONVOLUTION_BORDER_MODE": 1, + "GL_CONVOLUTION_BORDER_MODE_EXT": 1, + "GL_CONVOLUTION_FILTER_SCALE": 4, + "GL_CONVOLUTION_FILTER_SCALE_EXT": 4, + "GL_CONVOLUTION_FILTER_BIAS": 4, + "GL_CONVOLUTION_FILTER_BIAS_EXT": 4, + "GL_CONVOLUTION_FORMAT": 1, + "GL_CONVOLUTION_FORMAT_EXT": 1, + "GL_CONVOLUTION_WIDTH": 1, + "GL_CONVOLUTION_WIDTH_EXT": 1, + "GL_CONVOLUTION_HEIGHT": 1, + "GL_CONVOLUTION_HEIGHT_EXT": 1, + "GL_MAX_CONVOLUTION_WIDTH": 1, + "GL_MAX_CONVOLUTION_WIDTH_EXT": 1, + "GL_MAX_CONVOLUTION_HEIGHT": 1, + "GL_MAX_CONVOLUTION_HEIGHT_EXT": 1 + }, + "PixelTransformParameterivSGI": { + "GL_CONVOLUTION_BORDER_MODE": 1, + "GL_CONVOLUTION_BORDER_MODE_EXT": 1, + "GL_CONVOLUTION_FILTER_SCALE": 4, + "GL_CONVOLUTION_FILTER_SCALE_EXT": 4, + "GL_CONVOLUTION_FILTER_BIAS": 4, + "GL_CONVOLUTION_FILTER_BIAS_EXT": 4, + "GL_CONVOLUTION_FORMAT": 1, + "GL_CONVOLUTION_FORMAT_EXT": 1, + "GL_CONVOLUTION_WIDTH": 1, + "GL_CONVOLUTION_WIDTH_EXT": 1, + "GL_CONVOLUTION_HEIGHT": 1, + "GL_CONVOLUTION_HEIGHT_EXT": 1, + "GL_MAX_CONVOLUTION_WIDTH": 1, + "GL_MAX_CONVOLUTION_WIDTH_EXT": 1, + "GL_MAX_CONVOLUTION_HEIGHT": 1, + "GL_MAX_CONVOLUTION_HEIGHT_EXT": 1 + }, + "PointParameterfvSGIS": { + "GL_POINT_SIZE_MIN_SGIS": 1, + "GL_POINT_SIZE_MAX_SGIS": 1, + "GL_POINT_FADE_THRESHOLD_SIZE_SGIS": 1, + "GL_DISTANCE_ATTENUATION_SGIS": 3 + }, + "SpriteParameterfvSGIX": { + "GL_SPRITE_MODE_SGIX": 1, + "GL_SPRITE_AXIS_SGIX": 3, + "GL_SPRITE_TRANSLATION_SGIX": 3 + }, + "SpriteParameterivSGIX": { + "GL_SPRITE_MODE_SGIX": 1, + "GL_SPRITE_AXIS_SGIX": 3, + "GL_SPRITE_TRANSLATION_SGIX": 3 + }, + "TexEnvfv": { + "GL_TEXTURE_ENV_MODE": 1, + "GL_TEXTURE_ENV_COLOR": 4 + }, + "TexEnviv": { + "GL_TEXTURE_ENV_MODE": 1, + "GL_TEXTURE_ENV_COLOR": 4 + }, + "TexGendv": { + "GL_TEXTURE_GEN_MODE": 1, + "GL_OBJECT_PLANE": 4, + "GL_EYE_PLANE": 4 + }, + "TexGenfv": { + "GL_TEXTURE_GEN_MODE": 1, + "GL_OBJECT_PLANE": 4, + "GL_EYE_PLANE": 4 + }, + "TexGeniv": { + "GL_TEXTURE_GEN_MODE": 1, + "GL_OBJECT_PLANE": 4, + "GL_EYE_PLANE": 4 + }, + "TexParameterfv": { + "GL_TEXTURE_BORDER_COLOR": 4, + "GL_TEXTURE_MAG_FILTER": 1, + "GL_TEXTURE_MIN_FILTER": 1, + "GL_TEXTURE_WRAP_S": 1, + "GL_TEXTURE_WRAP_T": 1, + "GL_TEXTURE_WRAP_R": 1, + "GL_TEXTURE_WRAP_R_EXT": 1, + "GL_DETAIL_TEXTURE_LEVEL_SGIS": 1, + "GL_DETAIL_TEXTURE_MODE_SGIS": 1, + "GL_DUAL_TEXTURE_SELECT_SGIS": 1, + "GL_QUAD_TEXTURE_SELECT_SGIS": 1, + "GL_TEXTURE_MIN_LOD": 1, + "GL_TEXTURE_MIN_LOD_SGIS": 1, + "GL_TEXTURE_MAX_LOD": 1, + "GL_TEXTURE_MAX_LOD_SGIS": 1, + "GL_TEXTURE_BASE_LEVEL": 1, + "GL_TEXTURE_BASE_LEVEL_SGIS": 1, + "GL_TEXTURE_MAX_LEVEL": 1, + "GL_TEXTURE_MAX_LEVEL_SGIS": 1, + "GL_TEXTURE_CLIPMAP_CENTER_SGIX": 2, + "GL_TEXTURE_CLIPMAP_FRAME_SGIX": 1, + "GL_TEXTURE_CLIPMAP_OFFSET_SGIX": 2, + "GL_POST_TEXTURE_FILTER_BIAS_SGIX": 4, + "GL_POST_TEXTURE_FILTER_SCALE_SGIX": 4, + "GL_TEXTURE_COMPARE_SGIX": 1, + "GL_TEXTURE_COMPARE_OPERATOR_SGIX": 1, + "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX": 3 + }, + "TexParameteriv": { + "GL_TEXTURE_BORDER_COLOR": 4, + "GL_TEXTURE_MAG_FILTER": 1, + "GL_TEXTURE_MIN_FILTER": 1, + "GL_TEXTURE_WRAP_S": 1, + "GL_TEXTURE_WRAP_T": 1, + "GL_TEXTURE_WRAP_R": 1, + "GL_TEXTURE_WRAP_R_EXT": 1, + "GL_DETAIL_TEXTURE_LEVEL_SGIS": 1, + "GL_DETAIL_TEXTURE_MODE_SGIS": 1, + "GL_DUAL_TEXTURE_SELECT_SGIS": 1, + "GL_QUAD_TEXTURE_SELECT_SGIS": 1, + "GL_TEXTURE_MIN_LOD": 1, + "GL_TEXTURE_MIN_LOD_SGIS": 1, + "GL_TEXTURE_MAX_LOD": 1, + "GL_TEXTURE_MAX_LOD_SGIS": 1, + "GL_TEXTURE_BASE_LEVEL": 1, + "GL_TEXTURE_BASE_LEVEL_SGIS": 1, + "GL_TEXTURE_MAX_LEVEL": 1, + "GL_TEXTURE_MAX_LEVEL_SGIS": 1, + "GL_TEXTURE_CLIPMAP_CENTER_SGIX": 2, + "GL_TEXTURE_CLIPMAP_FRAME_SGIX": 1, + "GL_TEXTURE_CLIPMAP_OFFSET_SGIX": 2, + "GL_POST_TEXTURE_FILTER_BIAS_SGIX": 4, + "GL_POST_TEXTURE_FILTER_SCALE_SGIX": 4, + "GL_TEXTURE_COMPARE_SGIX": 1, + "GL_TEXTURE_COMPARE_OPERATOR_SGIX": 1, + "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX": 3 + }, + "GetTexParameterfv": { + "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX": 3 + }, + "GetTexParameteriv": { + "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX": 3 + } + }, + "get_multi": { + "GL_CURRENT_COLOR": 4, + "GL_CURRENT_NORMAL": 3, + "GL_CURRENT_TEXTURE_COORDS": 4, + "GL_CURRENT_RASTER_COLOR": 4, + "GL_CURRENT_RASTER_POSITION": 4, + "GL_CURRENT_RASTER_TEXTURE_COORDS": 4, + "GL_MODELVIEW_MATRIX": 16, + "GL_PROJECTION_MATRIX": 16, + "GL_TEXTURE_MATRIX": 16, + "GL_VIEWPORT": 4, + "GL_DEPTH_RANGE": 2, + "GL_FOG_COLOR": 4, + "GL_LIGHT_MODEL_AMBIENT": 4, + "GL_POLYGON_MODE": 2, + "GL_COLOR_CLEAR_VALUE": 4, + "GL_COLOR_WRITEMASK": 4, + "GL_ACCUM_CLEAR_VALUE": 4, + "GL_SCISSOR_BOX": 4, + "GL_MAP1_GRID_DOMAIN": 2, + "GL_MAP2_GRID_DOMAIN": 4, + "GL_MAP2_GRID_SEGMENTS": 2, + "GL_MAX_VIEWPORT_DIMS": 2, + "GL_POINT_SIZE_RANGE": 2, + "GL_LINE_WIDTH_RANGE": 2, + "GL_BLEND_COLOR_EXT": 4, + "GL_BLEND_COLOR": 4, + "GL_COLOR_MATRIX_SGI": 16, + "GL_COLOR_MATRIX": 16, + "GL_DISTANCE_ATTENUATION_SGIS": 3, + "GL_FOG_OFFSET_VALUE_SGIX": 4, + "GL_SPRITE_AXIS_SGIX": 3, + "GL_SPRITE_TRANSLATION_SGIX": 3, + "GL_REFERENCE_PLANE_EQUATION_SGIX": 4 + } +} \ No newline at end of file diff --git a/iris-hostgl/tools/glapi_from_registry.py b/iris-hostgl/tools/glapi_from_registry.py new file mode 100644 index 0000000..af785f3 --- /dev/null +++ b/iris-hostgl/tools/glapi_from_registry.py @@ -0,0 +1,129 @@ +#!/usr/bin/env python3 +"""Build glapi.json from the Khronos OpenGL registry and our annotations. + + python3 iris-hostgl/tools/glapi_from_registry.py + +glapi.json, which glshim.py generates both halves of the host GL wire protocol +from, is two things merged: + + khronos/gl.xml the OpenGL API Registry (Khronos, Apache-2.0: see + khronos/README.md), pinned: every entry point's + declaration -- return type, parameter names and + types -- and every enumerant's value + glapi_annotations.json ours: the entry points the protocol carries and in + what order (the order IS the op numbering: append, + never reorder), how each argument crosses to the + host, the size tables, and where IRIX 6.5's own + declarations differ from the registry's + +The registry describes today's OpenGL; IRIX 6.5 shipped an earlier one. Where +the two disagree in a way the guest's C must follow -- it is compiled against +IRIX's own -- the annotations say so, with the reason +(irix_overrides), and entry points IRIX has that the registry never listed +come from them whole (irix_only). Everything else is taken as the registry +has it: parameter names (glDrawBuffer's `mode` is `buf` there), and types +that are the same C type under another name (GLclampf is GLfloat, GLvoid is +void). A merge that would silently change the protocol stops instead: a +function the registry lacks and the annotations do not supply, a parameter +count that differs, a size-table enumerant with no value. +""" +import json +import os +import re +import sys +import xml.etree.ElementTree as ET + +HERE = os.path.dirname(os.path.abspath(__file__)) + + +def fail(msg): + raise SystemExit(f"glapi_from_registry.py: {msg}") + + +def decl(elem): + """name, base type, pointer depth, const -- from a or .""" + name = elem.find("name").text + text = "".join(elem.itertext()) + before = text[: text.rfind(name)] + ptr = before.count("*") + const = "const" in before.replace("*", " ").split() + ptype = elem.find("ptype") + base = ptype.text if ptype is not None else re.sub(r"\bconst\b|\*", "", before).strip() + return name, base, ptr, const + + +def load_registry(path): + root = ET.parse(path).getroot() + commands = {} + for cmd in root.iter("command"): + proto = cmd.find("proto") + if proto is None: + continue # a reference in a list, not a declaration + name, base, ptr, const = decl(proto) + ret = ("const " if const else "") + base + (" " + "*" * ptr if ptr else "") + params = [] + for p in cmd.findall("param"): + pname, pbase, pptr, pconst = decl(p) + params.append({"type": pbase, "name": pname, "ptr": pptr, "const": pconst}) + commands[name] = {"ret": ret, "params": params} + enums = {} + for e in root.iter("enum"): + if e.get("name") and e.get("value") and e.get("api") in (None, "gl"): + enums.setdefault(e.get("name"), int(e.get("value"), 0)) + return commands, enums + + +def main(): + commands, reg_enums = load_registry(os.path.join(HERE, "khronos", "gl.xml")) + ann = json.load(open(os.path.join(HERE, "glapi_annotations.json"))) + overrides = ann["irix_overrides"] + irix_only = ann["irix_only"] + + functions = [] + for a in ann["functions"]: + name = a["name"] + if name in irix_only: + src = irix_only[name] + d = {"ret": src["ret"], "params": [dict(p) for p in src["params"]]} + elif name in commands: + d = {"ret": commands[name]["ret"], "params": [dict(p) for p in commands[name]["params"]]} + else: + fail(f"{name} is in the annotations but not in the registry or irix_only") + for idx, change in overrides.get(name, {}).get("params", {}).items(): + d["params"][int(idx)].update(change) + extra = a.get("params", []) + if extra and len(extra) != len(d["params"]): + fail(f"{name}: the registry has {len(d['params'])} parameters, the annotations {len(extra)}") + for p, x in zip(d["params"], extra): + p.update(x) + names = {p["name"] for p in d["params"]} + # Annotations name other parameters (counts, keys, formats): each must + # still be one after the registry's renames. + for p in d["params"]: + refs = [p.get(k) for k in ("key", "format_param", "type_param", "target", "get", "typed", "pixelmap")] + refs += [w for o in p.get("orders", []) for w in o] + list(p.get("mapquery", [])) + refs += re.findall(r"[A-Za-z_]\w*", str(p.get("count", ""))) + refs += [w for w in p.get("dims", []) if re.fullmatch(r"[A-Za-z_]\w*", str(w))] + for r in refs: + if isinstance(r, str) and r and r not in names: + fail(f"{name}: an annotation names `{r}`, which is not one of its parameters {sorted(names)}") + functions.append({"name": name, "ret": d["ret"], "params": d["params"], "sync": a["sync"], "ext": a["ext"]}) + + # Enumerant values, from the registry, for every name the tables use. + needed = {e for t in ann["sizes"].values() for e in t} | set(ann["get_multi"]) + missing = sorted(e for e in needed if e not in reg_enums) + if missing: + fail(f"size-table enumerants the registry has no value for: {missing}") + enums = {e: reg_enums[e] for e in sorted(needed)} + + out = {"functions": functions, "enums": enums, "extensions": ann["extensions"], + "sizes": ann["sizes"], "get_multi": ann["get_multi"]} + with open(os.path.join(HERE, "glapi.json"), "w") as f: + json.dump(out, f, indent=1) + f.write("\n") + print(f"glapi.json: {len(functions)} entry points ({len(irix_only)} IRIX-only, " + f"{len(overrides)} with IRIX overrides), {len(enums)} enumerants") + + +if __name__ == "__main__": + main() diff --git a/iris-hostgl/tools/glshim.py b/iris-hostgl/tools/glshim.py new file mode 100644 index 0000000..90c58eb --- /dev/null +++ b/iris-hostgl/tools/glshim.py @@ -0,0 +1,663 @@ +#!/usr/bin/env python3 +"""Generate both halves of the batched host OpenGL from tools/glapi.json. + + python3 iris-hostgl/tools/glshim.py + IRIS_GUEST_TOOLS=path/to/iris-guest-tools python3 iris-hostgl/tools/glshim.py + +glapi.json describes every entry point the protocol carries and how each +argument crosses. It is generated by glapi_from_registry.py from the Khronos +OpenGL registry (khronos/gl.xml: declarations and enumerant values) and our +own glapi_annotations.json (the order, which is the op numbering; how +arguments cross; the size tables; where IRIX 6.5's declarations differ from +the registry's). Edit those, not glapi.json. This writes: + + iris-hostgl/src/calls.rs the decoder: each command's arguments turned back + into a call on the host's OpenGL, and the host's + size tables + +and, when IRIS_GUEST_TOOLS names a checkout of the iris-guest-tools project +(the code that runs in IRIX, kept apart from the emulator), the guest's half: + + gl/glshim_ops.h the entry point numbers + gl/glshim_gen.c one encoder per entry point, and the size tables + the encoders need (SGI's pname sizes, glCallLists + types, evaluator components) + +The wire format is described in iris-guest-tools' gl/glshim.h. Both halves come +from the one description, so they agree on every offset: never change one +without regenerating the other, and commit both. IRIS owns the contract; the +HELLO handshake's PROTOCOL number is what a library and an emulator from +different points check each other with. +""" +import json +import os +import re + +HERE = os.path.dirname(os.path.abspath(__file__)) + +# Written by hand in iris-guest-tools' gl/glshim_rt.c (or glshim_glx.c), not generated: +# glArrayElement expands into ordinary vertex calls in the guest, so a client +# array is read when the call is made; glGetPointerv answers from the shim's own +# record; glGetString copies a host string into the guest. +GUEST_HANDWRITTEN = { + "glArrayElement", "glArrayElementEXT", "glGetPointerv", "glGetPointervEXT", "glGetString", + # glFlush and glFinish are where a GLX pixmap's pixels reach the X pixmap. + "glFlush", "glFinish", +} + +# Calls that must reach the host before returning although no argument says +# so: draws that read client arrays where they are. +FORCE_SYNC = {"glDrawArrays", "glDrawArraysEXT", "glFinish", "glFlush", "glFlushRasterSGIX"} + +# Guest-side bookkeeping a stub does before encoding, for the calls whose +# state glArrayElement and glGetPointerv answer from. +GUEST_HOOKS = { + "glEnableClientState": "hgl_client_state(array, 1);", + "glDisableClientState": "hgl_client_state(array, 0);", + "glVertexPointer": "hgl_array_pointer(HGL_ARRAY_VERTEX, size, type, stride, pointer);", + "glVertexPointerEXT": "hgl_array_pointer(HGL_ARRAY_VERTEX, size, type, stride, pointer);", + "glNormalPointer": "hgl_array_pointer(HGL_ARRAY_NORMAL, 3, type, stride, pointer);", + "glNormalPointerEXT": "hgl_array_pointer(HGL_ARRAY_NORMAL, 3, type, stride, pointer);", + "glColorPointer": "hgl_array_pointer(HGL_ARRAY_COLOR, size, type, stride, pointer);", + "glColorPointerEXT": "hgl_array_pointer(HGL_ARRAY_COLOR, size, type, stride, pointer);", + "glIndexPointer": "hgl_array_pointer(HGL_ARRAY_INDEX, 1, type, stride, pointer);", + "glIndexPointerEXT": "hgl_array_pointer(HGL_ARRAY_INDEX, 1, type, stride, pointer);", + "glTexCoordPointer": "hgl_array_pointer(HGL_ARRAY_TEXCOORD, size, type, stride, pointer);", + "glTexCoordPointerEXT": "hgl_array_pointer(HGL_ARRAY_TEXCOORD, size, type, stride, pointer);", + "glEdgeFlagPointer": "hgl_array_pointer(HGL_ARRAY_EDGEFLAG, 1, GL_UNSIGNED_BYTE, stride, pointer);", + "glEdgeFlagPointerEXT": "hgl_array_pointer(HGL_ARRAY_EDGEFLAG, 1, GL_UNSIGNED_BYTE, stride, pointer);", + "glClientActiveTextureARB": "hgl_client_unit(texture);", + "glDrawBuffer": "hgl_draw_buffer(buf);", + "glSelectTextureSGIS": "hgl_client_unit(target);", + "glInterleavedArrays": "hgl_interleaved(format, stride, pointer);", + "glFeedbackBuffer": "hgl_feedback_pointer = buffer;", + "glPixelStorei": "hgl_pixel_store(pname, (double)param);", + "glPixelStoref": "hgl_pixel_store(pname, (double)param);", + "glPushClientAttrib": "hgl_push_client_attrib(mask);", + "glPopClientAttrib": "hgl_pop_client_attrib();", + "glSelectBuffer": "hgl_select_pointer = buffer;", +} + +ELEM_BYTES = {"f32": 4, "f64": 8, "i32": 4, "u32": 4, "i16": 2, "u16": 2, "i8": 1, "u8": 1} +RUST_SCALAR = {"u32": "u32", "u8": "u8", "i8": "i8", "i16": "i16", "u16": "u16", "i32": "i32", "f32": "f32", "f64": "f64"} +SCALAR_OF = { + "GLenum": "u32", "GLboolean": "u8", "GLbitfield": "u32", "GLbyte": "i8", "GLshort": "i16", + "GLint": "i32", "GLsizei": "i32", "GLubyte": "u8", "GLushort": "u16", "GLuint": "u32", + "GLfloat": "f32", "GLclampf": "f32", "GLdouble": "f64", "GLclampd": "f64", +} +ARRAY_KINDS = ("inline", "map") # copied into the command, or by reference + +# Colour-index contexts (an overlay visual's; see glshim_glx.c): the host +# draws RGBA only, so an index travels as the red component of an 8-bit +# colour, exactly, and comes back as the overlay pixel. These run before the +# call is encoded, and take it over while an index context is current. +INDEX_HOOKS = { + **{f"glIndex{t}": "if (hgl_index_mode) { hgl_index((double)c); return; }" + for t in ("d", "f", "i", "s", "ub")}, + **{f"glIndex{t}v": "if (hgl_index_mode) { hgl_index((double)c[0]); return; }" + for t in ("d", "f", "i", "s", "ub")}, + "glClearIndex": "if (hgl_index_mode) { hgl_clear_index(c); return; }", + "glIndexMask": "if (hgl_index_mode) { hgl_index_mask(mask); return; }", + # An index context's logic op is GL_INDEX_LOGIC_OP (GL_LOGIC_OP); an RGBA + # one's is GL_COLOR_LOGIC_OP, and it works on the bits of the index. + "glEnable": "if (hgl_index_mode && cap == GL_LOGIC_OP) cap = GL_COLOR_LOGIC_OP;", + "glDisable": "if (hgl_index_mode && cap == GL_LOGIC_OP) cap = GL_COLOR_LOGIC_OP;", + "glIsEnabled": "if (hgl_index_mode && cap == GL_LOGIC_OP) cap = GL_COLOR_LOGIC_OP;", +} + +# ... and these after a state query has its answer: an index context answers +# for its index state, which the host does not have. +GUEST_AFTER = { + "glGetBooleanv": "if (hgl_index_mode) hgl_index_getb(pname, data);", + "glGetIntegerv": "if (hgl_index_mode) hgl_index_geti(pname, data);", + "glGetFloatv": "if (hgl_index_mode) hgl_index_getf(pname, data);", + "glGetDoublev": "if (hgl_index_mode) hgl_index_getd(pname, data);", +} + +# The encoders also report what memory the host will read: hgl_ref for a +# by-reference array (its exact size), hgl_ref_image for pixel data, and these +# for the draws that read the client arrays. The host call reads the memory +# itself, so the guest library's versions of these do nothing; they do not +# change the command encoding. +GUEST_REFS = { + "glDrawArrays": "hgl_ref_draw_arrays(first, count);", + "glDrawArraysEXT": "hgl_ref_draw_arrays(first, count);", + "glDrawElements": "hgl_ref_draw_elements(count, type, indices);", + "glDrawRangeElements": "hgl_ref_draw_elements(count, type, indices);", +} +ADDR_KINDS = ("image", "outimage", "out", "deferred", "array", "drawindices") + + +def c_count(expr): + """A count expression over parameter names, as unsigned C, never negative.""" + return f"hgl_nonneg((long)({expr}))" + + +def rust_count(expr, local): + def name(m): + w = m.group(0) + return f"({local[w]} as i64)" if w in local else w + body = re.sub(r"[A-Za-z_]\w*", name, expr) + return f"(({body}) as i64).max(0) as usize" + + +def layout(fn): + """Fixed offsets of each parameter in the command, and the fixed size.""" + off = 4 + offs = [] + for p in fn["params"]: + if p["ptr"] == 0: + if SCALAR_OF[p["type"]] == "f64": + off = (off + 7) & ~7 + offs.append(off) + off += 8 + else: + offs.append(off) + off += 4 + elif p.get("kind") in ARRAY_KINDS: + # count, then an 8-byte address (by reference) or offset (inline) + offs.append(off) + off += 12 + else: + # an 8-byte guest address: 64-bit programs send theirs whole + offs.append(off) + off += 8 + return offs, (off + 7) & ~7 + + +def map_count_c(p): + orders = p["orders"] + terms = " + ".join(f"({o} - 1) * {s}" for o, s in orders) + guard = " && ".join(f"{o} > 0" for o, _ in orders) + return f"(({guard}) ? hgl_nonneg((long)({terms} + hgl_map_components({p['target']}))) : 0)" + + +def rust_need(p, local): + """How many elements of array `p` the host's GL reads: the count the + encoder sends (map_count_c, hgl_size_*, c_count), worked out again from + the decoded arguments, so a command claiming fewer cannot make the host + read past what it was given.""" + if p["kind"] == "map": + orders = p["orders"] + guard = " && ".join(f"{local[o]} > 0" for o, _ in orders) + terms = " + ".join(f"({local[o]} as i64 - 1) * ({local[s]} as i64)" for o, s in orders) + comps = f"super::exec::map_components({local[p['target']]} as u32)" + return f"(if {guard} {{ ({terms} + {comps}).max(0) as usize }} else {{ 0 }})" + if "table" in p: + return f"size_{p['table']}({local[p['key']]} as u32)" + return rust_count(p["count"], local) + + +def elem_bytes_c(p): + if p.get("typed"): + return f"hgl_calllists_bytes({p['typed']})" + return str(ELEM_BYTES.get(p["elem"], 1)) + + +def gen_c(api): + fns = api["functions"] + enums = api["enums"] + out = ["/* Generated by iris-hostgl/tools/glshim.py from tools/glapi.json -- do not edit. */", + "#include ", '#include "glshim.h"', '#include "glshim_ops.h"', '#include "glshim_rt.h"', ""] + for i, fn in enumerate(fns): + name = fn["name"] + if name in GUEST_HANDWRITTEN: + continue + params = fn["params"] + offs, fixed = layout(fn) + args = ", ".join( + ("const " if p["const"] else "") + p["type"] + " " + "*" * p["ptr"] + p["name"] for p in params + ) or "void" + arrays = [(k, p) for k, p in enumerate(params) if p["ptr"] and p.get("kind") in ARRAY_KINDS] + body = [f"{fn['ret']} {name}({args})", "{", "\tunsigned char *_c;"] + body.append("\tunsigned _tail = 0, _at;" if arrays else "\tunsigned _tail = 0;") + # MIPSpro compiles C89: every local is declared before the first + # statement, so the declarations come first and the sizes after. + for k, p in arrays: + body.append(f"\tunsigned _n{k}, _b{k};") + body.append(f"\tint _r{k};") + for k, p in arrays: + if p["kind"] == "map": + cnt = map_count_c(p) + elif "table" in p: + cnt = f"hgl_size_{p['table']}({p['key']})" + else: + cnt = c_count(p["count"]) + body.append(f"\t_n{k} = {cnt};") + body.append(f"\t_b{k} = _n{k} * {elem_bytes_c(p)};") + body.append(f"\t_r{k} = _b{k} > HGL_INLINE_MAX;") + body.append(f"\tif (!_r{k}) _tail += (_b{k} + 3) & ~3;") + if name in INDEX_HOOKS: + body.append("\t" + INDEX_HOOKS[name]) + if name in GUEST_HOOKS: + body.append("\t" + GUEST_HOOKS[name]) + body.append(f"\tHGL_CMD(_c, HGL_OP_{name}, HGL_ROUND8({fixed} + _tail));") + if arrays: + body.append(f"\t_at = {fixed};") + byref = [] + for k, p in enumerate(params): + o = offs[k] + if p["ptr"] == 0: + s = SCALAR_OF[p["type"]] + if s == "f64": + body.append(f"\tHGL_PUT_D(_c, {o}, {p['name']});") + elif s == "f32": + body.append(f"\tHGL_PUT_F(_c, {o}, {p['name']});") + else: + body.append(f"\tHGL_PUT_I(_c, {o}, {p['name']});") + elif p.get("kind") in ARRAY_KINDS: + body.append(f"\tif (_r{k}) {{") + body.append(f"\t\tHGL_PUT_I(_c, {o}, _n{k} | HGL_BYREF);") + body.append(f"\t\tHGL_PUT_A(_c, {o + 4}, {p['name']});") + body.append(f"\t\thgl_ref((const char *){p['name']}, _b{k});") + body.append("\t} else {") + body.append(f"\t\tHGL_PUT_I(_c, {o}, _n{k});") + body.append(f"\t\tHGL_PUT_A(_c, {o + 4}, _at);") + body.append(f"\t\tif (_b{k} && {p['name']}) memcpy(_c + _at, {p['name']}, _b{k});") + body.append(f"\t\t_at += (_b{k} + 3) & ~3;") + body.append("\t}") + byref.append(f"_r{k}") + else: + body.append(f"\tHGL_PUT_A(_c, {o}, {p['name']});") + if p.get("kind") == "image" and "dims" in p: + dims = list(p["dims"]) + ["1"] * (4 - len(p["dims"])) + body.append( + f"\thgl_ref_image({p['name']}, {p.get('format_param', '0')}, {p.get('type_param', '0')}, " + f"{1 if p.get('bitmap') else 0}, {len(p['dims'])}, {', '.join(dims)});" + ) + if name in GUEST_REFS: + body.append("\t" + GUEST_REFS[name]) + sync = fn["sync"] or name in FORCE_SYNC or any(p.get("kind") == "drawindices" for p in params) + # A call that only reads this process's memory -- an upload, a draw, + # a by-reference array -- gives nothing back: it waits only if the + # encoder could not record exactly what the host reads. + reads_only = not any(p.get("kind") in ("out", "outimage", "deferred") for p in params) + if fn["ret"] != "void": + body.append(f"\treturn ({fn['ret']})hgl_flush();") + elif sync and reads_only and name not in ("glFinish", "glFlush", "glFlushRasterSGIX"): + body.append("\thgl_flush_upload();") + elif sync: + body.append("\thgl_flush();") + elif byref: + body.append(f"\tif ({' || '.join(byref)}) hgl_flush_upload();") + if name in GUEST_AFTER: + assert fn["ret"] == "void", name + body.append("\t" + GUEST_AFTER[name]) + body.append("}") + out += body + [""] + + # Size tables the encoders use. + for table, entries in sorted(api["sizes"].items()): + if table == "CallLists": + continue # SGI's helper takes more than the type; the rule is below + out.append(f"unsigned hgl_size_{table}(GLenum pname)") + out.append("{") + out.append("\tswitch (pname) {") + by_value = {} + for ename, count in entries.items(): + by_value.setdefault(enums[ename], count) + for value, count in sorted(by_value.items()): + out.append(f"\tcase {value:#x}: return {count};") + out.append("\tdefault: return 1;") + out.append("\t}") + out.append("}") + out.append("") + # Tables a getter's name implies but SGI's helpers do not have: the setter's. + return "\n".join(out) + "\n" + + +def gen_ops(api): + out = ["/* Generated by iris-hostgl/tools/glshim.py -- do not edit. */", "#ifndef HGL_GLSHIM_OPS_H", "#define HGL_GLSHIM_OPS_H"] + for i, fn in enumerate(api["functions"]): + out.append(f"#define HGL_OP_{fn['name']} {i}") + tables = sorted(t for t in api["sizes"] if t != "CallLists") + out += [f"extern unsigned hgl_size_{t}(unsigned);" for t in tables] + out.append("#endif") + return "\n".join(out) + "\n" + + +def rust_ptr_type(p): + elem = p.get("elem", "void") + t = "c_void" if elem == "void" else elem + return ("*const " if p["const"] else "*mut ") + t + + +def gen_rust(api): + fns = api["functions"] + enums = api["enums"] + out = [ + "// Generated by iris-hostgl/tools/glshim.py from tools/glapi.json -- do not edit.", + "#![allow(clippy::all, dead_code, non_snake_case, unused_parens, unused_variables, unused_mut)]", + "use super::Exec;", + "use std::ffi::c_void;", + "", + "pub const NAMES: &[&str] = &[", + ] + out += [f' "{fn["name"]}",' for fn in fns] + out += ["];", ""] + + # Size tables. + for table, entries in sorted(api["sizes"].items()): + if table == "CallLists": + continue + by_value = {} + for ename, count in entries.items(): + by_value.setdefault(enums[ename], count) + out.append(f"pub fn size_{table}(pname: u32) -> usize {{") + out.append(" match pname {") + for value, count in sorted(by_value.items()): + out.append(f" {value:#x} => {count},") + out.append(" _ => 1,") + out.append(" }") + out.append("}") + out.append("pub fn get_count(pname: u32) -> usize {") + out.append(" match pname {") + seen = set() + for ename, count in sorted(api["get_multi"].items(), key=lambda kv: enums[kv[0]]): + v = enums[ename] + if v in seen: + continue + seen.add(v) + out.append(f" {v:#x} => {count}, // {ename}") + out.append(" _ => 1,") + out.append(" }") + out.append("}") + out.append("") + + out.append("/// Run command `op`, whose bytes (header included) are `c`.") + out.append("pub fn run(x: &mut Exec, op: usize, c: &[u8]) -> Option {") + out.append(" match op {") + for i, fn in enumerate(fns): + name = fn["name"] + if name in GUEST_HANDWRITTEN: + continue + params = fn["params"] + offs, _ = layout(fn) + local = {p["name"]: f"a{k}" for k, p in enumerate(params)} + # The format and type a pixel call names are the *guest's*, and the + # host need not have them: GL_ABGR_EXT is SGI's and the Mac refuses it + # outright. Both go through the executor, which answers with what the + # host will take and has already put the data in that order. + fmt_params, typ_params, height_params = {}, {}, set() + for p in params: + if p.get("kind") in ("image", "outimage") and p.get("format_param"): + fmt_params[p["format_param"]] = True + if p.get("type_param"): + typ_params[p["type_param"]] = p["format_param"] + # SGIX_interlace spreads h source rows over 2h-1 destination rows, + # so the host is told the taller height for that one call. The + # second dimension is the height; `gl_height` answers unchanged + # for every transfer that did not stage one. + dims = p.get("dims") + if p.get("kind") == "image" and dims and len(dims) >= 2: + height_params.add(dims[1]) + # SGIS_texture_select's grouped internal formats are ours, not the + # Mac's: `gl_internal` answers with what the host will take. + internal_params = {p["name"] for p in params + if p["name"] in ("internalformat", "internalFormat", "components")} + lines = [] + call_args = [] + call_types = [] + post = [] + for k, p in enumerate(params): + o = offs[k] + if p["ptr"] == 0: + s = SCALAR_OF[p["type"]] + if s == "f64": + lines.append(f"let a{k} = x.f64(c, {o});") + elif s == "f32": + lines.append(f"let a{k} = x.f32(c, {o});") + else: + lines.append(f"let a{k} = x.i32(c, {o}) as {s};") + name_k = p["name"] + if name_k in fmt_params: + call_args.append(f"x.gl_format(a{k})") + elif name_k in internal_params: + call_args.append(f"x.gl_internal(a{k} as i32) as {s}") + elif name_k in height_params: + call_args.append(f"x.gl_height(a{k} as i32) as {s}") + elif name_k in typ_params: + call_args.append(f"x.gl_type({local[typ_params[name_k]]}, a{k})") + else: + call_args.append(f"a{k}") + call_types.append(s) + continue + kind = p.get("kind") + if kind in ARRAY_KINDS: + # The host reads as many elements as the call's own arguments + # say, not as many as the command carried: `w` holds that many + # (and slack), and `v` is the part the call means. + lines.append(f"let n{k} = x.count({rust_need(p, local)})?;") + if p.get("typed"): + lines.append(f"let w{k} = x.arr_typed_padded(c, {o}, {local[p['typed']]} as u32, n{k})?;") + lines.append(f"let v{k} = &w{k}[..];") + call_args.append(f"x.ptr_of(v{k}) as *const c_void") + call_types.append("*const c_void") + else: + e = p["elem"] + lines.append(f"let w{k} = x.arr_padded::<{e}>(c, {o}, n{k})?;") + lines.append(f"let v{k} = &w{k}[..n{k}];") + call_args.append(f"x.ptr_of(v{k})") + call_types.append(f"*const {e}") + lines.append(f"let a{k} = 0u64;") + continue + lines.append(f"let a{k} = x.addr(c, {o});") + if kind == "out": + e = p["elem"] if p.get("elem") not in (None, "void") else "u8" + if "count" in p: + cnt = rust_count(p["count"], local) + elif "table" in p: + cnt = f"size_{p['table']}({local[p['key']]} as u32)" + elif "get" in p: + cnt = f"get_count({local[p['get']]} as u32)" + elif "pixelmap" in p: + cnt = f"x.pixelmap_size({local[p['pixelmap']]} as u32)" + elif "mapquery" in p: + t, q = p["mapquery"] + cnt = f"x.mapquery_count({local[t]} as u32, {local[q]} as u32)" + else: + cnt = "{ x.unsupported(" + str(i) + "); 0 }" + # Guest-controlled counts size host allocations: refused past a + # sane limit rather than allowed to abort the emulator. + lines.append(f"let c{k} = {cnt};") + lines.append(f"let n{k} = x.count(c{k})?;") + lines.append(f"let mut o{k} = vec![0 as {e}; n{k}.max(1) + 16];") + call_args.append(f"o{k}.as_mut_ptr()") + call_types.append(f"*mut {e}") + post.append(f"x.put::<{e}>(a{k}, &o{k}[..n{k}])?;") + elif kind in ("image", "outimage"): + fmt = local.get(p.get("format_param", ""), "0u32") + typ = local.get(p.get("type_param", ""), "0u32") + bitmap = "true" if p.get("bitmap") else "false" + if "dims" in p: + dims = ", ".join(local[d] + " as i32" if d in local else d for d in p["dims"]) + dims = f"&[{dims}]" + else: + extra = ", ".join(f"{local[n]} as i32" for n in ("target", "level") if n in local) + lines.append(f"let d{k} = x.dims_from(\"{p['dims_from']}\", &[{extra}]);") + dims = f"&d{k}" + outp = "true" if kind == "outimage" else "false" + lines.append(f"let p{k} = x.image(a{k}, {dims}, {fmt} as u32, {typ} as u32, {bitmap}, {outp})?;") + call_args.append(f"p{k} as {rust_ptr_type(p)}") + call_types.append(rust_ptr_type(p)) + elif kind in ("array", "deferred", "drawindices"): + call_args.append(f"a{k}") + call_types.append("u64") + # Calls that the executor handles itself. + special = special_call(name, params, local) + if special: + lines.append(special) + else: + ret = fn["ret"] + rust_ret = "" if ret == "void" else f" -> {SCALAR_OF.get(ret, 'u32')}" + if re.sub(r"(EXT|SGIX|SGIS|SGI)$", "", name) in FRAMEBUFFER_READERS: + lines.append("x.resolve_read();") + guard = GUARDED.get(name) + if guard: + lines.append(f"if !{guard} {{") + lines.append(f"let f = x.func({i})?;") + lines.append( + f"let g: extern \"C\" fn({', '.join(call_types)}){rust_ret} = unsafe {{ std::mem::transmute(f) }};" + ) + if ret == "void": + lines.append(f"g({', '.join(call_args)});") + if guard: + lines.append("}") + # The state queries go past the executor on the way back, so + # that a limit the host reports but this library cannot stand + # behind is answered with one it can (Exec::get_limit). + if name in ("glGetBooleanv", "glGetDoublev", "glGetFloatv", "glGetIntegerv"): + lines.append("x.get_limit(a0, &mut o1);") + lines += post + lines.append("x.image_done();") + lines.append("Some(0)") + else: + lines.append(f"let r = g({', '.join(call_args)});") + lines += post + lines.append("x.image_done();") + lines.append("Some(r as u64)") + out.append(f" {i} => {{ // {name}") + out += [" " + l for l in lines] + out.append(" }") + out.append(" _ => { x.unsupported(op); Some(0) }") + out.append(" }") + out.append("}") + return "\n".join(out) + "\n" + + +# Calls the emulation layer may claim: it takes them when the target or the +# enumerant is one the Mac has not got, and otherwise they go to the Mac. The +# value is the condition, in terms of the decoded arguments. +GUARDED = { + "glColorTable": "x.color_table(a0, a2, p5 as *const u8, a3, a4)", + "glColorTableSGI": "x.color_table(a0, a2, p5 as *const u8, a3, a4)", + "glTexParameterfv": "x.tex_parameter(a1, &v2)", + "glGetTexParameterfv": "x.get_tex_parameter(a1, &mut o2)", + # The scalar forms carry SGIS_texture_filter4's filter mode, which the Mac + # would refuse: the shader does those taps itself. + "glTexParameteri": "x.tex_parameter(a1, &[a2 as f32])", + "glTexParameterf": "x.tex_parameter(a1, &[a2])", + "glTexFilterFuncSGIS": "x.tex_filter_func(a1, &v3)", + "glDrawPixels": "x.draw_pixels(a0, a1, a2, a3, p4 as *const c_void)", + "glTexImage2D": "x.tex_image_2d(a0, a1, a2, a3, a4, a5, x.gl_format(a6), x.gl_type(a6, a7), p8 as *const c_void)", + "glFogf": "x.fog(a0, &[a1])", + "glFogi": "x.fog(a0, &[a1 as f32])", + "glFogfv": "x.fog(a0, &v1)", +} + +# Calls that read the framebuffer: a multisampled drawable is resolved first. +FRAMEBUFFER_READERS = ( + "glReadPixels", "glCopyPixels", "glAccum", "glCopyTexImage1D", "glCopyTexImage2D", + "glCopyTexSubImage1D", "glCopyTexSubImage2D", "glCopyTexSubImage3D", + "glCopyColorTable", "glCopyColorSubTable", "glCopyConvolutionFilter1D", "glCopyConvolutionFilter2D", +) + + +def special_call(name, params, local): + """The body for calls the executor handles itself, or None.""" + a = [local[p["name"]] for p in params] + base = re.sub(r"(ARB|EXT|SGIX|SGIS|SGI)$", "", name) + if name == "glPixelStorei": + return f"x.pixel_store({a[0]}, {a[1]} as f32); Some(0)" + if name == "glPixelStoref": + return f"x.pixel_store({a[0]}, {a[1]}); Some(0)" + if name in ("glEnableClientState", "glDisableClientState"): + return f"x.client_state({a[0]}, {'true' if name.startswith('glEnable') else 'false'}); Some(0)" + if name == "glGetError": + return "Some(x.get_error() as u64)" + # SGIS_multitexture is ARB_multitexture under older names, and the Mac has + # only the ARB/core ones: the executor maps the unit and calls those. + if name == "glSelectTextureSGIS": + return f"x.select_texture({a[0]}); Some(0)" + if name == "glClientActiveTextureARB": + return f"x.client_active_texture({a[0]}); Some(0)" + if name == "glMTexCoord2fSGIS": + return f"x.mtex_coord2f({a[0]}, {a[1]}, {a[2]}); Some(0)" + if name == "glMTexCoord2fvSGIS": + return "x.mtex_coord2f(%s, v1[0], v1[1]); Some(0)" % a[0] + if name in ("glEnable", "glDisable"): + return f"x.set_enable({a[0]}, {'true' if name == 'glEnable' else 'false'}); Some(0)" + if name == "glIsEnabled": + return f"Some(x.is_enabled({a[0]}) as u64)" + if name in ("glTexEnvi", "glTexEnvf"): + return f"x.tex_env({a[0]}, {a[1]}, {a[2]} as u32); Some(0)" + if base == "glBindTexture": + return f"x.bind_texture({a[0]}, {a[1]}); Some(0)" + if base == "glFogFunc": + return f"x.fog_func(&v1); Some(0)" + if name == "glTexImage4DSGIS": + # Each translation is taken first: they borrow the executor, and the + # call that uses them borrows it too. + return ("let internal = x.gl_internal(a2 as i32);\n" + "let fmt = x.gl_format(a8);\n" + "let ty = x.gl_type(a8, a9);\n" + "x.tex_image_4d(a1, internal, a3, a4, a5, a6, a7, fmt, ty, p10 as *const c_void);\n" + "Some(0)") + if name == "glPixelTexGenSGIX": + return f"x.pixel_tex_gen({a[0]}); Some(0)" + if name == "glBegin": + return f"x.begin({a[0]}); Some(0)" + if name == "glEnd": + return "x.end(); Some(0)" + if re.match(r"^glSpriteParameter[fi]v?SGIX$", name): + # The integer vector form arrives as i32s and the state is floats. + if not params[1]["ptr"]: + arg = f"&[{a[1]} as f32]" + elif params[1].get("elem") == "f32": + arg = "&v1" + else: + arg = "&v1.iter().map(|v| *v as f32).collect::>()" + return f"x.sprite_parameter({a[0]}, {arg}); Some(0)" + if base == "glDetailTexFunc": + return f"x.detail_func(&v2); Some(0)" + if base == "glSharpenTexFunc": + return f"x.sharpen_func(&v2); Some(0)" + if base == "glReferencePlane": + return f"x.reference_plane(&v0); Some(0)" + if name in ("glDrawBuffer", "glReadBuffer"): + return f"x.color_buffer({'true' if name == 'glDrawBuffer' else 'false'}, {a[0]}); Some(0)" + if name == "glPolygonOffsetEXT": + return f"x.polygon_offset_ext({a[0]}, {a[1]}); Some(0)" + if base == "glDrawArrays": + return f"x.draw_arrays({a[0]}, {a[1]}, {a[2]}); Some(0)" + if name == "glDrawElements": + return f"x.draw_elements({a[0]}, {a[1]}, {a[2]}, {a[3]}); Some(0)" + if name == "glDrawRangeElements": + return f"x.draw_elements({a[0]}, {a[3]}, {a[4]}, {a[5]}); Some(0)" + if name == "glRenderMode": + return f"Some(x.render_mode({a[0]}) as u32 as u64)" + if name == "glFeedbackBuffer": + return f"x.feedback_buffer({a[0]}, {a[1]}, {a[2]}); Some(0)" + if name == "glSelectBuffer": + return f"x.select_buffer({a[0]}, {a[1]}); Some(0)" + if name == "glInterleavedArrays": + return f"x.interleaved({a[0]}, {a[1]}, {a[2]}); Some(0)" + m = re.match(r"^gl(Vertex|Normal|Color|Index|TexCoord|EdgeFlag)Pointer$", base) + if m: + pn = [p["name"] for p in params] + size = local["size"] if "size" in pn else ("3" if m.group(1) == "Normal" else "1") + typ = local["type"] if "type" in pn else "0x1401" + which = ["Vertex", "Normal", "Color", "Index", "TexCoord", "EdgeFlag"].index(m.group(1)) + return f"x.array_pointer({which}, {size} as i32, {typ} as u32, {local['stride']} as i32, {local['pointer']}); Some(0)" + return None + + +def main(): + crate = os.path.dirname(HERE) + api = json.load(open(os.path.join(HERE, "glapi.json"))) + open(os.path.join(crate, "src", "calls.rs"), "w").write(gen_rust(api)) + guest_tools = os.environ.get("IRIS_GUEST_TOOLS") + if guest_tools: + guest = os.path.join(guest_tools, "gl") + if not os.path.isfile(os.path.join(guest, "glshim.h")): + raise SystemExit(f"glshim.py: {guest_tools} is not an iris-guest-tools checkout (no gl/glshim.h)") + open(os.path.join(guest, "glshim_ops.h"), "w").write(gen_ops(api)) + open(os.path.join(guest, "glshim_gen.c"), "w").write(gen_c(api)) + n = len(api["functions"]) + print(f"{n} entry points: {n - len(GUEST_HANDWRITTEN)} generated, {len(GUEST_HANDWRITTEN)} written by hand") + if not guest_tools: + print("glshim.py: the guest's encoders were not written: set IRIS_GUEST_TOOLS to an iris-guest-tools checkout") + + +if __name__ == "__main__": + main() diff --git a/iris-hostgl/tools/khronos/LICENSE-Apache-2.0.txt b/iris-hostgl/tools/khronos/LICENSE-Apache-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/iris-hostgl/tools/khronos/LICENSE-Apache-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/iris-hostgl/tools/khronos/README.md b/iris-hostgl/tools/khronos/README.md new file mode 100644 index 0000000..c1f2ee1 --- /dev/null +++ b/iris-hostgl/tools/khronos/README.md @@ -0,0 +1,20 @@ +# The Khronos OpenGL API Registry, pinned + +`gl.xml` is the OpenGL API Registry from +, unmodified: + +| | | +|---|---| +| file | `xml/gl.xml` | +| commit | `1cdd228e34966dd6b95bd203e9f84faba0f371a1` (2026-08-28) | +| SHA-256 | `b9ca2cfa5c676e901c20d34af3407f1687cde0f1336a5ff7a8974d04c7494ad3` | +| licence | Apache-2.0 (the file's own header: Copyright The Khronos Group Inc., `SPDX-License-Identifier: Apache-2.0`); the licence text is `LICENSE-Apache-2.0.txt` | + +It is kept here so that regenerating the host GL protocol needs no network and +behaves the same on every platform. Only `../glapi_from_registry.py` reads it, +and only when the protocol is regenerated; building IRIS does not. + +To move to a newer registry: replace `gl.xml`, update the commit and checksum +above, run `glapi_from_registry.py` and `glshim.py`, and check that +`iris-hostgl/src/calls.rs` and the guest's encoders change only where you +expect -- the registry has renamed parameters and retyped them before. diff --git a/iris-hostgl/tools/khronos/gl.xml b/iris-hostgl/tools/khronos/gl.xml new file mode 100644 index 0000000..ff26373 --- /dev/null +++ b/iris-hostgl/tools/khronos/gl.xml @@ -0,0 +1,47772 @@ + + + +Copyright 2013-2026 The Khronos Group Inc. +SPDX-License-Identifier: Apache-2.0 + +This file, gl.xml, is the OpenGL and OpenGL API Registry. The canonical +version of the registry, together with documentation, schema, and Python +generator scripts used to generate C header files for OpenGL and OpenGL ES, +can always be found in the Khronos Registry at +https://github.com/KhronosGroup/OpenGL-Registry + + + + + + #include <KHR/khrplatform.h> + + typedef unsigned int GLenum; + typedef unsigned char GLboolean; + typedef unsigned int GLbitfield; + typedef void GLvoid; + typedef khronos_int8_t GLbyte; + typedef khronos_uint8_t GLubyte; + typedef khronos_int16_t GLshort; + typedef khronos_uint16_t GLushort; + typedef int GLint; + typedef unsigned int GLuint; + typedef khronos_int32_t GLclampx; + typedef int GLsizei; + typedef khronos_float_t GLfloat; + typedef khronos_float_t GLclampf; + typedef double GLdouble; + typedef double GLclampd; + typedef void *GLeglClientBufferEXT; + typedef void *GLeglImageOES; + typedef char GLchar; + typedef char GLcharARB; + #ifdef __APPLE__ +typedef void *GLhandleARB; +#else +typedef unsigned int GLhandleARB; +#endif + typedef khronos_uint16_t GLhalf; + typedef khronos_uint16_t GLhalfARB; + typedef khronos_int32_t GLfixed; + typedef khronos_intptr_t GLintptr; + typedef khronos_intptr_t GLintptrARB; + typedef khronos_ssize_t GLsizeiptr; + typedef khronos_ssize_t GLsizeiptrARB; + typedef khronos_int64_t GLint64; + typedef khronos_int64_t GLint64EXT; + typedef khronos_uint64_t GLuint64; + typedef khronos_uint64_t GLuint64EXT; + typedef struct __GLsync *GLsync; + struct _cl_context; + struct _cl_event; + typedef void ( *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); + typedef void ( *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); + typedef void ( *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); + + + typedef void ( *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); + typedef unsigned short GLhalfNV; + typedef GLintptr GLvdpauSurfaceNV; + typedef void ( *GLVULKANPROCNV)(void); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + void glAccum + GLenum op + GLfloat value + + + + void glAccumxOES + GLenum op + GLfixed value + + + void glActiveProgramEXT + GLuint program + + + void glActiveShaderProgram + GLuint pipeline + GLuint program + + + void glActiveShaderProgramEXT + GLuint pipeline + GLuint program + + + void glActiveStencilFaceEXT + GLenum face + + + + void glActiveTexture + GLenum texture + + + + void glActiveTextureARB + GLenum texture + + + + + void glActiveVaryingNV + GLuint program + const GLchar *name + + + void glAddClientPointerRangeMESA + void *addr + GLsizeiptr size + + + void glAlphaFragmentOp1ATI + GLenum op + GLuint dst + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + + + void glAlphaFragmentOp2ATI + GLenum op + GLuint dst + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + GLuint arg2 + GLuint arg2Rep + GLuint arg2Mod + + + void glAlphaFragmentOp3ATI + GLenum op + GLuint dst + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + GLuint arg2 + GLuint arg2Rep + GLuint arg2Mod + GLuint arg3 + GLuint arg3Rep + GLuint arg3Mod + + + void glAlphaFunc + GLenum func + GLfloat ref + + + + void glAlphaFuncQCOM + GLenum func + GLclampf ref + + + void glAlphaFuncx + GLenum func + GLfixed ref + + + void glAlphaFuncxOES + GLenum func + GLfixed ref + + + void glAlphaToCoverageDitherControlNV + GLenum mode + + + void glApplyFramebufferAttachmentCMAAINTEL + + + void glApplyTextureEXT + GLenum mode + + + GLboolean glAcquireKeyedMutexWin32EXT + GLuint memory + GLuint64 key + GLuint timeout + + + GLboolean glAreProgramsResidentNV + GLsizei n + const GLuint *programs + GLboolean *residences + + + + GLboolean glAreTexturesResident + GLsizei n + const GLuint *textures + GLboolean *residences + + + + GLboolean glAreTexturesResidentEXT + GLsizei n + const GLuint *textures + GLboolean *residences + + + + void glArrayElement + GLint i + + + void glArrayElementEXT + GLint i + + + + void glArrayObjectATI + GLenum array + GLint size + GLenum type + GLsizei stride + GLuint buffer + GLuint offset + + + GLuint glAsyncCopyBufferSubDataNVX + GLsizei waitSemaphoreCount + const GLuint *waitSemaphoreArray + const GLuint64 *fenceValueArray + GLuint readGpu + GLbitfield writeGpuMask + GLuint readBuffer + GLuint writeBuffer + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + GLsizei signalSemaphoreCount + const GLuint *signalSemaphoreArray + const GLuint64 *signalValueArray + + + GLuint glAsyncCopyImageSubDataNVX + GLsizei waitSemaphoreCount + const GLuint *waitSemaphoreArray + const GLuint64 *waitValueArray + GLuint srcGpu + GLbitfield dstGpuMask + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + GLsizei signalSemaphoreCount + const GLuint *signalSemaphoreArray + const GLuint64 *signalValueArray + + + void glAsyncMarkerSGIX + GLuint marker + + + void glAttachObjectARB + GLhandleARB containerObj + GLhandleARB obj + + + + void glAttachShader + GLuint program + GLuint shader + + + void glBegin + GLenum mode + + + + void glBeginConditionalRender + GLuint id + GLenum mode + + + void glBeginConditionalRenderNV + GLuint id + GLenum mode + + + + + void glBeginConditionalRenderNVX + GLuint id + + + void glBeginFragmentShaderATI + + + void glBeginOcclusionQueryNV + GLuint id + + + void glBeginPerfMonitorAMD + GLuint monitor + + + void glBeginPerfQueryINTEL + GLuint queryHandle + + + void glBeginQuery + GLenum target + GLuint id + + + + void glBeginQueryARB + GLenum target + GLuint id + + + + void glBeginQueryEXT + GLenum target + GLuint id + + + void glBeginQueryIndexed + GLenum target + GLuint index + GLuint id + + + void glBeginTransformFeedback + GLenum primitiveMode + + + + void glBeginTransformFeedbackEXT + GLenum primitiveMode + + + + void glBeginTransformFeedbackNV + GLenum primitiveMode + + + + void glBeginVertexShaderEXT + + + void glBeginVideoCaptureNV + GLuint video_capture_slot + + + void glBindAttribLocation + GLuint program + GLuint index + const GLchar *name + + + void glBindAttribLocationARB + GLhandleARB programObj + GLuint index + const GLcharARB *name + + + + void glBindBuffer + GLenum target + GLuint buffer + + + void glBindBufferARB + GLenum target + GLuint buffer + + + + void glBindBufferBase + GLenum target + GLuint index + GLuint buffer + + + + void glBindBufferBaseEXT + GLenum target + GLuint index + GLuint buffer + + + + void glBindBufferBaseNV + GLenum target + GLuint index + GLuint buffer + + + + void glBindBufferOffsetEXT + GLenum target + GLuint index + GLuint buffer + GLintptr offset + + + void glBindBufferOffsetNV + GLenum target + GLuint index + GLuint buffer + GLintptr offset + + + + void glBindBufferRange + GLenum target + GLuint index + GLuint buffer + GLintptr offset + GLsizeiptr size + + + + void glBindBufferRangeEXT + GLenum target + GLuint index + GLuint buffer + GLintptr offset + GLsizeiptr size + + + + void glBindBufferRangeNV + GLenum target + GLuint index + GLuint buffer + GLintptr offset + GLsizeiptr size + + + + void glBindBuffersBase + GLenum target + GLuint first + GLsizei count + const GLuint *buffers + + + void glBindBuffersRange + GLenum target + GLuint first + GLsizei count + const GLuint *buffers + const GLintptr *offsets + const GLsizeiptr *sizes + + + void glBindFragDataLocation + GLuint program + GLuint color + const GLchar *name + + + void glBindFragDataLocationEXT + GLuint program + GLuint color + const GLchar *name + + + + void glBindFragDataLocationIndexed + GLuint program + GLuint colorNumber + GLuint index + const GLchar *name + + + void glBindFragDataLocationIndexedEXT + GLuint program + GLuint colorNumber + GLuint index + const GLchar *name + + + + void glBindFragmentShaderATI + GLuint id + + + void glBindFramebuffer + GLenum target + GLuint framebuffer + + + + void glBindFramebufferEXT + GLenum target + GLuint framebuffer + + + + void glBindFramebufferOES + GLenum target + GLuint framebuffer + + + void glBindImageTexture + GLuint unit + GLuint texture + GLint level + GLboolean layered + GLint layer + GLenum access + GLenum format + + + void glBindImageTextureEXT + GLuint index + GLuint texture + GLint level + GLboolean layered + GLint layer + GLenum access + GLint format + + + void glBindImageTextures + GLuint first + GLsizei count + const GLuint *textures + + + GLuint glBindLightParameterEXT + GLenum light + GLenum value + + + GLuint glBindMaterialParameterEXT + GLenum face + GLenum value + + + void glBindMultiTextureEXT + GLenum texunit + GLenum target + GLuint texture + + + GLuint glBindParameterEXT + GLenum value + + + void glBindProgramARB + GLenum target + GLuint program + + + + void glBindProgramNV + GLenum target + GLuint id + + + + + void glBindProgramPipeline + GLuint pipeline + + + void glBindProgramPipelineEXT + GLuint pipeline + + + void glBindRenderbuffer + GLenum target + GLuint renderbuffer + + + + void glBindRenderbufferEXT + GLenum target + GLuint renderbuffer + + + + void glBindRenderbufferOES + GLenum target + GLuint renderbuffer + + + void glBindSampler + GLuint unit + GLuint sampler + + + void glBindSamplers + GLuint first + GLsizei count + const GLuint *samplers + + + void glBindShadingRateImageNV + GLuint texture + + + GLuint glBindTexGenParameterEXT + GLenum unit + GLenum coord + GLenum value + + + void glBindTexture + GLenum target + GLuint texture + + + + void glBindTextureEXT + GLenum target + GLuint texture + + + + + void glBindTextureUnit + GLuint unit + GLuint texture + + + GLuint glBindTextureUnitParameterEXT + GLenum unit + GLenum value + + + void glBindTextures + GLuint first + GLsizei count + const GLuint *textures + + + void glBindTransformFeedback + GLenum target + GLuint id + + + void glBindTransformFeedbackNV + GLenum target + GLuint id + + + void glBindVertexArray + GLuint array + + + + void glBindVertexArrayAPPLE + GLuint array + + + void glBindVertexArrayOES + GLuint array + + + + void glBindVertexBuffer + GLuint bindingindex + GLuint buffer + GLintptr offset + GLsizei stride + + + void glBindVertexBuffers + GLuint first + GLsizei count + const GLuint *buffers + const GLintptr *offsets + const GLsizei *strides + + + void glBindVertexShaderEXT + GLuint id + + + void glBindVideoCaptureStreamBufferNV + GLuint video_capture_slot + GLuint stream + GLenum frame_region + GLintptrARB offset + + + void glBindVideoCaptureStreamTextureNV + GLuint video_capture_slot + GLuint stream + GLenum frame_region + GLenum target + GLuint texture + + + void glBinormal3bEXT + GLbyte bx + GLbyte by + GLbyte bz + + + + void glBinormal3bvEXT + const GLbyte *v + + + void glBinormal3dEXT + GLdouble bx + GLdouble by + GLdouble bz + + + + void glBinormal3dvEXT + const GLdouble *v + + + void glBinormal3fEXT + GLfloat bx + GLfloat by + GLfloat bz + + + + void glBinormal3fvEXT + const GLfloat *v + + + void glBinormal3iEXT + GLint bx + GLint by + GLint bz + + + + void glBinormal3ivEXT + const GLint *v + + + void glBinormal3sEXT + GLshort bx + GLshort by + GLshort bz + + + + void glBinormal3svEXT + const GLshort *v + + + void glBinormalPointerEXT + GLenum type + GLsizei stride + const void *pointer + + + void glBitmap + GLsizei width + GLsizei height + GLfloat xorig + GLfloat yorig + GLfloat xmove + GLfloat ymove + const GLubyte *bitmap + + + + + void glBitmapxOES + GLsizei width + GLsizei height + GLfixed xorig + GLfixed yorig + GLfixed xmove + GLfixed ymove + const GLubyte *bitmap + + + void glBlendBarrier + + + void glBlendBarrierKHR + + + + void glBlendBarrierNV + + + + void glBlendColor + GLfloat red + GLfloat green + GLfloat blue + GLfloat alpha + + + + void glBlendColorEXT + GLfloat red + GLfloat green + GLfloat blue + GLfloat alpha + + + + + void glBlendColorxOES + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glBlendEquation + GLenum mode + + + + void glBlendEquationEXT + GLenum mode + + + + + void glBlendEquationIndexedAMD + GLuint buf + GLenum mode + + + + void glBlendEquationOES + GLenum mode + + + void glBlendEquationSeparate + GLenum modeRGB + GLenum modeAlpha + + + + void glBlendEquationSeparateEXT + GLenum modeRGB + GLenum modeAlpha + + + + + void glBlendEquationSeparateIndexedAMD + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + + + void glBlendEquationSeparateOES + GLenum modeRGB + GLenum modeAlpha + + + void glBlendEquationSeparatei + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + + void glBlendEquationSeparateiARB + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + + + void glBlendEquationSeparateiEXT + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + + + void glBlendEquationSeparateiOES + GLuint buf + GLenum modeRGB + GLenum modeAlpha + + + + void glBlendEquationi + GLuint buf + GLenum mode + + + void glBlendEquationiARB + GLuint buf + GLenum mode + + + + void glBlendEquationiEXT + GLuint buf + GLenum mode + + + + void glBlendEquationiOES + GLuint buf + GLenum mode + + + + void glBlendFunc + GLenum sfactor + GLenum dfactor + + + + void glBlendFuncIndexedAMD + GLuint buf + GLenum src + GLenum dst + + + + void glBlendFuncSeparate + GLenum sfactorRGB + GLenum dfactorRGB + GLenum sfactorAlpha + GLenum dfactorAlpha + + + + void glBlendFuncSeparateEXT + GLenum sfactorRGB + GLenum dfactorRGB + GLenum sfactorAlpha + GLenum dfactorAlpha + + + + + void glBlendFuncSeparateINGR + GLenum sfactorRGB + GLenum dfactorRGB + GLenum sfactorAlpha + GLenum dfactorAlpha + + + + + void glBlendFuncSeparateIndexedAMD + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + + void glBlendFuncSeparateOES + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + void glBlendFuncSeparatei + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + void glBlendFuncSeparateiARB + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + + void glBlendFuncSeparateiEXT + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + + void glBlendFuncSeparateiOES + GLuint buf + GLenum srcRGB + GLenum dstRGB + GLenum srcAlpha + GLenum dstAlpha + + + + void glBlendFunci + GLuint buf + GLenum src + GLenum dst + + + void glBlendFunciARB + GLuint buf + GLenum src + GLenum dst + + + + void glBlendFunciEXT + GLuint buf + GLenum src + GLenum dst + + + + void glBlendFunciOES + GLuint buf + GLenum src + GLenum dst + + + + void glBlendParameteriNV + GLenum pname + GLint value + + + void glBlitFramebuffer + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + + void glBlitFramebufferANGLE + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + void glBlitFramebufferEXT + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + + + void glBlitFramebufferLayerEXT + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint srcLayer + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLint dstLayer + GLbitfield mask + GLenum filter + + + void glBlitFramebufferLayersEXT + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + void glBlitFramebufferNV + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + + void glBlitNamedFramebuffer + GLuint readFramebuffer + GLuint drawFramebuffer + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + void glBufferAddressRangeNV + GLenum pname + GLuint index + GLuint64EXT address + GLsizeiptr length + + + void glBufferAttachMemoryNV + GLenum target + GLuint memory + GLuint64 offset + + + void glBufferData + GLenum target + GLsizeiptr size + const void *data + GLenum usage + + + void glBufferDataARB + GLenum target + GLsizeiptrARB size + const void *data + GLenum usage + + + + void glBufferPageCommitmentARB + GLenum target + GLintptr offset + GLsizeiptr size + GLboolean commit + + + void glBufferPageCommitmentMemNV + GLenum target + GLintptr offset + GLsizeiptr size + GLuint memory + GLuint64 memOffset + GLboolean commit + + + void glBufferParameteriAPPLE + GLenum target + GLenum pname + GLint param + + + void glBufferStorage + GLenum target + GLsizeiptr size + const void *data + GLbitfield flags + + + void glBufferStorageEXT + GLenum target + GLsizeiptr size + const void *data + GLbitfield flags + + + + void glBufferStorageExternalEXT + GLenum target + GLintptr offset + GLsizeiptr size + GLeglClientBufferEXT clientBuffer + GLbitfield flags + + + void glBufferStorageMemEXT + GLenum target + GLsizeiptr size + GLuint memory + GLuint64 offset + + + void glBufferSubData + GLenum target + GLintptr offset + GLsizeiptr size + const void *data + + + void glBufferSubDataARB + GLenum target + GLintptrARB offset + GLsizeiptrARB size + const void *data + + + + void glCallCommandListNV + GLuint list + + + void glCallList + GLuint list + + + + void glCallLists + GLsizei n + GLenum type + const void *lists + + + + GLenum glCheckFramebufferStatus + GLenum target + + + + GLenum glCheckFramebufferStatusEXT + GLenum target + + + + + GLenum glCheckFramebufferStatusOES + GLenum target + + + GLenum glCheckNamedFramebufferStatus + GLuint framebuffer + GLenum target + + + GLenum glCheckNamedFramebufferStatusEXT + GLuint framebuffer + GLenum target + + + void glClampColor + GLenum target + GLenum clamp + + + + void glClampColorARB + GLenum target + GLenum clamp + + + + + void glClear + GLbitfield mask + + + + void glClearAccum + GLfloat red + GLfloat green + GLfloat blue + GLfloat alpha + + + + void glClearAccumxOES + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glClearBufferData + GLenum target + GLenum internalformat + GLenum format + GLenum type + const void *data + + + void glClearBufferSubData + GLenum target + GLenum internalformat + GLintptr offset + GLsizeiptr size + GLenum format + GLenum type + const void *data + + + void glClearBufferfi + GLenum buffer + GLint drawbuffer + GLfloat depth + GLint stencil + + + + void glClearBufferfv + GLenum buffer + GLint drawbuffer + const GLfloat *value + + + + void glClearBufferiv + GLenum buffer + GLint drawbuffer + const GLint *value + + + + void glClearBufferuiv + GLenum buffer + GLint drawbuffer + const GLuint *value + + + + void glClearColor + GLfloat red + GLfloat green + GLfloat blue + GLfloat alpha + + + + void glClearColorIiEXT + GLint red + GLint green + GLint blue + GLint alpha + + + + void glClearColorIuiEXT + GLuint red + GLuint green + GLuint blue + GLuint alpha + + + + void glClearColorx + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glClearColorxOES + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glClearDepth + GLdouble depth + + + + void glClearDepthdNV + GLdouble depth + + + + void glClearDepthf + GLfloat d + + + void glClearDepthfOES + GLclampf depth + + + + + void glClearDepthx + GLfixed depth + + + void glClearDepthxOES + GLfixed depth + + + void glClearIndex + GLfloat c + + + + void glClearNamedBufferData + GLuint buffer + GLenum internalformat + GLenum format + GLenum type + const void *data + + + void glClearNamedBufferDataEXT + GLuint buffer + GLenum internalformat + GLenum format + GLenum type + const void *data + + + void glClearNamedBufferSubData + GLuint buffer + GLenum internalformat + GLintptr offset + GLsizeiptr size + GLenum format + GLenum type + const void *data + + + void glClearNamedBufferSubDataEXT + GLuint buffer + GLenum internalformat + GLsizeiptr offset + GLsizeiptr size + GLenum format + GLenum type + const void *data + + + void glClearNamedFramebufferfi + GLuint framebuffer + GLenum buffer + GLint drawbuffer + GLfloat depth + GLint stencil + + + void glClearNamedFramebufferfv + GLuint framebuffer + GLenum buffer + GLint drawbuffer + const GLfloat *value + + + void glClearNamedFramebufferiv + GLuint framebuffer + GLenum buffer + GLint drawbuffer + const GLint *value + + + void glClearNamedFramebufferuiv + GLuint framebuffer + GLenum buffer + GLint drawbuffer + const GLuint *value + + + void glClearPixelLocalStorageuiEXT + GLsizei offset + GLsizei n + const GLuint *values + + + void glClearStencil + GLint s + + + + void glClearTexImage + GLuint texture + GLint level + GLenum format + GLenum type + const void *data + + + void glClearTexImageEXT + GLuint texture + GLint level + GLenum format + GLenum type + const void *data + + + + void glClearTexSubImage + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *data + + + void glClearTexSubImageEXT + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *data + + + + void glClientActiveTexture + GLenum texture + + + void glClientActiveTextureARB + GLenum texture + + + + void glClientActiveVertexStreamATI + GLenum stream + + + void glClientAttribDefaultEXT + GLbitfield mask + + + void glClientWaitSemaphoreui64NVX + GLsizei fenceObjectCount + const GLuint *semaphoreArray + const GLuint64 *fenceValueArray + + + GLenum glClientWaitSync + GLsync sync + GLbitfield flags + GLuint64 timeout + + + GLenum glClientWaitSyncAPPLE + GLsync sync + GLbitfield flags + GLuint64 timeout + + + + void glClipControl + GLenum origin + GLenum depth + + + void glClipControlEXT + GLenum origin + GLenum depth + + + + void glClipPlane + GLenum plane + const GLdouble *equation + + + + void glClipPlanef + GLenum p + const GLfloat *eqn + + + void glClipPlanefIMG + GLenum p + const GLfloat *eqn + + + void glClipPlanefOES + GLenum plane + const GLfloat *equation + + + + void glClipPlanex + GLenum plane + const GLfixed *equation + + + void glClipPlanexIMG + GLenum p + const GLfixed *eqn + + + void glClipPlanexOES + GLenum plane + const GLfixed *equation + + + void glColor3b + GLbyte red + GLbyte green + GLbyte blue + + + + void glColor3bv + const GLbyte *v + + + + void glColor3d + GLdouble red + GLdouble green + GLdouble blue + + + + void glColor3dv + const GLdouble *v + + + + void glColor3f + GLfloat red + GLfloat green + GLfloat blue + + + + void glColor3fVertex3fSUN + GLfloat r + GLfloat g + GLfloat b + GLfloat x + GLfloat y + GLfloat z + + + void glColor3fVertex3fvSUN + const GLfloat *c + const GLfloat *v + + + void glColor3fv + const GLfloat *v + + + + void glColor3hNV + GLhalfNV red + GLhalfNV green + GLhalfNV blue + + + + void glColor3hvNV + const GLhalfNV *v + + + + void glColor3i + GLint red + GLint green + GLint blue + + + + void glColor3iv + const GLint *v + + + + void glColor3s + GLshort red + GLshort green + GLshort blue + + + + void glColor3sv + const GLshort *v + + + + void glColor3ub + GLubyte red + GLubyte green + GLubyte blue + + + + void glColor3ubv + const GLubyte *v + + + + void glColor3ui + GLuint red + GLuint green + GLuint blue + + + + void glColor3uiv + const GLuint *v + + + + void glColor3us + GLushort red + GLushort green + GLushort blue + + + + void glColor3usv + const GLushort *v + + + + void glColor3xOES + GLfixed red + GLfixed green + GLfixed blue + + + void glColor3xvOES + const GLfixed *components + + + void glColor4b + GLbyte red + GLbyte green + GLbyte blue + GLbyte alpha + + + + void glColor4bv + const GLbyte *v + + + + void glColor4d + GLdouble red + GLdouble green + GLdouble blue + GLdouble alpha + + + + void glColor4dv + const GLdouble *v + + + + void glColor4f + GLfloat red + GLfloat green + GLfloat blue + GLfloat alpha + + + + void glColor4fNormal3fVertex3fSUN + GLfloat r + GLfloat g + GLfloat b + GLfloat a + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glColor4fNormal3fVertex3fvSUN + const GLfloat *c + const GLfloat *n + const GLfloat *v + + + void glColor4fv + const GLfloat *v + + + + void glColor4hNV + GLhalfNV red + GLhalfNV green + GLhalfNV blue + GLhalfNV alpha + + + + void glColor4hvNV + const GLhalfNV *v + + + + void glColor4i + GLint red + GLint green + GLint blue + GLint alpha + + + + void glColor4iv + const GLint *v + + + + void glColor4s + GLshort red + GLshort green + GLshort blue + GLshort alpha + + + + void glColor4sv + const GLshort *v + + + + void glColor4ub + GLubyte red + GLubyte green + GLubyte blue + GLubyte alpha + + + + void glColor4ubVertex2fSUN + GLubyte r + GLubyte g + GLubyte b + GLubyte a + GLfloat x + GLfloat y + + + void glColor4ubVertex2fvSUN + const GLubyte *c + const GLfloat *v + + + void glColor4ubVertex3fSUN + GLubyte r + GLubyte g + GLubyte b + GLubyte a + GLfloat x + GLfloat y + GLfloat z + + + void glColor4ubVertex3fvSUN + const GLubyte *c + const GLfloat *v + + + void glColor4ubv + const GLubyte *v + + + + void glColor4ui + GLuint red + GLuint green + GLuint blue + GLuint alpha + + + + void glColor4uiv + const GLuint *v + + + + void glColor4us + GLushort red + GLushort green + GLushort blue + GLushort alpha + + + + void glColor4usv + const GLushort *v + + + + void glColor4x + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glColor4xOES + GLfixed red + GLfixed green + GLfixed blue + GLfixed alpha + + + void glColor4xvOES + const GLfixed *components + + + void glColorFormatNV + GLint size + GLenum type + GLsizei stride + + + void glColorFragmentOp1ATI + GLenum op + GLuint dst + GLuint dstMask + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + + + void glColorFragmentOp2ATI + GLenum op + GLuint dst + GLuint dstMask + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + GLuint arg2 + GLuint arg2Rep + GLuint arg2Mod + + + void glColorFragmentOp3ATI + GLenum op + GLuint dst + GLuint dstMask + GLuint dstMod + GLuint arg1 + GLuint arg1Rep + GLuint arg1Mod + GLuint arg2 + GLuint arg2Rep + GLuint arg2Mod + GLuint arg3 + GLuint arg3Rep + GLuint arg3Mod + + + void glColorMask + GLboolean red + GLboolean green + GLboolean blue + GLboolean alpha + + + + void glColorMaskIndexedEXT + GLuint index + GLboolean r + GLboolean g + GLboolean b + GLboolean a + + + + + void glColorMaski + GLuint index + GLboolean r + GLboolean g + GLboolean b + GLboolean a + + + void glColorMaskiEXT + GLuint index + GLboolean r + GLboolean g + GLboolean b + GLboolean a + + + + void glColorMaskiOES + GLuint index + GLboolean r + GLboolean g + GLboolean b + GLboolean a + + + + void glColorMaterial + GLenum face + GLenum mode + + + + void glColorP3ui + GLenum type + GLuint color + + + void glColorP3uiv + GLenum type + const GLuint *color + + + void glColorP4ui + GLenum type + GLuint color + + + void glColorP4uiv + GLenum type + const GLuint *color + + + void glColorPointer + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glColorPointerEXT + GLint size + GLenum type + GLsizei stride + GLsizei count + const void *pointer + + + void glColorPointerListIBM + GLint size + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glColorPointervINTEL + GLint size + GLenum type + const void **pointer + + + void glColorSubTable + GLenum target + GLsizei start + GLsizei count + GLenum format + GLenum type + const void *data + + + + + void glColorSubTableEXT + GLenum target + GLsizei start + GLsizei count + GLenum format + GLenum type + const void *data + + + + void glColorTable + GLenum target + GLenum internalformat + GLsizei width + GLenum format + GLenum type + const void *table + + + + + void glColorTableEXT + GLenum target + GLenum internalFormat + GLsizei width + GLenum format + GLenum type + const void *table + + + + void glColorTableParameterfv + GLenum target + GLenum pname + const GLfloat *params + + + + void glColorTableParameterfvSGI + GLenum target + GLenum pname + const GLfloat *params + + + + + void glColorTableParameteriv + GLenum target + GLenum pname + const GLint *params + + + + void glColorTableParameterivSGI + GLenum target + GLenum pname + const GLint *params + + + + + void glColorTableSGI + GLenum target + GLenum internalformat + GLsizei width + GLenum format + GLenum type + const void *table + + + + + void glCombinerInputNV + GLenum stage + GLenum portion + GLenum variable + GLenum input + GLenum mapping + GLenum componentUsage + + + + void glCombinerOutputNV + GLenum stage + GLenum portion + GLenum abOutput + GLenum cdOutput + GLenum sumOutput + GLenum scale + GLenum bias + GLboolean abDotProduct + GLboolean cdDotProduct + GLboolean muxSum + + + + void glCombinerParameterfNV + GLenum pname + GLfloat param + + + + void glCombinerParameterfvNV + GLenum pname + const GLfloat *params + + + + void glCombinerParameteriNV + GLenum pname + GLint param + + + + void glCombinerParameterivNV + GLenum pname + const GLint *params + + + + void glCombinerStageParameterfvNV + GLenum stage + GLenum pname + const GLfloat *params + + + void glCommandListSegmentsNV + GLuint list + GLuint segments + + + void glCompileCommandListNV + GLuint list + + + void glCompileShader + GLuint shader + + + void glCompileShaderARB + GLhandleARB shaderObj + + + + void glCompileShaderIncludeARB + GLuint shader + GLsizei count + const GLchar *const*path + const GLint *length + + + void glCompressedMultiTexImage1DEXT + GLenum texunit + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedMultiTexImage2DEXT + GLenum texunit + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedMultiTexImage3DEXT + GLenum texunit + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedMultiTexSubImage1DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLsizei imageSize + const void *bits + + + void glCompressedMultiTexSubImage2DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLsizei imageSize + const void *bits + + + void glCompressedMultiTexSubImage3DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *bits + + + void glCompressedTexImage1D + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage1DARB + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage2D + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage2DARB + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage3D + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage3DARB + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLsizei imageSize + const void *data + + + + + void glCompressedTexImage3DOES + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLsizei imageSize + const void *data + + + void glCompressedTexSubImage1D + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage1DARB + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage2D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage2DARB + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage3D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage3DARB + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *data + + + + + void glCompressedTexSubImage3DOES + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *data + + + void glCompressedTextureImage1DEXT + GLuint texture + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedTextureImage2DEXT + GLuint texture + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedTextureImage3DEXT + GLuint texture + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLsizei imageSize + const void *bits + + + void glCompressedTextureSubImage1D + GLuint texture + GLint level + GLint xoffset + GLsizei width + GLenum format + GLsizei imageSize + const void *data + + + void glCompressedTextureSubImage1DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLsizei imageSize + const void *bits + + + void glCompressedTextureSubImage2D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLsizei imageSize + const void *data + + + void glCompressedTextureSubImage2DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLsizei imageSize + const void *bits + + + void glCompressedTextureSubImage3D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *data + + + void glCompressedTextureSubImage3DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLsizei imageSize + const void *bits + + + void glConservativeRasterParameterfNV + GLenum pname + GLfloat value + + + void glConservativeRasterParameteriNV + GLenum pname + GLint param + + + void glConvolutionFilter1D + GLenum target + GLenum internalformat + GLsizei width + GLenum format + GLenum type + const void *image + + + + + void glConvolutionFilter1DEXT + GLenum target + GLenum internalformat + GLsizei width + GLenum format + GLenum type + const void *image + + + + + void glConvolutionFilter2D + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *image + + + + + void glConvolutionFilter2DEXT + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *image + + + + + void glConvolutionParameterf + GLenum target + GLenum pname + GLfloat params + + + + void glConvolutionParameterfEXT + GLenum target + GLenum pname + GLfloat params + + + + + void glConvolutionParameterfv + GLenum target + GLenum pname + const GLfloat *params + + + + void glConvolutionParameterfvEXT + GLenum target + GLenum pname + const GLfloat *params + + + + + void glConvolutionParameteri + GLenum target + GLenum pname + GLint params + + + + void glConvolutionParameteriEXT + GLenum target + GLenum pname + GLint params + + + + + void glConvolutionParameteriv + GLenum target + GLenum pname + const GLint *params + + + + void glConvolutionParameterivEXT + GLenum target + GLenum pname + const GLint *params + + + + + void glConvolutionParameterxOES + GLenum target + GLenum pname + GLfixed param + + + void glConvolutionParameterxvOES + GLenum target + GLenum pname + const GLfixed *params + + + void glCopyBufferSubData + GLenum readTarget + GLenum writeTarget + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + + void glCopyBufferSubDataNV + GLenum readTarget + GLenum writeTarget + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + + void glCopyColorSubTable + GLenum target + GLsizei start + GLint x + GLint y + GLsizei width + + + + void glCopyColorSubTableEXT + GLenum target + GLsizei start + GLint x + GLint y + GLsizei width + + + + void glCopyColorTable + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + + + + void glCopyColorTableSGI + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + + + + + void glCopyConvolutionFilter1D + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + + + + void glCopyConvolutionFilter1DEXT + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + + + + + void glCopyConvolutionFilter2D + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + + + + void glCopyConvolutionFilter2DEXT + GLenum target + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + + + + + void glCopyImageSubData + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + + + void glCopyImageSubDataEXT + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + + + + void glCopyImageSubDataNV + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei width + GLsizei height + GLsizei depth + + + + void glCopyImageSubDataOES + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + + + + void glCopyMultiTexImage1DEXT + GLenum texunit + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLint border + + + void glCopyMultiTexImage2DEXT + GLenum texunit + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + GLint border + + + void glCopyMultiTexSubImage1DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint x + GLint y + GLsizei width + + + void glCopyMultiTexSubImage2DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyMultiTexSubImage3DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyNamedBufferSubData + GLuint readBuffer + GLuint writeBuffer + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + void glCopyPathNV + GLuint resultPath + GLuint srcPath + + + void glCopyPixels + GLint x + GLint y + GLsizei width + GLsizei height + GLenum type + + + + void glCopyTexImage1D + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLint border + + + + void glCopyTexImage1DEXT + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLint border + + + + + void glCopyTexImage2D + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + GLint border + + + + void glCopyTexImage2DEXT + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + GLint border + + + + + void glCopyTexSubImage1D + GLenum target + GLint level + GLint xoffset + GLint x + GLint y + GLsizei width + + + + void glCopyTexSubImage1DEXT + GLenum target + GLint level + GLint xoffset + GLint x + GLint y + GLsizei width + + + + + void glCopyTexSubImage2D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + + void glCopyTexSubImage2DEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + + + void glCopyTexSubImage3D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + + void glCopyTexSubImage3DEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + + + void glCopyTexSubImage3DOES + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyTextureImage1DEXT + GLuint texture + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLint border + + + void glCopyTextureImage2DEXT + GLuint texture + GLenum target + GLint level + GLenum internalformat + GLint x + GLint y + GLsizei width + GLsizei height + GLint border + + + void glCopyTextureLevelsAPPLE + GLuint destinationTexture + GLuint sourceTexture + GLint sourceBaseLevel + GLsizei sourceLevelCount + + + void glCopyTextureSubImage1D + GLuint texture + GLint level + GLint xoffset + GLint x + GLint y + GLsizei width + + + void glCopyTextureSubImage1DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint x + GLint y + GLsizei width + + + void glCopyTextureSubImage2D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyTextureSubImage2DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyTextureSubImage3D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCopyTextureSubImage3DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint x + GLint y + GLsizei width + GLsizei height + + + void glCoverFillPathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLenum coverMode + GLenum transformType + const GLfloat *transformValues + + + void glCoverFillPathNV + GLuint path + GLenum coverMode + + + void glCoverStrokePathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLenum coverMode + GLenum transformType + const GLfloat *transformValues + + + void glCoverStrokePathNV + GLuint path + GLenum coverMode + + + void glCoverageMaskNV + GLboolean mask + + + void glCoverageModulationNV + GLenum components + + + void glCoverageModulationTableNV + GLsizei n + const GLfloat *v + + + void glCoverageOperationNV + GLenum operation + + + void glCreateBuffers + GLsizei n + GLuint *buffers + + + void glCreateCommandListsNV + GLsizei n + GLuint *lists + + + void glCreateFramebuffers + GLsizei n + GLuint *framebuffers + + + void glCreateMemoryObjectsEXT + GLsizei n + GLuint *memoryObjects + + + void glCreatePerfQueryINTEL + GLuint queryId + GLuint *queryHandle + + + GLuint glCreateProgram + + + GLhandleARB glCreateProgramObjectARB + + + + void glCreateProgramPipelines + GLsizei n + GLuint *pipelines + + + GLuint glCreateProgressFenceNVX + + + void glCreateQueries + GLenum target + GLsizei n + GLuint *ids + + + void glCreateRenderbuffers + GLsizei n + GLuint *renderbuffers + + + void glCreateSamplers + GLsizei n + GLuint *samplers + + + void glCreateSemaphoresNV + GLsizei n + GLuint *semaphores + + + GLuint glCreateShader + GLenum type + + + GLhandleARB glCreateShaderObjectARB + GLenum shaderType + + + + GLuint glCreateShaderProgramEXT + GLenum type + const GLchar *string + + + GLuint glCreateShaderProgramv + GLenum type + GLsizei count + const GLchar *const*strings + + + GLuint glCreateShaderProgramvEXT + GLenum type + GLsizei count + const GLchar *const*strings + + + void glCreateStatesNV + GLsizei n + GLuint *states + + + GLsync glCreateSyncFromCLeventARB + struct _cl_context *context + struct _cl_event *event + GLbitfield flags + + + void glCreateTextures + GLenum target + GLsizei n + GLuint *textures + + + void glCreateTransformFeedbacks + GLsizei n + GLuint *ids + + + void glCreateVertexArrays + GLsizei n + GLuint *arrays + + + void glCullFace + GLenum mode + + + + void glCullParameterdvEXT + GLenum pname + GLdouble *params + + + void glCullParameterfvEXT + GLenum pname + GLfloat *params + + + void glCurrentPaletteMatrixARB + GLint index + + + + void glCurrentPaletteMatrixOES + GLuint matrixpaletteindex + + + void glDebugMessageCallback + GLDEBUGPROC callback + const void *userParam + + + void glDebugMessageCallbackAMD + GLDEBUGPROCAMD callback + void *userParam + + + void glDebugMessageCallbackARB + GLDEBUGPROCARB callback + const void *userParam + + + + void glDebugMessageCallbackKHR + GLDEBUGPROCKHR callback + const void *userParam + + + + void glDebugMessageControl + GLenum source + GLenum type + GLenum severity + GLsizei count + const GLuint *ids + GLboolean enabled + + + void glDebugMessageControlARB + GLenum source + GLenum type + GLenum severity + GLsizei count + const GLuint *ids + GLboolean enabled + + + + void glDebugMessageControlKHR + GLenum source + GLenum type + GLenum severity + GLsizei count + const GLuint *ids + GLboolean enabled + + + + void glDebugMessageEnableAMD + GLenum category + GLenum severity + GLsizei count + const GLuint *ids + GLboolean enabled + + + void glDebugMessageInsert + GLenum source + GLenum type + GLuint id + GLenum severity + GLsizei length + const GLchar *buf + + + void glDebugMessageInsertAMD + GLenum category + GLenum severity + GLuint id + GLsizei length + const GLchar *buf + + + void glDebugMessageInsertARB + GLenum source + GLenum type + GLuint id + GLenum severity + GLsizei length + const GLchar *buf + + + + void glDebugMessageInsertKHR + GLenum source + GLenum type + GLuint id + GLenum severity + GLsizei length + const GLchar *buf + + + + void glDeformSGIX + GLbitfield mask + + + + void glDeformationMap3dSGIX + GLenum target + GLdouble u1 + GLdouble u2 + GLint ustride + GLint uorder + GLdouble v1 + GLdouble v2 + GLint vstride + GLint vorder + GLdouble w1 + GLdouble w2 + GLint wstride + GLint worder + const GLdouble *points + + + + void glDeformationMap3fSGIX + GLenum target + GLfloat u1 + GLfloat u2 + GLint ustride + GLint uorder + GLfloat v1 + GLfloat v2 + GLint vstride + GLint vorder + GLfloat w1 + GLfloat w2 + GLint wstride + GLint worder + const GLfloat *points + + + + void glDeleteAsyncMarkersSGIX + GLuint marker + GLsizei range + + + void glDeleteBuffers + GLsizei n + const GLuint *buffers + + + void glDeleteBuffersARB + GLsizei n + const GLuint *buffers + + + + void glDeleteCommandListsNV + GLsizei n + const GLuint *lists + + + void glDeleteFencesAPPLE + GLsizei n + const GLuint *fences + + + void glDeleteFencesNV + GLsizei n + const GLuint *fences + + + + void glDeleteFragmentShaderATI + GLuint id + + + void glDeleteFramebuffers + GLsizei n + const GLuint *framebuffers + + + + void glDeleteFramebuffersEXT + GLsizei n + const GLuint *framebuffers + + + + + void glDeleteFramebuffersOES + GLsizei n + const GLuint *framebuffers + + + void glDeleteLists + GLuint list + GLsizei range + + + + void glDeleteMemoryObjectsEXT + GLsizei n + const GLuint *memoryObjects + + + void glDeleteNamedStringARB + GLint namelen + const GLchar *name + + + void glDeleteNamesAMD + GLenum identifier + GLuint num + const GLuint *names + + + void glDeleteObjectARB + GLhandleARB obj + + + void glDeleteOcclusionQueriesNV + GLsizei n + const GLuint *ids + + + void glDeletePathsNV + GLuint path + GLsizei range + + + void glDeletePerfMonitorsAMD + GLsizei n + GLuint *monitors + + + void glDeletePerfQueryINTEL + GLuint queryHandle + + + void glDeleteProgram + GLuint program + + + + void glDeleteProgramPipelines + GLsizei n + const GLuint *pipelines + + + void glDeleteProgramPipelinesEXT + GLsizei n + const GLuint *pipelines + + + void glDeleteProgramsARB + GLsizei n + const GLuint *programs + + + + void glDeleteProgramsNV + GLsizei n + const GLuint *programs + + + + + void glDeleteQueries + GLsizei n + const GLuint *ids + + + + void glDeleteQueriesARB + GLsizei n + const GLuint *ids + + + + void glDeleteQueriesEXT + GLsizei n + const GLuint *ids + + + void glDeleteQueryResourceTagNV + GLsizei n + const GLint *tagIds + + + void glDeleteRenderbuffers + GLsizei n + const GLuint *renderbuffers + + + + void glDeleteRenderbuffersEXT + GLsizei n + const GLuint *renderbuffers + + + + + void glDeleteRenderbuffersOES + GLsizei n + const GLuint *renderbuffers + + + void glDeleteSamplers + GLsizei count + const GLuint *samplers + + + void glDeleteSemaphoresEXT + GLsizei n + const GLuint *semaphores + + + void glDeleteShader + GLuint shader + + + + void glDeleteStatesNV + GLsizei n + const GLuint *states + + + void glDeleteSync + GLsync sync + + + void glDeleteSyncAPPLE + GLsync sync + + + + void glDeleteTextures + GLsizei n + const GLuint *textures + + + + void glDeleteTexturesEXT + GLsizei n + const GLuint *textures + + + + void glDeleteTransformFeedbacks + GLsizei n + const GLuint *ids + + + void glDeleteTransformFeedbacksNV + GLsizei n + const GLuint *ids + + + + void glDeleteVertexArrays + GLsizei n + const GLuint *arrays + + + + void glDeleteVertexArraysAPPLE + GLsizei n + const GLuint *arrays + + + + void glDeleteVertexArraysOES + GLsizei n + const GLuint *arrays + + + + void glDeleteVertexShaderEXT + GLuint id + + + void glDepthBoundsEXT + GLclampd zmin + GLclampd zmax + + + + void glDepthBoundsdNV + GLdouble zmin + GLdouble zmax + + + + void glDepthFunc + GLenum func + + + + void glDepthMask + GLboolean flag + + + + void glDepthRange + GLdouble n + GLdouble f + + + + void glDepthRangeArraydvNV + GLuint first + GLsizei count + const GLdouble *v + + + void glDepthRangeArrayfvNV + GLuint first + GLsizei count + const GLfloat *v + + + void glDepthRangeArrayfvOES + GLuint first + GLsizei count + const GLfloat *v + + + void glDepthRangeArrayv + GLuint first + GLsizei count + const GLdouble *v + + + void glDepthRangeIndexed + GLuint index + GLdouble n + GLdouble f + + + void glDepthRangeIndexeddNV + GLuint index + GLdouble n + GLdouble f + + + void glDepthRangeIndexedfNV + GLuint index + GLfloat n + GLfloat f + + + void glDepthRangeIndexedfOES + GLuint index + GLfloat n + GLfloat f + + + void glDepthRangedNV + GLdouble zNear + GLdouble zFar + + + + void glDepthRangef + GLfloat n + GLfloat f + + + void glDepthRangefOES + GLclampf n + GLclampf f + + + + + void glDepthRangex + GLfixed n + GLfixed f + + + void glDepthRangexOES + GLfixed n + GLfixed f + + + void glDetachObjectARB + GLhandleARB containerObj + GLhandleARB attachedObj + + + + void glDetachShader + GLuint program + GLuint shader + + + void glDetailTexFuncSGIS + GLenum target + GLsizei n + const GLfloat *points + + + + void glDisable + GLenum cap + + + + void glDisableClientState + GLenum array + + + void glDisableClientStateIndexedEXT + GLenum array + GLuint index + + + void glDisableClientStateiEXT + GLenum array + GLuint index + + + void glDisableDriverControlQCOM + GLuint driverControl + + + void glDisableIndexedEXT + GLenum target + GLuint index + + + + + void glDisableVariantClientStateEXT + GLuint id + + + void glDisableVertexArrayAttrib + GLuint vaobj + GLuint index + + + void glDisableVertexArrayAttribEXT + GLuint vaobj + GLuint index + + + void glDisableVertexArrayEXT + GLuint vaobj + GLenum array + + + void glDisableVertexAttribAPPLE + GLuint index + GLenum pname + + + void glDisableVertexAttribArray + GLuint index + + + void glDisableVertexAttribArrayARB + GLuint index + + + + void glDisablei + GLenum target + GLuint index + + + void glDisableiEXT + GLenum target + GLuint index + + + + void glDisableiNV + GLenum target + GLuint index + + + + void glDisableiOES + GLenum target + GLuint index + + + + void glDiscardFramebufferEXT + GLenum target + GLsizei numAttachments + const GLenum *attachments + + + void glDispatchCompute + GLuint num_groups_x + GLuint num_groups_y + GLuint num_groups_z + + + void glDispatchComputeGroupSizeARB + GLuint num_groups_x + GLuint num_groups_y + GLuint num_groups_z + GLuint group_size_x + GLuint group_size_y + GLuint group_size_z + + + void glDispatchComputeIndirect + GLintptr indirect + + + void glDrawArrays + GLenum mode + GLint first + GLsizei count + + + + void glDrawArraysEXT + GLenum mode + GLint first + GLsizei count + + + + + void glDrawArraysIndirect + GLenum mode + const void *indirect + + + void glDrawArraysInstanced + GLenum mode + GLint first + GLsizei count + GLsizei instancecount + + + void glDrawArraysInstancedANGLE + GLenum mode + GLint first + GLsizei count + GLsizei primcount + + + + void glDrawArraysInstancedARB + GLenum mode + GLint first + GLsizei count + GLsizei primcount + + + + void glDrawArraysInstancedBaseInstance + GLenum mode + GLint first + GLsizei count + GLsizei instancecount + GLuint baseinstance + + + void glDrawArraysInstancedBaseInstanceEXT + GLenum mode + GLint first + GLsizei count + GLsizei instancecount + GLuint baseinstance + + + + void glDrawArraysInstancedEXT + GLenum mode + GLint start + GLsizei count + GLsizei primcount + + + + void glDrawArraysInstancedNV + GLenum mode + GLint first + GLsizei count + GLsizei primcount + + + + void glDrawBuffer + GLenum buf + + + + void glDrawBuffers + GLsizei n + const GLenum *bufs + + + + void glDrawBuffersARB + GLsizei n + const GLenum *bufs + + + + void glDrawBuffersATI + GLsizei n + const GLenum *bufs + + + + + void glDrawBuffersEXT + GLsizei n + const GLenum *bufs + + + + void glDrawBuffersIndexedEXT + GLint n + const GLenum *location + const GLint *indices + + + void glDrawBuffersNV + GLsizei n + const GLenum *bufs + + + void glDrawCommandsAddressNV + GLenum primitiveMode + const GLuint64 *indirects + const GLsizei *sizes + GLuint count + + + void glDrawCommandsNV + GLenum primitiveMode + GLuint buffer + const GLintptr *indirects + const GLsizei *sizes + GLuint count + + + void glDrawCommandsStatesAddressNV + const GLuint64 *indirects + const GLsizei *sizes + const GLuint *states + const GLuint *fbos + GLuint count + + + void glDrawCommandsStatesNV + GLuint buffer + const GLintptr *indirects + const GLsizei *sizes + const GLuint *states + const GLuint *fbos + GLuint count + + + void glDrawElementArrayAPPLE + GLenum mode + GLint first + GLsizei count + + + void glDrawElementArrayATI + GLenum mode + GLsizei count + + + void glDrawElements + GLenum mode + GLsizei count + GLenum type + const void *indices + + + void glDrawElementsBaseVertex + GLenum mode + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + void glDrawElementsBaseVertexEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + + void glDrawElementsBaseVertexOES + GLenum mode + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + + void glDrawElementsIndirect + GLenum mode + GLenum type + const void *indirect + + + void glDrawElementsInstanced + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + + + void glDrawElementsInstancedANGLE + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei primcount + + + + void glDrawElementsInstancedARB + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei primcount + + + + void glDrawElementsInstancedBaseInstance + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLuint baseinstance + + + void glDrawElementsInstancedBaseInstanceEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLuint baseinstance + + + + void glDrawElementsInstancedBaseVertex + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + + + void glDrawElementsInstancedBaseVertexBaseInstance + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + GLuint baseinstance + + + void glDrawElementsInstancedBaseVertexBaseInstanceEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + GLuint baseinstance + + + + void glDrawElementsInstancedBaseVertexEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + + + + void glDrawElementsInstancedBaseVertexOES + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei instancecount + GLint basevertex + + + + void glDrawElementsInstancedEXT + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei primcount + + + + void glDrawElementsInstancedNV + GLenum mode + GLsizei count + GLenum type + const void *indices + GLsizei primcount + + + + void glDrawMeshArraysSUN + GLenum mode + GLint first + GLsizei count + GLsizei width + + + void glDrawMeshTasksEXT + GLuint num_groups_x + GLuint num_groups_y + GLuint num_groups_z + + + void glDrawMeshTasksNV + GLuint first + GLuint count + + + void glDrawMeshTasksIndirectEXT + GLintptr indirect + + + void glDrawMeshTasksIndirectNV + GLintptr indirect + + + void glDrawPixels + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + + + void glDrawRangeElementArrayAPPLE + GLenum mode + GLuint start + GLuint end + GLint first + GLsizei count + + + void glDrawRangeElementArrayATI + GLenum mode + GLuint start + GLuint end + GLsizei count + + + void glDrawRangeElements + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + + + void glDrawRangeElementsBaseVertex + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + void glDrawRangeElementsBaseVertexEXT + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + + void glDrawRangeElementsBaseVertexOES + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + GLint basevertex + + + + void glDrawRangeElementsEXT + GLenum mode + GLuint start + GLuint end + GLsizei count + GLenum type + const void *indices + + + + void glDrawTexfOES + GLfloat x + GLfloat y + GLfloat z + GLfloat width + GLfloat height + + + + void glDrawTexfvOES + const GLfloat *coords + + + void glDrawTexiOES + GLint x + GLint y + GLint z + GLint width + GLint height + + + + void glDrawTexivOES + const GLint *coords + + + void glDrawTexsOES + GLshort x + GLshort y + GLshort z + GLshort width + GLshort height + + + + void glDrawTexsvOES + const GLshort *coords + + + void glDrawTextureNV + GLuint texture + GLuint sampler + GLfloat x0 + GLfloat y0 + GLfloat x1 + GLfloat y1 + GLfloat z + GLfloat s0 + GLfloat t0 + GLfloat s1 + GLfloat t1 + + + void glDrawTexxOES + GLfixed x + GLfixed y + GLfixed z + GLfixed width + GLfixed height + + + + void glDrawTexxvOES + const GLfixed *coords + + + void glDrawTransformFeedback + GLenum mode + GLuint id + + + void glDrawTransformFeedbackEXT + GLenum mode + GLuint id + + + + void glDrawTransformFeedbackInstanced + GLenum mode + GLuint id + GLsizei instancecount + + + void glDrawTransformFeedbackInstancedEXT + GLenum mode + GLuint id + GLsizei instancecount + + + + void glDrawTransformFeedbackNV + GLenum mode + GLuint id + + + + void glDrawTransformFeedbackStream + GLenum mode + GLuint id + GLuint stream + + + void glDrawTransformFeedbackStreamInstanced + GLenum mode + GLuint id + GLuint stream + GLsizei instancecount + + + void glEGLImageTargetRenderbufferStorageOES + GLenum target + GLeglImageOES image + + + void glEGLImageTargetTexStorageEXT + GLenum target + GLeglImageOES image + const GLint* attrib_list + + + void glEGLImageTargetTexture2DOES + GLenum target + GLeglImageOES image + + + void glEGLImageTargetTextureStorageEXT + GLuint texture + GLeglImageOES image + const GLint* attrib_list + + + void glEdgeFlag + GLboolean flag + + + + void glEdgeFlagFormatNV + GLsizei stride + + + void glEdgeFlagPointer + GLsizei stride + const void *pointer + + + void glEdgeFlagPointerEXT + GLsizei stride + GLsizei count + const GLboolean *pointer + + + void glEdgeFlagPointerListIBM + GLint stride + const GLboolean **pointer + GLint ptrstride + + + void glEdgeFlagv + const GLboolean *flag + + + + void glElementPointerAPPLE + GLenum type + const void *pointer + + + void glElementPointerATI + GLenum type + const void *pointer + + + void glEnable + GLenum cap + + + + void glEnableClientState + GLenum array + + + void glEnableClientStateIndexedEXT + GLenum array + GLuint index + + + void glEnableClientStateiEXT + GLenum array + GLuint index + + + void glEnableDriverControlQCOM + GLuint driverControl + + + void glEnableIndexedEXT + GLenum target + GLuint index + + + + + void glEnableVariantClientStateEXT + GLuint id + + + void glEnableVertexArrayAttrib + GLuint vaobj + GLuint index + + + void glEnableVertexArrayAttribEXT + GLuint vaobj + GLuint index + + + void glEnableVertexArrayEXT + GLuint vaobj + GLenum array + + + void glEnableVertexAttribAPPLE + GLuint index + GLenum pname + + + void glEnableVertexAttribArray + GLuint index + + + void glEnableVertexAttribArrayARB + GLuint index + + + + void glEnablei + GLenum target + GLuint index + + + void glEnableiEXT + GLenum target + GLuint index + + + + void glEnableiNV + GLenum target + GLuint index + + + + void glEnableiOES + GLenum target + GLuint index + + + + void glEnd + + + + void glEndConditionalRender + + + + void glEndConditionalRenderNV + + + + void glEndConditionalRenderNVX + + + + void glEndFragmentShaderATI + + + void glEndList + + + + void glEndOcclusionQueryNV + + + void glEndPerfMonitorAMD + GLuint monitor + + + void glEndPerfQueryINTEL + GLuint queryHandle + + + void glEndQuery + GLenum target + + + + void glEndQueryARB + GLenum target + + + + void glEndQueryEXT + GLenum target + + + void glEndQueryIndexed + GLenum target + GLuint index + + + void glEndTilingQCOM + GLbitfield preserveMask + + + void glEndTransformFeedback + + + + void glEndTransformFeedbackEXT + + + + void glEndTransformFeedbackNV + + + + void glEndVertexShaderEXT + + + void glEndVideoCaptureNV + GLuint video_capture_slot + + + void glEvalCoord1d + GLdouble u + + + + void glEvalCoord1dv + const GLdouble *u + + + + void glEvalCoord1f + GLfloat u + + + + void glEvalCoord1fv + const GLfloat *u + + + + void glEvalCoord1xOES + GLfixed u + + + void glEvalCoord1xvOES + const GLfixed *coords + + + void glEvalCoord2d + GLdouble u + GLdouble v + + + + void glEvalCoord2dv + const GLdouble *u + + + + void glEvalCoord2f + GLfloat u + GLfloat v + + + + void glEvalCoord2fv + const GLfloat *u + + + + void glEvalCoord2xOES + GLfixed u + GLfixed v + + + void glEvalCoord2xvOES + const GLfixed *coords + + + void glEvalMapsNV + GLenum target + GLenum mode + + + void glEvalMesh1 + GLenum mode + GLint i1 + GLint i2 + + + + void glEvalMesh2 + GLenum mode + GLint i1 + GLint i2 + GLint j1 + GLint j2 + + + + void glEvalPoint1 + GLint i + + + + void glEvalPoint2 + GLint i + GLint j + + + + void glEvaluateDepthValuesARB + + + void glExecuteProgramNV + GLenum target + GLuint id + const GLfloat *params + + + + void glExtGetBufferPointervQCOM + GLenum target + void **params + + + void glExtGetBuffersQCOM + GLuint *buffers + GLint maxBuffers + GLint *numBuffers + + + void glExtGetFramebuffersQCOM + GLuint *framebuffers + GLint maxFramebuffers + GLint *numFramebuffers + + + void glExtGetProgramBinarySourceQCOM + GLuint program + GLenum shadertype + GLchar *source + GLint *length + + + void glExtGetProgramsQCOM + GLuint *programs + GLint maxPrograms + GLint *numPrograms + + + void glExtGetRenderbuffersQCOM + GLuint *renderbuffers + GLint maxRenderbuffers + GLint *numRenderbuffers + + + void glExtGetShadersQCOM + GLuint *shaders + GLint maxShaders + GLint *numShaders + + + void glExtGetTexLevelParameterivQCOM + GLuint texture + GLenum face + GLint level + GLenum pname + GLint *params + + + void glExtGetTexSubImageQCOM + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + void *texels + + + void glExtGetTexturesQCOM + GLuint *textures + GLint maxTextures + GLint *numTextures + + + GLboolean glExtIsProgramBinaryQCOM + GLuint program + + + void glExtTexObjectStateOverrideiQCOM + GLenum target + GLenum pname + GLint param + + + void glExtractComponentEXT + GLuint res + GLuint src + GLuint num + + + void glFeedbackBuffer + GLsizei size + GLenum type + GLfloat *buffer + + + + void glFeedbackBufferxOES + GLsizei n + GLenum type + const GLfixed *buffer + + + GLsync glFenceSync + GLenum condition + GLbitfield flags + + + GLsync glFenceSyncAPPLE + GLenum condition + GLbitfield flags + + + + void glFinalCombinerInputNV + GLenum variable + GLenum input + GLenum mapping + GLenum componentUsage + + + + void glFinish + + + + GLint glFinishAsyncSGIX + GLuint *markerp + + + void glFinishFenceAPPLE + GLuint fence + + + void glFinishFenceNV + GLuint fence + + + + void glFinishObjectAPPLE + GLenum object + GLint name + + + void glFinishTextureSUNX + + + void glFlush + + + + void glFlushMappedBufferRange + GLenum target + GLintptr offset + GLsizeiptr length + + + void glFlushMappedBufferRangeAPPLE + GLenum target + GLintptr offset + GLsizeiptr size + + + + void glFlushMappedBufferRangeEXT + GLenum target + GLintptr offset + GLsizeiptr length + + + + void glFlushMappedNamedBufferRange + GLuint buffer + GLintptr offset + GLsizeiptr length + + + void glFlushMappedNamedBufferRangeEXT + GLuint buffer + GLintptr offset + GLsizeiptr length + + + void glFlushPixelDataRangeNV + GLenum target + + + void glFlushRasterSGIX + + + + void glFlushStaticDataIBM + GLenum target + + + void glFlushVertexArrayRangeAPPLE + GLsizei length + void *pointer + + + void glFlushVertexArrayRangeNV + + + void glFogCoordFormatNV + GLenum type + GLsizei stride + + + void glFogCoordPointer + GLenum type + GLsizei stride + const void *pointer + + + void glFogCoordPointerEXT + GLenum type + GLsizei stride + const void *pointer + + + + void glFogCoordPointerListIBM + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glFogCoordd + GLdouble coord + + + + void glFogCoorddEXT + GLdouble coord + + + + + void glFogCoorddv + const GLdouble *coord + + + + void glFogCoorddvEXT + const GLdouble *coord + + + + + void glFogCoordf + GLfloat coord + + + + void glFogCoordfEXT + GLfloat coord + + + + + void glFogCoordfv + const GLfloat *coord + + + + void glFogCoordfvEXT + const GLfloat *coord + + + + + void glFogCoordhNV + GLhalfNV fog + + + + void glFogCoordhvNV + const GLhalfNV *fog + + + + void glFogFuncSGIS + GLsizei n + const GLfloat *points + + + + void glFogf + GLenum pname + GLfloat param + + + + void glFogfv + GLenum pname + const GLfloat *params + + + + void glFogi + GLenum pname + GLint param + + + + void glFogiv + GLenum pname + const GLint *params + + + + void glFogx + GLenum pname + GLfixed param + + + void glFogxOES + GLenum pname + GLfixed param + + + void glFogxv + GLenum pname + const GLfixed *param + + + void glFogxvOES + GLenum pname + const GLfixed *param + + + void glFragmentColorMaterialSGIX + GLenum face + GLenum mode + + + void glFragmentCoverageColorNV + GLuint color + + + void glFragmentLightModelfSGIX + GLenum pname + GLfloat param + + + void glFragmentLightModelfvSGIX + GLenum pname + const GLfloat *params + + + void glFragmentLightModeliSGIX + GLenum pname + GLint param + + + void glFragmentLightModelivSGIX + GLenum pname + const GLint *params + + + void glFragmentLightfSGIX + GLenum light + GLenum pname + GLfloat param + + + void glFragmentLightfvSGIX + GLenum light + GLenum pname + const GLfloat *params + + + void glFragmentLightiSGIX + GLenum light + GLenum pname + GLint param + + + void glFragmentLightivSGIX + GLenum light + GLenum pname + const GLint *params + + + void glFragmentMaterialfSGIX + GLenum face + GLenum pname + GLfloat param + + + void glFragmentMaterialfvSGIX + GLenum face + GLenum pname + const GLfloat *params + + + void glFragmentMaterialiSGIX + GLenum face + GLenum pname + GLint param + + + void glFragmentMaterialivSGIX + GLenum face + GLenum pname + const GLint *params + + + void glFrameTerminatorGREMEDY + + + void glFrameZoomSGIX + GLint factor + + + + void glFramebufferDrawBufferEXT + GLuint framebuffer + GLenum mode + + + void glFramebufferDrawBuffersEXT + GLuint framebuffer + GLsizei n + const GLenum *bufs + + + void glFramebufferFetchBarrierEXT + + + void glFramebufferFetchBarrierQCOM + + + void glFramebufferFoveationConfigQCOM + GLuint framebuffer + GLuint numLayers + GLuint focalPointsPerLayer + GLuint requestedFeatures + GLuint *providedFeatures + + + void glFramebufferFoveationParametersQCOM + GLuint framebuffer + GLuint layer + GLuint focalPoint + GLfloat focalX + GLfloat focalY + GLfloat gainX + GLfloat gainY + GLfloat foveaArea + + + void glFramebufferParameteri + GLenum target + GLenum pname + GLint param + + + void glFramebufferPixelLocalStorageSizeEXT + GLuint target + GLsizei size + + + void glFramebufferReadBufferEXT + GLuint framebuffer + GLenum mode + + + void glFramebufferRenderbuffer + GLenum target + GLenum attachment + GLenum renderbuffertarget + GLuint renderbuffer + + + + void glFramebufferRenderbufferEXT + GLenum target + GLenum attachment + GLenum renderbuffertarget + GLuint renderbuffer + + + + + void glFramebufferRenderbufferOES + GLenum target + GLenum attachment + GLenum renderbuffertarget + GLuint renderbuffer + + + void glFramebufferSampleLocationsfvARB + GLenum target + GLuint start + GLsizei count + const GLfloat *v + + + void glFramebufferSampleLocationsfvNV + GLenum target + GLuint start + GLsizei count + const GLfloat *v + + + void glFramebufferSamplePositionsfvAMD + GLenum target + GLuint numsamples + GLuint pixelindex + const GLfloat *values + + + void glFramebufferShadingRateEXT + GLenum target + GLenum attachment + GLuint texture + GLint baseLayer + GLsizei numLayers + GLsizei texelWidth + GLsizei texelHeight + + + void glFramebufferTexture + GLenum target + GLenum attachment + GLuint texture + GLint level + + + void glFramebufferTexture1D + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + + void glFramebufferTexture1DEXT + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + + + void glFramebufferTexture2D + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + + void glFramebufferTexture2DEXT + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + + + void glFramebufferTexture2DDownsampleIMG + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint xscale + GLint yscale + + + void glFramebufferTexture2DMultisampleEXT + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLsizei samples + + + void glFramebufferTexture2DMultisampleIMG + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLsizei samples + + + void glFramebufferTexture2DOES + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + void glFramebufferTexture3D + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint zoffset + + + + void glFramebufferTexture3DEXT + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint zoffset + + + + + void glFramebufferTexture3DOES + GLenum target + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint zoffset + + + void glFramebufferTextureARB + GLenum target + GLenum attachment + GLuint texture + GLint level + + + + void glFramebufferTextureEXT + GLenum target + GLenum attachment + GLuint texture + GLint level + + + + void glFramebufferTextureFaceARB + GLenum target + GLenum attachment + GLuint texture + GLint level + GLenum face + + + void glFramebufferTextureFaceEXT + GLenum target + GLenum attachment + GLuint texture + GLint level + GLenum face + + + + void glFramebufferTextureLayer + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint layer + + + + void glFramebufferTextureLayerARB + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint layer + + + + void glFramebufferTextureLayerEXT + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint layer + + + + void glFramebufferTextureLayerDownsampleIMG + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint layer + GLint xscale + GLint yscale + + + void glFramebufferTextureMultisampleMultiviewOVR + GLenum target + GLenum attachment + GLuint texture + GLint level + GLsizei samples + GLint baseViewIndex + GLsizei numViews + + + void glFramebufferTextureMultiviewOVR + GLenum target + GLenum attachment + GLuint texture + GLint level + GLint baseViewIndex + GLsizei numViews + + + void glFramebufferTextureOES + GLenum target + GLenum attachment + GLuint texture + GLint level + + + + void glFreeObjectBufferATI + GLuint buffer + + + void glFrontFace + GLenum mode + + + + void glFrustum + GLdouble left + GLdouble right + GLdouble bottom + GLdouble top + GLdouble zNear + GLdouble zFar + + + + void glFrustumf + GLfloat l + GLfloat r + GLfloat b + GLfloat t + GLfloat n + GLfloat f + + + void glFrustumfOES + GLfloat l + GLfloat r + GLfloat b + GLfloat t + GLfloat n + GLfloat f + + + + void glFrustumx + GLfixed l + GLfixed r + GLfixed b + GLfixed t + GLfixed n + GLfixed f + + + void glFrustumxOES + GLfixed l + GLfixed r + GLfixed b + GLfixed t + GLfixed n + GLfixed f + + + GLuint glGenAsyncMarkersSGIX + GLsizei range + + + void glGenBuffers + GLsizei n + GLuint *buffers + + + void glGenBuffersARB + GLsizei n + GLuint *buffers + + + + void glGenFencesAPPLE + GLsizei n + GLuint *fences + + + void glGenFencesNV + GLsizei n + GLuint *fences + + + + GLuint glGenFragmentShadersATI + GLuint range + + + void glGenFramebuffers + GLsizei n + GLuint *framebuffers + + + + void glGenFramebuffersEXT + GLsizei n + GLuint *framebuffers + + + + + void glGenFramebuffersOES + GLsizei n + GLuint *framebuffers + + + GLuint glGenLists + GLsizei range + + + + void glGenNamesAMD + GLenum identifier + GLuint num + GLuint *names + + + void glGenOcclusionQueriesNV + GLsizei n + GLuint *ids + + + GLuint glGenPathsNV + GLsizei range + + + void glGenPerfMonitorsAMD + GLsizei n + GLuint *monitors + + + void glGenProgramPipelines + GLsizei n + GLuint *pipelines + + + void glGenProgramPipelinesEXT + GLsizei n + GLuint *pipelines + + + void glGenProgramsARB + GLsizei n + GLuint *programs + + + + void glGenProgramsNV + GLsizei n + GLuint *programs + + + + + void glGenQueries + GLsizei n + GLuint *ids + + + + void glGenQueriesARB + GLsizei n + GLuint *ids + + + + void glGenQueriesEXT + GLsizei n + GLuint *ids + + + void glGenQueryResourceTagNV + GLsizei n + GLint *tagIds + + + void glGenRenderbuffers + GLsizei n + GLuint *renderbuffers + + + + void glGenRenderbuffersEXT + GLsizei n + GLuint *renderbuffers + + + + + void glGenRenderbuffersOES + GLsizei n + GLuint *renderbuffers + + + void glGenSamplers + GLsizei count + GLuint *samplers + + + void glGenSemaphoresEXT + GLsizei n + GLuint *semaphores + + + GLuint glGenSymbolsEXT + GLenum datatype + GLenum storagetype + GLenum range + GLuint components + + + void glGenTextures + GLsizei n + GLuint *textures + + + + void glGenTexturesEXT + GLsizei n + GLuint *textures + + + + void glGenTransformFeedbacks + GLsizei n + GLuint *ids + + + void glGenTransformFeedbacksNV + GLsizei n + GLuint *ids + + + + void glGenVertexArrays + GLsizei n + GLuint *arrays + + + + void glGenVertexArraysAPPLE + GLsizei n + GLuint *arrays + + + + void glGenVertexArraysOES + GLsizei n + GLuint *arrays + + + + GLuint glGenVertexShadersEXT + GLuint range + + + void glGenerateMipmap + GLenum target + + + + void glGenerateMipmapEXT + GLenum target + + + + + void glGenerateMipmapOES + GLenum target + + + void glGenerateMultiTexMipmapEXT + GLenum texunit + GLenum target + + + void glGenerateTextureMipmap + GLuint texture + + + void glGenerateTextureMipmapEXT + GLuint texture + GLenum target + + + void glGetActiveAtomicCounterBufferiv + GLuint program + GLuint bufferIndex + GLenum pname + GLint *params + + + void glGetActiveAttrib + GLuint program + GLuint index + GLsizei bufSize + GLsizei *length + GLint *size + GLenum *type + GLchar *name + + + void glGetActiveAttribARB + GLhandleARB programObj + GLuint index + GLsizei maxLength + GLsizei *length + GLint *size + GLenum *type + GLcharARB *name + + + + void glGetActiveSubroutineName + GLuint program + GLenum shadertype + GLuint index + GLsizei bufSize + GLsizei *length + GLchar *name + + + void glGetActiveSubroutineUniformName + GLuint program + GLenum shadertype + GLuint index + GLsizei bufSize + GLsizei *length + GLchar *name + + + void glGetActiveSubroutineUniformiv + GLuint program + GLenum shadertype + GLuint index + GLenum pname + GLint *values + + + void glGetActiveUniform + GLuint program + GLuint index + GLsizei bufSize + GLsizei *length + GLint *size + GLenum *type + GLchar *name + + + void glGetActiveUniformARB + GLhandleARB programObj + GLuint index + GLsizei maxLength + GLsizei *length + GLint *size + GLenum *type + GLcharARB *name + + + + void glGetActiveUniformBlockName + GLuint program + GLuint uniformBlockIndex + GLsizei bufSize + GLsizei *length + GLchar *uniformBlockName + + + + void glGetActiveUniformBlockiv + GLuint program + GLuint uniformBlockIndex + GLenum pname + GLint *params + + + + void glGetActiveUniformName + GLuint program + GLuint uniformIndex + GLsizei bufSize + GLsizei *length + GLchar *uniformName + + + + void glGetActiveUniformsiv + GLuint program + GLsizei uniformCount + const GLuint *uniformIndices + GLenum pname + GLint *params + + + + void glGetActiveVaryingNV + GLuint program + GLuint index + GLsizei bufSize + GLsizei *length + GLsizei *size + GLenum *type + GLchar *name + + + void glGetArrayObjectfvATI + GLenum array + GLenum pname + GLfloat *params + + + void glGetArrayObjectivATI + GLenum array + GLenum pname + GLint *params + + + void glGetAttachedObjectsARB + GLhandleARB containerObj + GLsizei maxCount + GLsizei *count + GLhandleARB *obj + + + void glGetAttachedShaders + GLuint program + GLsizei maxCount + GLsizei *count + GLuint *shaders + + + GLint glGetAttribLocation + GLuint program + const GLchar *name + + + GLint glGetAttribLocationARB + GLhandleARB programObj + const GLcharARB *name + + + + void glGetBooleanIndexedvEXT + GLenum target + GLuint index + GLboolean *data + + + + + void glGetBooleani_v + GLenum target + GLuint index + GLboolean *data + + + void glGetBooleanv + GLenum pname + GLboolean *data + + + + void glGetBufferParameteri64v + GLenum target + GLenum pname + GLint64 *params + + + void glGetBufferParameteriv + GLenum target + GLenum pname + GLint *params + + + void glGetBufferParameterivARB + GLenum target + GLenum pname + GLint *params + + + + void glGetBufferParameterui64vNV + GLenum target + GLenum pname + GLuint64EXT *params + + + void glGetBufferPointerv + GLenum target + GLenum pname + void **params + + + void glGetBufferPointervARB + GLenum target + GLenum pname + void **params + + + + void glGetBufferPointervOES + GLenum target + GLenum pname + void **params + + + + void glGetBufferSubData + GLenum target + GLintptr offset + GLsizeiptr size + void *data + + + void glGetBufferSubDataARB + GLenum target + GLintptrARB offset + GLsizeiptrARB size + void *data + + + + void glGetClipPlane + GLenum plane + GLdouble *equation + + + + void glGetClipPlanef + GLenum plane + GLfloat *equation + + + void glGetClipPlanefOES + GLenum plane + GLfloat *equation + + + + void glGetClipPlanex + GLenum plane + GLfixed *equation + + + void glGetClipPlanexOES + GLenum plane + GLfixed *equation + + + void glGetColorTable + GLenum target + GLenum format + GLenum type + void *table + + + + + void glGetColorTableEXT + GLenum target + GLenum format + GLenum type + void *data + + + + void glGetColorTableParameterfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetColorTableParameterfvEXT + GLenum target + GLenum pname + GLfloat *params + + + + void glGetColorTableParameterfvSGI + GLenum target + GLenum pname + GLfloat *params + + + + void glGetColorTableParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetColorTableParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetColorTableParameterivSGI + GLenum target + GLenum pname + GLint *params + + + + void glGetColorTableSGI + GLenum target + GLenum format + GLenum type + void *table + + + + void glGetCombinerInputParameterfvNV + GLenum stage + GLenum portion + GLenum variable + GLenum pname + GLfloat *params + + + + void glGetCombinerInputParameterivNV + GLenum stage + GLenum portion + GLenum variable + GLenum pname + GLint *params + + + + void glGetCombinerOutputParameterfvNV + GLenum stage + GLenum portion + GLenum pname + GLfloat *params + + + + void glGetCombinerOutputParameterivNV + GLenum stage + GLenum portion + GLenum pname + GLint *params + + + + void glGetCombinerStageParameterfvNV + GLenum stage + GLenum pname + GLfloat *params + + + GLuint glGetCommandHeaderNV + GLenum tokenID + GLuint size + + + void glGetCompressedMultiTexImageEXT + GLenum texunit + GLenum target + GLint lod + void *img + + + void glGetCompressedTexImage + GLenum target + GLint level + void *img + + + + + void glGetCompressedTexImageARB + GLenum target + GLint level + void *img + + + + + void glGetCompressedTextureImage + GLuint texture + GLint level + GLsizei bufSize + void *pixels + + + void glGetCompressedTextureImageEXT + GLuint texture + GLenum target + GLint lod + void *img + + + void glGetCompressedTextureSubImage + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLsizei bufSize + void *pixels + + + void glGetConvolutionFilter + GLenum target + GLenum format + GLenum type + void *image + + + + + void glGetConvolutionFilterEXT + GLenum target + GLenum format + GLenum type + void *image + + + + void glGetConvolutionParameterfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetConvolutionParameterfvEXT + GLenum target + GLenum pname + GLfloat *params + + + + void glGetConvolutionParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetConvolutionParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetConvolutionParameterxvOES + GLenum target + GLenum pname + GLfixed *params + + + void glGetCoverageModulationTableNV + GLsizei bufSize + GLfloat *v + + + GLuint glGetDebugMessageLog + GLuint count + GLsizei bufSize + GLenum *sources + GLenum *types + GLuint *ids + GLenum *severities + GLsizei *lengths + GLchar *messageLog + + + GLuint glGetDebugMessageLogAMD + GLuint count + GLsizei bufSize + GLenum *categories + GLenum *severities + GLuint *ids + GLsizei *lengths + GLchar *message + + + GLuint glGetDebugMessageLogARB + GLuint count + GLsizei bufSize + GLenum *sources + GLenum *types + GLuint *ids + GLenum *severities + GLsizei *lengths + GLchar *messageLog + + + + GLuint glGetDebugMessageLogKHR + GLuint count + GLsizei bufSize + GLenum *sources + GLenum *types + GLuint *ids + GLenum *severities + GLsizei *lengths + GLchar *messageLog + + + + void glGetDetailTexFuncSGIS + GLenum target + GLfloat *points + + + + void glGetDoubleIndexedvEXT + GLenum target + GLuint index + GLdouble *data + + + + void glGetDoublei_v + GLenum target + GLuint index + GLdouble *data + + + void glGetDoublei_vEXT + GLenum pname + GLuint index + GLdouble *params + + + + void glGetDoublev + GLenum pname + GLdouble *data + + + + void glGetDriverControlStringQCOM + GLuint driverControl + GLsizei bufSize + GLsizei *length + GLchar *driverControlString + + + void glGetDriverControlsQCOM + GLint *num + GLsizei size + GLuint *driverControls + + + GLenum glGetError + + + + void glGetFenceivNV + GLuint fence + GLenum pname + GLint *params + + + + void glGetFinalCombinerInputParameterfvNV + GLenum variable + GLenum pname + GLfloat *params + + + + void glGetFinalCombinerInputParameterivNV + GLenum variable + GLenum pname + GLint *params + + + + void glGetFirstPerfQueryIdINTEL + GLuint *queryId + + + void glGetFixedv + GLenum pname + GLfixed *data + + + void glGetFixedvOES + GLenum pname + GLfixed *params + + + void glGetFloatIndexedvEXT + GLenum target + GLuint index + GLfloat *data + + + + void glGetFloati_v + GLenum target + GLuint index + GLfloat *data + + + void glGetFloati_vEXT + GLenum pname + GLuint index + GLfloat *params + + + + void glGetFloati_vNV + GLenum target + GLuint index + GLfloat *data + + + + void glGetFloati_vOES + GLenum target + GLuint index + GLfloat *data + + + + void glGetFloatv + GLenum pname + GLfloat *data + + + + void glGetFogFuncSGIS + GLfloat *points + + + GLint glGetFragDataIndex + GLuint program + const GLchar *name + + + GLint glGetFragDataIndexEXT + GLuint program + const GLchar *name + + + + GLint glGetFragDataLocation + GLuint program + const GLchar *name + + + GLint glGetFragDataLocationEXT + GLuint program + const GLchar *name + + + + void glGetFragmentLightfvSGIX + GLenum light + GLenum pname + GLfloat *params + + + void glGetFragmentLightivSGIX + GLenum light + GLenum pname + GLint *params + + + void glGetFragmentMaterialfvSGIX + GLenum face + GLenum pname + GLfloat *params + + + void glGetFragmentMaterialivSGIX + GLenum face + GLenum pname + GLint *params + + + void glGetFragmentShadingRatesEXT + GLsizei samples + GLsizei maxCount + GLsizei *count + GLenum *shadingRates + + + void glGetFramebufferAttachmentParameteriv + GLenum target + GLenum attachment + GLenum pname + GLint *params + + + + void glGetFramebufferAttachmentParameterivEXT + GLenum target + GLenum attachment + GLenum pname + GLint *params + + + + + void glGetFramebufferAttachmentParameterivOES + GLenum target + GLenum attachment + GLenum pname + GLint *params + + + void glGetFramebufferParameterfvAMD + GLenum target + GLenum pname + GLuint numsamples + GLuint pixelindex + GLsizei size + GLfloat *values + + + void glGetFramebufferParameteriv + GLenum target + GLenum pname + GLint *params + + + void glGetFramebufferParameterivEXT + GLuint framebuffer + GLenum pname + GLint *params + + + GLsizei glGetFramebufferPixelLocalStorageSizeEXT + GLuint target + + + GLenum glGetGraphicsResetStatus + + + GLenum glGetGraphicsResetStatusARB + + + GLenum glGetGraphicsResetStatusEXT + + + + GLenum glGetGraphicsResetStatusKHR + + + + GLhandleARB glGetHandleARB + GLenum pname + + + void glGetHistogram + GLenum target + GLboolean reset + GLenum format + GLenum type + void *values + + + + + void glGetHistogramEXT + GLenum target + GLboolean reset + GLenum format + GLenum type + void *values + + + + void glGetHistogramParameterfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetHistogramParameterfvEXT + GLenum target + GLenum pname + GLfloat *params + + + + void glGetHistogramParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetHistogramParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetHistogramParameterxvOES + GLenum target + GLenum pname + GLfixed *params + + + GLuint64 glGetImageHandleARB + GLuint texture + GLint level + GLboolean layered + GLint layer + GLenum format + + + GLuint64 glGetImageHandleNV + GLuint texture + GLint level + GLboolean layered + GLint layer + GLenum format + + + void glGetImageTransformParameterfvHP + GLenum target + GLenum pname + GLfloat *params + + + void glGetImageTransformParameterivHP + GLenum target + GLenum pname + GLint *params + + + void glGetInfoLogARB + GLhandleARB obj + GLsizei maxLength + GLsizei *length + GLcharARB *infoLog + + + GLint glGetInstrumentsSGIX + + + + void glGetInteger64i_v + GLenum target + GLuint index + GLint64 *data + + + void glGetInteger64v + GLenum pname + GLint64 *data + + + void glGetInteger64vAPPLE + GLenum pname + GLint64 *params + + + + void glGetInteger64vEXT + GLenum pname + GLint64 *data + + + + void glGetIntegerIndexedvEXT + GLenum target + GLuint index + GLint *data + + + + + void glGetIntegeri_v + GLenum target + GLuint index + GLint *data + + + void glGetIntegeri_vEXT + GLenum target + GLuint index + GLint *data + + + void glGetIntegerui64i_vNV + GLenum value + GLuint index + GLuint64EXT *result + + + void glGetIntegerui64vNV + GLenum value + GLuint64EXT *result + + + void glGetIntegerv + GLenum pname + GLint *data + + + + void glGetInternalformatSampleivNV + GLenum target + GLenum internalformat + GLsizei samples + GLenum pname + GLsizei count + GLint *params + + + void glGetInternalformati64v + GLenum target + GLenum internalformat + GLenum pname + GLsizei count + GLint64 *params + + + void glGetInternalformativ + GLenum target + GLenum internalformat + GLenum pname + GLsizei count + GLint *params + + + void glGetInvariantBooleanvEXT + GLuint id + GLenum value + GLboolean *data + + + void glGetInvariantFloatvEXT + GLuint id + GLenum value + GLfloat *data + + + void glGetInvariantIntegervEXT + GLuint id + GLenum value + GLint *data + + + void glGetLightfv + GLenum light + GLenum pname + GLfloat *params + + + + void glGetLightiv + GLenum light + GLenum pname + GLint *params + + + + void glGetLightxOES + GLenum light + GLenum pname + GLfixed *params + + + void glGetLightxv + GLenum light + GLenum pname + GLfixed *params + + + void glGetLightxvOES + GLenum light + GLenum pname + GLfixed *params + + + void glGetListParameterfvSGIX + GLuint list + GLenum pname + GLfloat *params + + + void glGetListParameterivSGIX + GLuint list + GLenum pname + GLint *params + + + void glGetLocalConstantBooleanvEXT + GLuint id + GLenum value + GLboolean *data + + + void glGetLocalConstantFloatvEXT + GLuint id + GLenum value + GLfloat *data + + + void glGetLocalConstantIntegervEXT + GLuint id + GLenum value + GLint *data + + + void glGetMapAttribParameterfvNV + GLenum target + GLuint index + GLenum pname + GLfloat *params + + + void glGetMapAttribParameterivNV + GLenum target + GLuint index + GLenum pname + GLint *params + + + void glGetMapControlPointsNV + GLenum target + GLuint index + GLenum type + GLsizei ustride + GLsizei vstride + GLboolean packed + void *points + + + void glGetMapParameterfvNV + GLenum target + GLenum pname + GLfloat *params + + + void glGetMapParameterivNV + GLenum target + GLenum pname + GLint *params + + + void glGetMapdv + GLenum target + GLenum query + GLdouble *v + + + + void glGetMapfv + GLenum target + GLenum query + GLfloat *v + + + + void glGetMapiv + GLenum target + GLenum query + GLint *v + + + + void glGetMapxvOES + GLenum target + GLenum query + GLfixed *v + + + void glGetMaterialfv + GLenum face + GLenum pname + GLfloat *params + + + + void glGetMaterialiv + GLenum face + GLenum pname + GLint *params + + + + void glGetMaterialxOES + GLenum face + GLenum pname + GLfixed param + + + void glGetMaterialxv + GLenum face + GLenum pname + GLfixed *params + + + void glGetMaterialxvOES + GLenum face + GLenum pname + GLfixed *params + + + void glGetMemoryObjectDetachedResourcesuivNV + GLuint memory + GLenum pname + GLint first + GLsizei count + GLuint *params + + + void glGetMemoryObjectParameterivEXT + GLuint memoryObject + GLenum pname + GLint *params + + + void glGetMinmax + GLenum target + GLboolean reset + GLenum format + GLenum type + void *values + + + + + void glGetMinmaxEXT + GLenum target + GLboolean reset + GLenum format + GLenum type + void *values + + + + void glGetMinmaxParameterfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetMinmaxParameterfvEXT + GLenum target + GLenum pname + GLfloat *params + + + + void glGetMinmaxParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetMinmaxParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetMultiTexEnvfvEXT + GLenum texunit + GLenum target + GLenum pname + GLfloat *params + + + void glGetMultiTexEnvivEXT + GLenum texunit + GLenum target + GLenum pname + GLint *params + + + void glGetMultiTexGendvEXT + GLenum texunit + GLenum coord + GLenum pname + GLdouble *params + + + void glGetMultiTexGenfvEXT + GLenum texunit + GLenum coord + GLenum pname + GLfloat *params + + + void glGetMultiTexGenivEXT + GLenum texunit + GLenum coord + GLenum pname + GLint *params + + + void glGetMultiTexImageEXT + GLenum texunit + GLenum target + GLint level + GLenum format + GLenum type + void *pixels + + + void glGetMultiTexLevelParameterfvEXT + GLenum texunit + GLenum target + GLint level + GLenum pname + GLfloat *params + + + void glGetMultiTexLevelParameterivEXT + GLenum texunit + GLenum target + GLint level + GLenum pname + GLint *params + + + void glGetMultiTexParameterIivEXT + GLenum texunit + GLenum target + GLenum pname + GLint *params + + + void glGetMultiTexParameterIuivEXT + GLenum texunit + GLenum target + GLenum pname + GLuint *params + + + void glGetMultiTexParameterfvEXT + GLenum texunit + GLenum target + GLenum pname + GLfloat *params + + + void glGetMultiTexParameterivEXT + GLenum texunit + GLenum target + GLenum pname + GLint *params + + + void glGetMultisamplefv + GLenum pname + GLuint index + GLfloat *val + + + void glGetMultisamplefvNV + GLenum pname + GLuint index + GLfloat *val + + + + void glGetNamedBufferParameteri64v + GLuint buffer + GLenum pname + GLint64 *params + + + void glGetNamedBufferParameteriv + GLuint buffer + GLenum pname + GLint *params + + + void glGetNamedBufferParameterivEXT + GLuint buffer + GLenum pname + GLint *params + + + void glGetNamedBufferParameterui64vNV + GLuint buffer + GLenum pname + GLuint64EXT *params + + + void glGetNamedBufferPointerv + GLuint buffer + GLenum pname + void **params + + + void glGetNamedBufferPointervEXT + GLuint buffer + GLenum pname + void **params + + + void glGetNamedBufferSubData + GLuint buffer + GLintptr offset + GLsizeiptr size + void *data + + + void glGetNamedBufferSubDataEXT + GLuint buffer + GLintptr offset + GLsizeiptr size + void *data + + + void glGetNamedFramebufferParameterfvAMD + GLuint framebuffer + GLenum pname + GLuint numsamples + GLuint pixelindex + GLsizei size + GLfloat *values + + + void glGetNamedFramebufferAttachmentParameteriv + GLuint framebuffer + GLenum attachment + GLenum pname + GLint *params + + + void glGetNamedFramebufferAttachmentParameterivEXT + GLuint framebuffer + GLenum attachment + GLenum pname + GLint *params + + + void glGetNamedFramebufferParameteriv + GLuint framebuffer + GLenum pname + GLint *param + + + void glGetNamedFramebufferParameterivEXT + GLuint framebuffer + GLenum pname + GLint *params + + + void glGetNamedProgramLocalParameterIivEXT + GLuint program + GLenum target + GLuint index + GLint *params + + + void glGetNamedProgramLocalParameterIuivEXT + GLuint program + GLenum target + GLuint index + GLuint *params + + + void glGetNamedProgramLocalParameterdvEXT + GLuint program + GLenum target + GLuint index + GLdouble *params + + + void glGetNamedProgramLocalParameterfvEXT + GLuint program + GLenum target + GLuint index + GLfloat *params + + + void glGetNamedProgramStringEXT + GLuint program + GLenum target + GLenum pname + void *string + + + void glGetNamedProgramivEXT + GLuint program + GLenum target + GLenum pname + GLint *params + + + void glGetNamedRenderbufferParameteriv + GLuint renderbuffer + GLenum pname + GLint *params + + + void glGetNamedRenderbufferParameterivEXT + GLuint renderbuffer + GLenum pname + GLint *params + + + void glGetNamedStringARB + GLint namelen + const GLchar *name + GLsizei bufSize + GLint *stringlen + GLchar *string + + + void glGetNamedStringivARB + GLint namelen + const GLchar *name + GLenum pname + GLint *params + + + void glGetNextPerfQueryIdINTEL + GLuint queryId + GLuint *nextQueryId + + + void glGetObjectBufferfvATI + GLuint buffer + GLenum pname + GLfloat *params + + + void glGetObjectBufferivATI + GLuint buffer + GLenum pname + GLint *params + + + void glGetObjectLabel + GLenum identifier + GLuint name + GLsizei bufSize + GLsizei *length + GLchar *label + + + void glGetObjectLabelEXT + GLenum type + GLuint object + GLsizei bufSize + GLsizei *length + GLchar *label + + + void glGetObjectLabelKHR + GLenum identifier + GLuint name + GLsizei bufSize + GLsizei *length + GLchar *label + + + + void glGetObjectParameterfvARB + GLhandleARB obj + GLenum pname + GLfloat *params + + + void glGetObjectParameterivAPPLE + GLenum objectType + GLuint name + GLenum pname + GLint *params + + + void glGetObjectParameterivARB + GLhandleARB obj + GLenum pname + GLint *params + + + void glGetObjectPtrLabel + const void *ptr + GLsizei bufSize + GLsizei *length + GLchar *label + + + void glGetObjectPtrLabelKHR + const void *ptr + GLsizei bufSize + GLsizei *length + GLchar *label + + + + void glGetOcclusionQueryivNV + GLuint id + GLenum pname + GLint *params + + + void glGetOcclusionQueryuivNV + GLuint id + GLenum pname + GLuint *params + + + void glGetPathColorGenfvNV + GLenum color + GLenum pname + GLfloat *value + + + void glGetPathColorGenivNV + GLenum color + GLenum pname + GLint *value + + + void glGetPathCommandsNV + GLuint path + GLubyte *commands + + + void glGetPathCoordsNV + GLuint path + GLfloat *coords + + + void glGetPathDashArrayNV + GLuint path + GLfloat *dashArray + + + GLfloat glGetPathLengthNV + GLuint path + GLsizei startSegment + GLsizei numSegments + + + void glGetPathMetricRangeNV + GLbitfield metricQueryMask + GLuint firstPathName + GLsizei numPaths + GLsizei stride + GLfloat *metrics + + + void glGetPathMetricsNV + GLbitfield metricQueryMask + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLsizei stride + GLfloat *metrics + + + void glGetPathParameterfvNV + GLuint path + GLenum pname + GLfloat *value + + + void glGetPathParameterivNV + GLuint path + GLenum pname + GLint *value + + + void glGetPathSpacingNV + GLenum pathListMode + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLfloat advanceScale + GLfloat kerningScale + GLenum transformType + GLfloat *returnedSpacing + + + void glGetPathTexGenfvNV + GLenum texCoordSet + GLenum pname + GLfloat *value + + + void glGetPathTexGenivNV + GLenum texCoordSet + GLenum pname + GLint *value + + + void glGetPerfCounterInfoINTEL + GLuint queryId + GLuint counterId + GLuint counterNameLength + GLchar *counterName + GLuint counterDescLength + GLchar *counterDesc + GLuint *counterOffset + GLuint *counterDataSize + GLuint *counterTypeEnum + GLuint *counterDataTypeEnum + GLuint64 *rawCounterMaxValue + + + void glGetPerfMonitorCounterDataAMD + GLuint monitor + GLenum pname + GLsizei dataSize + GLuint *data + GLint *bytesWritten + + + void glGetPerfMonitorCounterInfoAMD + GLuint group + GLuint counter + GLenum pname + void *data + + + void glGetPerfMonitorCounterStringAMD + GLuint group + GLuint counter + GLsizei bufSize + GLsizei *length + GLchar *counterString + + + void glGetPerfMonitorCountersAMD + GLuint group + GLint *numCounters + GLint *maxActiveCounters + GLsizei counterSize + GLuint *counters + + + void glGetPerfMonitorGroupStringAMD + GLuint group + GLsizei bufSize + GLsizei *length + GLchar *groupString + + + void glGetPerfMonitorGroupsAMD + GLint *numGroups + GLsizei groupsSize + GLuint *groups + + + void glGetPerfQueryDataINTEL + GLuint queryHandle + GLuint flags + GLsizei dataSize + void *data + GLuint *bytesWritten + + + void glGetPerfQueryIdByNameINTEL + GLchar *queryName + GLuint *queryId + + + void glGetPerfQueryInfoINTEL + GLuint queryId + GLuint queryNameLength + GLchar *queryName + GLuint *dataSize + GLuint *noCounters + GLuint *noInstances + GLuint *capsMask + + + void glGetPixelMapfv + GLenum map + GLfloat *values + + + + + void glGetPixelMapuiv + GLenum map + GLuint *values + + + + + void glGetPixelMapusv + GLenum map + GLushort *values + + + + + void glGetPixelMapxv + GLenum map + GLint size + GLfixed *values + + + void glGetPixelTexGenParameterfvSGIS + GLenum pname + GLfloat *params + + + void glGetPixelTexGenParameterivSGIS + GLenum pname + GLint *params + + + void glGetPixelTransformParameterfvEXT + GLenum target + GLenum pname + GLfloat *params + + + + void glGetPixelTransformParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetPointerIndexedvEXT + GLenum target + GLuint index + void **data + + + void glGetPointeri_vEXT + GLenum pname + GLuint index + void **params + + + void glGetPointerv + GLenum pname + void **params + + + + void glGetPointervEXT + GLenum pname + void **params + + + + void glGetPointervKHR + GLenum pname + void **params + + + + void glGetPolygonStipple + GLubyte *mask + + + + + void glGetProgramBinary + GLuint program + GLsizei bufSize + GLsizei *length + GLenum *binaryFormat + void *binary + + + void glGetProgramBinaryOES + GLuint program + GLsizei bufSize + GLsizei *length + GLenum *binaryFormat + void *binary + + + + void glGetProgramEnvParameterIivNV + GLenum target + GLuint index + GLint *params + + + void glGetProgramEnvParameterIuivNV + GLenum target + GLuint index + GLuint *params + + + void glGetProgramEnvParameterdvARB + GLenum target + GLuint index + GLdouble *params + + + void glGetProgramEnvParameterfvARB + GLenum target + GLuint index + GLfloat *params + + + void glGetProgramInfoLog + GLuint program + GLsizei bufSize + GLsizei *length + GLchar *infoLog + + + + void glGetProgramInterfaceiv + GLuint program + GLenum programInterface + GLenum pname + GLint *params + + + void glGetProgramLocalParameterIivNV + GLenum target + GLuint index + GLint *params + + + void glGetProgramLocalParameterIuivNV + GLenum target + GLuint index + GLuint *params + + + void glGetProgramLocalParameterdvARB + GLenum target + GLuint index + GLdouble *params + + + void glGetProgramLocalParameterfvARB + GLenum target + GLuint index + GLfloat *params + + + void glGetProgramNamedParameterdvNV + GLuint id + GLsizei len + const GLubyte *name + GLdouble *params + + + + void glGetProgramNamedParameterfvNV + GLuint id + GLsizei len + const GLubyte *name + GLfloat *params + + + + void glGetProgramParameterdvNV + GLenum target + GLuint index + GLenum pname + GLdouble *params + + + + void glGetProgramParameterfvNV + GLenum target + GLuint index + GLenum pname + GLfloat *params + + + + void glGetProgramPipelineInfoLog + GLuint pipeline + GLsizei bufSize + GLsizei *length + GLchar *infoLog + + + void glGetProgramPipelineInfoLogEXT + GLuint pipeline + GLsizei bufSize + GLsizei *length + GLchar *infoLog + + + void glGetProgramPipelineiv + GLuint pipeline + GLenum pname + GLint *params + + + void glGetProgramPipelineivEXT + GLuint pipeline + GLenum pname + GLint *params + + + GLuint glGetProgramResourceIndex + GLuint program + GLenum programInterface + const GLchar *name + + + GLint glGetProgramResourceLocation + GLuint program + GLenum programInterface + const GLchar *name + + + GLint glGetProgramResourceLocationIndex + GLuint program + GLenum programInterface + const GLchar *name + + + GLint glGetProgramResourceLocationIndexEXT + GLuint program + GLenum programInterface + const GLchar *name + + + void glGetProgramResourceName + GLuint program + GLenum programInterface + GLuint index + GLsizei bufSize + GLsizei *length + GLchar *name + + + void glGetProgramResourcefvNV + GLuint program + GLenum programInterface + GLuint index + GLsizei propCount + const GLenum *props + GLsizei count + GLsizei *length + GLfloat *params + + + void glGetProgramResourceiv + GLuint program + GLenum programInterface + GLuint index + GLsizei propCount + const GLenum *props + GLsizei count + GLsizei *length + GLint *params + + + void glGetProgramStageiv + GLuint program + GLenum shadertype + GLenum pname + GLint *values + + + void glGetProgramStringARB + GLenum target + GLenum pname + void *string + + + void glGetProgramStringNV + GLuint id + GLenum pname + GLubyte *program + + + + void glGetProgramSubroutineParameteruivNV + GLenum target + GLuint index + GLuint *param + + + void glGetProgramiv + GLuint program + GLenum pname + GLint *params + + + + void glGetProgramivARB + GLenum target + GLenum pname + GLint *params + + + void glGetProgramivNV + GLuint id + GLenum pname + GLint *params + + + + void glGetQueryBufferObjecti64v + GLuint id + GLuint buffer + GLenum pname + GLintptr offset + + + void glGetQueryBufferObjectiv + GLuint id + GLuint buffer + GLenum pname + GLintptr offset + + + void glGetQueryBufferObjectui64v + GLuint id + GLuint buffer + GLenum pname + GLintptr offset + + + void glGetQueryBufferObjectuiv + GLuint id + GLuint buffer + GLenum pname + GLintptr offset + + + void glGetQueryIndexediv + GLenum target + GLuint index + GLenum pname + GLint *params + + + void glGetQueryObjecti64v + GLuint id + GLenum pname + GLint64 *params + + + void glGetQueryObjecti64vEXT + GLuint id + GLenum pname + GLint64 *params + + + + + void glGetQueryObjectiv + GLuint id + GLenum pname + GLint *params + + + + void glGetQueryObjectivARB + GLuint id + GLenum pname + GLint *params + + + + void glGetQueryObjectivEXT + GLuint id + GLenum pname + GLint *params + + + + void glGetQueryObjectui64v + GLuint id + GLenum pname + GLuint64 *params + + + void glGetQueryObjectui64vEXT + GLuint id + GLenum pname + GLuint64 *params + + + + + void glGetQueryObjectuiv + GLuint id + GLenum pname + GLuint *params + + + + void glGetQueryObjectuivARB + GLuint id + GLenum pname + GLuint *params + + + + void glGetQueryObjectuivEXT + GLuint id + GLenum pname + GLuint *params + + + void glGetQueryiv + GLenum target + GLenum pname + GLint *params + + + + void glGetQueryivARB + GLenum target + GLenum pname + GLint *params + + + + void glGetQueryivEXT + GLenum target + GLenum pname + GLint *params + + + void glGetRenderbufferParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetRenderbufferParameterivEXT + GLenum target + GLenum pname + GLint *params + + + + + void glGetRenderbufferParameterivOES + GLenum target + GLenum pname + GLint *params + + + void glGetSamplerParameterIiv + GLuint sampler + GLenum pname + GLint *params + + + void glGetSamplerParameterIivEXT + GLuint sampler + GLenum pname + GLint *params + + + + void glGetSamplerParameterIivOES + GLuint sampler + GLenum pname + GLint *params + + + + void glGetSamplerParameterIuiv + GLuint sampler + GLenum pname + GLuint *params + + + void glGetSamplerParameterIuivEXT + GLuint sampler + GLenum pname + GLuint *params + + + + void glGetSamplerParameterIuivOES + GLuint sampler + GLenum pname + GLuint *params + + + + void glGetSamplerParameterfv + GLuint sampler + GLenum pname + GLfloat *params + + + void glGetSamplerParameteriv + GLuint sampler + GLenum pname + GLint *params + + + void glGetSemaphoreParameterivNV + GLuint semaphore + GLenum pname + GLint *params + + + void glGetSemaphoreParameterui64vEXT + GLuint semaphore + GLenum pname + GLuint64 *params + + + void glGetSeparableFilter + GLenum target + GLenum format + GLenum type + void *row + void *column + void *span + + + + + void glGetSeparableFilterEXT + GLenum target + GLenum format + GLenum type + void *row + void *column + void *span + + + + void glGetShaderInfoLog + GLuint shader + GLsizei bufSize + GLsizei *length + GLchar *infoLog + + + + void glGetShaderPrecisionFormat + GLenum shadertype + GLenum precisiontype + GLint *range + GLint *precision + + + void glGetShaderSource + GLuint shader + GLsizei bufSize + GLsizei *length + GLchar *source + + + void glGetShaderSourceARB + GLhandleARB obj + GLsizei maxLength + GLsizei *length + GLcharARB *source + + + + void glGetShaderiv + GLuint shader + GLenum pname + GLint *params + + + + void glGetShadingRateImagePaletteNV + GLuint viewport + GLuint entry + GLenum *rate + + + void glGetShadingRateSampleLocationivNV + GLenum rate + GLuint samples + GLuint index + GLint *location + + + void glGetSharpenTexFuncSGIS + GLenum target + GLfloat *points + + + + GLushort glGetStageIndexNV + GLenum shadertype + + + + const GLubyte *glGetString + GLenum name + + + + const GLubyte *glGetStringi + GLenum name + GLuint index + + + + GLuint glGetSubroutineIndex + GLuint program + GLenum shadertype + const GLchar *name + + + GLint glGetSubroutineUniformLocation + GLuint program + GLenum shadertype + const GLchar *name + + + void glGetSynciv + GLsync sync + GLenum pname + GLsizei count + GLsizei *length + GLint *values + + + void glGetSyncivAPPLE + GLsync sync + GLenum pname + GLsizei count + GLsizei *length + GLint *values + + + + void glGetTexBumpParameterfvATI + GLenum pname + GLfloat *param + + + void glGetTexBumpParameterivATI + GLenum pname + GLint *param + + + void glGetTexEnvfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetTexEnviv + GLenum target + GLenum pname + GLint *params + + + + void glGetTexEnvxv + GLenum target + GLenum pname + GLfixed *params + + + void glGetTexEnvxvOES + GLenum target + GLenum pname + GLfixed *params + + + void glGetTexFilterFuncSGIS + GLenum target + GLenum filter + GLfloat *weights + + + + void glGetTexGendv + GLenum coord + GLenum pname + GLdouble *params + + + + void glGetTexGenfv + GLenum coord + GLenum pname + GLfloat *params + + + + void glGetTexGenfvOES + GLenum coord + GLenum pname + GLfloat *params + + + void glGetTexGeniv + GLenum coord + GLenum pname + GLint *params + + + + void glGetTexGenivOES + GLenum coord + GLenum pname + GLint *params + + + void glGetTexGenxvOES + GLenum coord + GLenum pname + GLfixed *params + + + void glGetTexImage + GLenum target + GLint level + GLenum format + GLenum type + void *pixels + + + + + void glGetTexLevelParameterfv + GLenum target + GLint level + GLenum pname + GLfloat *params + + + + void glGetTexLevelParameteriv + GLenum target + GLint level + GLenum pname + GLint *params + + + + void glGetTexLevelParameterxvOES + GLenum target + GLint level + GLenum pname + GLfixed *params + + + void glGetTexParameterIiv + GLenum target + GLenum pname + GLint *params + + + + void glGetTexParameterIivEXT + GLenum target + GLenum pname + GLint *params + + + + void glGetTexParameterIivOES + GLenum target + GLenum pname + GLint *params + + + + void glGetTexParameterIuiv + GLenum target + GLenum pname + GLuint *params + + + + void glGetTexParameterIuivEXT + GLenum target + GLenum pname + GLuint *params + + + + void glGetTexParameterIuivOES + GLenum target + GLenum pname + GLuint *params + + + + void glGetTexParameterPointervAPPLE + GLenum target + GLenum pname + void **params + + + void glGetTexParameterfv + GLenum target + GLenum pname + GLfloat *params + + + + void glGetTexParameteriv + GLenum target + GLenum pname + GLint *params + + + + void glGetTexParameterxv + GLenum target + GLenum pname + GLfixed *params + + + void glGetTexParameterxvOES + GLenum target + GLenum pname + GLfixed *params + + + GLuint64 glGetTextureHandleARB + GLuint texture + + + GLuint64 glGetTextureHandleIMG + GLuint texture + + + + GLuint64 glGetTextureHandleNV + GLuint texture + + + void glGetTextureImage + GLuint texture + GLint level + GLenum format + GLenum type + GLsizei bufSize + void *pixels + + + void glGetTextureImageEXT + GLuint texture + GLenum target + GLint level + GLenum format + GLenum type + void *pixels + + + void glGetTextureLevelParameterfv + GLuint texture + GLint level + GLenum pname + GLfloat *params + + + void glGetTextureLevelParameterfvEXT + GLuint texture + GLenum target + GLint level + GLenum pname + GLfloat *params + + + void glGetTextureLevelParameteriv + GLuint texture + GLint level + GLenum pname + GLint *params + + + void glGetTextureLevelParameterivEXT + GLuint texture + GLenum target + GLint level + GLenum pname + GLint *params + + + void glGetTextureParameterIiv + GLuint texture + GLenum pname + GLint *params + + + void glGetTextureParameterIivEXT + GLuint texture + GLenum target + GLenum pname + GLint *params + + + void glGetTextureParameterIuiv + GLuint texture + GLenum pname + GLuint *params + + + void glGetTextureParameterIuivEXT + GLuint texture + GLenum target + GLenum pname + GLuint *params + + + void glGetTextureParameterfv + GLuint texture + GLenum pname + GLfloat *params + + + void glGetTextureParameterfvEXT + GLuint texture + GLenum target + GLenum pname + GLfloat *params + + + void glGetTextureParameteriv + GLuint texture + GLenum pname + GLint *params + + + void glGetTextureParameterivEXT + GLuint texture + GLenum target + GLenum pname + GLint *params + + + GLuint64 glGetTextureSamplerHandleARB + GLuint texture + GLuint sampler + + + GLuint64 glGetTextureSamplerHandleIMG + GLuint texture + GLuint sampler + + + + GLuint64 glGetTextureSamplerHandleNV + GLuint texture + GLuint sampler + + + void glGetTextureSubImage + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + GLsizei bufSize + void *pixels + + + void glGetTrackMatrixivNV + GLenum target + GLuint address + GLenum pname + GLint *params + + + + void glGetTransformFeedbackVarying + GLuint program + GLuint index + GLsizei bufSize + GLsizei *length + GLsizei *size + GLenum *type + GLchar *name + + + + void glGetTransformFeedbackVaryingEXT + GLuint program + GLuint index + GLsizei bufSize + GLsizei *length + GLsizei *size + GLenum *type + GLchar *name + + + + void glGetTransformFeedbackVaryingNV + GLuint program + GLuint index + GLint *location + + + void glGetTransformFeedbacki64_v + GLuint xfb + GLenum pname + GLuint index + GLint64 *param + + + void glGetTransformFeedbacki_v + GLuint xfb + GLenum pname + GLuint index + GLint *param + + + void glGetTransformFeedbackiv + GLuint xfb + GLenum pname + GLint *param + + + void glGetTranslatedShaderSourceANGLE + GLuint shader + GLsizei bufSize + GLsizei *length + GLchar *source + + + GLuint glGetUniformBlockIndex + GLuint program + const GLchar *uniformBlockName + + + + GLint glGetUniformBufferSizeEXT + GLuint program + GLint location + + + void glGetUniformIndices + GLuint program + GLsizei uniformCount + const GLchar *const*uniformNames + GLuint *uniformIndices + + + + GLint glGetUniformLocation + GLuint program + const GLchar *name + + + GLint glGetUniformLocationARB + GLhandleARB programObj + const GLcharARB *name + + + + GLintptr glGetUniformOffsetEXT + GLuint program + GLint location + + + void glGetUniformSubroutineuiv + GLenum shadertype + GLint location + GLuint *params + + + void glGetUniformdv + GLuint program + GLint location + GLdouble *params + + + void glGetUniformfv + GLuint program + GLint location + GLfloat *params + + + void glGetUniformfvARB + GLhandleARB programObj + GLint location + GLfloat *params + + + + void glGetUniformi64vARB + GLuint program + GLint location + GLint64 *params + + + void glGetUniformi64vNV + GLuint program + GLint location + GLint64EXT *params + + + void glGetUniformiv + GLuint program + GLint location + GLint *params + + + void glGetUniformivARB + GLhandleARB programObj + GLint location + GLint *params + + + + void glGetUniformui64vARB + GLuint program + GLint location + GLuint64 *params + + + void glGetUniformui64vNV + GLuint program + GLint location + GLuint64EXT *params + + + void glGetUniformuiv + GLuint program + GLint location + GLuint *params + + + void glGetUniformuivEXT + GLuint program + GLint location + GLuint *params + + + + void glGetUnsignedBytevEXT + GLenum pname + GLubyte *data + + + void glGetUnsignedBytei_vEXT + GLenum target + GLuint index + GLubyte *data + + + void glGetVariantArrayObjectfvATI + GLuint id + GLenum pname + GLfloat *params + + + void glGetVariantArrayObjectivATI + GLuint id + GLenum pname + GLint *params + + + void glGetVariantBooleanvEXT + GLuint id + GLenum value + GLboolean *data + + + void glGetVariantFloatvEXT + GLuint id + GLenum value + GLfloat *data + + + void glGetVariantIntegervEXT + GLuint id + GLenum value + GLint *data + + + void glGetVariantPointervEXT + GLuint id + GLenum value + void **data + + + GLint glGetVaryingLocationNV + GLuint program + const GLchar *name + + + void glGetVertexArrayIndexed64iv + GLuint vaobj + GLuint index + GLenum pname + GLint64 *param + + + void glGetVertexArrayIndexediv + GLuint vaobj + GLuint index + GLenum pname + GLint *param + + + void glGetVertexArrayIntegeri_vEXT + GLuint vaobj + GLuint index + GLenum pname + GLint *param + + + void glGetVertexArrayIntegervEXT + GLuint vaobj + GLenum pname + GLint *param + + + void glGetVertexArrayPointeri_vEXT + GLuint vaobj + GLuint index + GLenum pname + void **param + + + void glGetVertexArrayPointervEXT + GLuint vaobj + GLenum pname + void **param + + + void glGetVertexArrayiv + GLuint vaobj + GLenum pname + GLint *param + + + void glGetVertexAttribArrayObjectfvATI + GLuint index + GLenum pname + GLfloat *params + + + void glGetVertexAttribArrayObjectivATI + GLuint index + GLenum pname + GLint *params + + + void glGetVertexAttribIiv + GLuint index + GLenum pname + GLint *params + + + void glGetVertexAttribIivEXT + GLuint index + GLenum pname + GLint *params + + + + void glGetVertexAttribIuiv + GLuint index + GLenum pname + GLuint *params + + + void glGetVertexAttribIuivEXT + GLuint index + GLenum pname + GLuint *params + + + + void glGetVertexAttribLdv + GLuint index + GLenum pname + GLdouble *params + + + void glGetVertexAttribLdvEXT + GLuint index + GLenum pname + GLdouble *params + + + + void glGetVertexAttribLi64vNV + GLuint index + GLenum pname + GLint64EXT *params + + + void glGetVertexAttribLui64vARB + GLuint index + GLenum pname + GLuint64EXT *params + + + void glGetVertexAttribLui64vNV + GLuint index + GLenum pname + GLuint64EXT *params + + + void glGetVertexAttribPointerv + GLuint index + GLenum pname + void **pointer + + + + void glGetVertexAttribPointervARB + GLuint index + GLenum pname + void **pointer + + + + void glGetVertexAttribPointervNV + GLuint index + GLenum pname + void **pointer + + + + void glGetVertexAttribdv + GLuint index + GLenum pname + GLdouble *params + + + + void glGetVertexAttribdvARB + GLuint index + GLenum pname + GLdouble *params + + + + + void glGetVertexAttribdvNV + GLuint index + GLenum pname + GLdouble *params + + + + + void glGetVertexAttribfv + GLuint index + GLenum pname + GLfloat *params + + + + void glGetVertexAttribfvARB + GLuint index + GLenum pname + GLfloat *params + + + + + void glGetVertexAttribfvNV + GLuint index + GLenum pname + GLfloat *params + + + + + void glGetVertexAttribiv + GLuint index + GLenum pname + GLint *params + + + + void glGetVertexAttribivARB + GLuint index + GLenum pname + GLint *params + + + + + void glGetVertexAttribivNV + GLuint index + GLenum pname + GLint *params + + + + + void glGetVideoCaptureStreamdvNV + GLuint video_capture_slot + GLuint stream + GLenum pname + GLdouble *params + + + void glGetVideoCaptureStreamfvNV + GLuint video_capture_slot + GLuint stream + GLenum pname + GLfloat *params + + + void glGetVideoCaptureStreamivNV + GLuint video_capture_slot + GLuint stream + GLenum pname + GLint *params + + + void glGetVideoCaptureivNV + GLuint video_capture_slot + GLenum pname + GLint *params + + + void glGetVideoi64vNV + GLuint video_slot + GLenum pname + GLint64EXT *params + + + void glGetVideoivNV + GLuint video_slot + GLenum pname + GLint *params + + + void glGetVideoui64vNV + GLuint video_slot + GLenum pname + GLuint64EXT *params + + + void glGetVideouivNV + GLuint video_slot + GLenum pname + GLuint *params + + + void glGetnColorTable + GLenum target + GLenum format + GLenum type + GLsizei bufSize + void *table + + + void glGetnColorTableARB + GLenum target + GLenum format + GLenum type + GLsizei bufSize + void *table + + + void glGetnCompressedTexImage + GLenum target + GLint lod + GLsizei bufSize + void *pixels + + + void glGetnCompressedTexImageARB + GLenum target + GLint lod + GLsizei bufSize + void *img + + + void glGetnConvolutionFilter + GLenum target + GLenum format + GLenum type + GLsizei bufSize + void *image + + + void glGetnConvolutionFilterARB + GLenum target + GLenum format + GLenum type + GLsizei bufSize + void *image + + + void glGetnHistogram + GLenum target + GLboolean reset + GLenum format + GLenum type + GLsizei bufSize + void *values + + + void glGetnHistogramARB + GLenum target + GLboolean reset + GLenum format + GLenum type + GLsizei bufSize + void *values + + + void glGetnMapdv + GLenum target + GLenum query + GLsizei bufSize + GLdouble *v + + + void glGetnMapdvARB + GLenum target + GLenum query + GLsizei bufSize + GLdouble *v + + + void glGetnMapfv + GLenum target + GLenum query + GLsizei bufSize + GLfloat *v + + + void glGetnMapfvARB + GLenum target + GLenum query + GLsizei bufSize + GLfloat *v + + + void glGetnMapiv + GLenum target + GLenum query + GLsizei bufSize + GLint *v + + + void glGetnMapivARB + GLenum target + GLenum query + GLsizei bufSize + GLint *v + + + void glGetnMinmax + GLenum target + GLboolean reset + GLenum format + GLenum type + GLsizei bufSize + void *values + + + void glGetnMinmaxARB + GLenum target + GLboolean reset + GLenum format + GLenum type + GLsizei bufSize + void *values + + + void glGetnPixelMapfv + GLenum map + GLsizei bufSize + GLfloat *values + + + void glGetnPixelMapfvARB + GLenum map + GLsizei bufSize + GLfloat *values + + + void glGetnPixelMapuiv + GLenum map + GLsizei bufSize + GLuint *values + + + void glGetnPixelMapuivARB + GLenum map + GLsizei bufSize + GLuint *values + + + void glGetnPixelMapusv + GLenum map + GLsizei bufSize + GLushort *values + + + void glGetnPixelMapusvARB + GLenum map + GLsizei bufSize + GLushort *values + + + void glGetnPolygonStipple + GLsizei bufSize + GLubyte *pattern + + + void glGetnPolygonStippleARB + GLsizei bufSize + GLubyte *pattern + + + void glGetnSeparableFilter + GLenum target + GLenum format + GLenum type + GLsizei rowBufSize + void *row + GLsizei columnBufSize + void *column + void *span + + + void glGetnSeparableFilterARB + GLenum target + GLenum format + GLenum type + GLsizei rowBufSize + void *row + GLsizei columnBufSize + void *column + void *span + + + void glGetnTexImage + GLenum target + GLint level + GLenum format + GLenum type + GLsizei bufSize + void *pixels + + + void glGetnTexImageARB + GLenum target + GLint level + GLenum format + GLenum type + GLsizei bufSize + void *img + + + void glGetnUniformdv + GLuint program + GLint location + GLsizei bufSize + GLdouble *params + + + void glGetnUniformdvARB + GLuint program + GLint location + GLsizei bufSize + GLdouble *params + + + void glGetnUniformfv + GLuint program + GLint location + GLsizei bufSize + GLfloat *params + + + void glGetnUniformfvARB + GLuint program + GLint location + GLsizei bufSize + GLfloat *params + + + void glGetnUniformfvEXT + GLuint program + GLint location + GLsizei bufSize + GLfloat *params + + + + void glGetnUniformfvKHR + GLuint program + GLint location + GLsizei bufSize + GLfloat *params + + + + void glGetnUniformi64vARB + GLuint program + GLint location + GLsizei bufSize + GLint64 *params + + + void glGetnUniformiv + GLuint program + GLint location + GLsizei bufSize + GLint *params + + + void glGetnUniformivARB + GLuint program + GLint location + GLsizei bufSize + GLint *params + + + void glGetnUniformivEXT + GLuint program + GLint location + GLsizei bufSize + GLint *params + + + + void glGetnUniformivKHR + GLuint program + GLint location + GLsizei bufSize + GLint *params + + + + void glGetnUniformui64vARB + GLuint program + GLint location + GLsizei bufSize + GLuint64 *params + + + void glGetnUniformuiv + GLuint program + GLint location + GLsizei bufSize + GLuint *params + + + void glGetnUniformuivARB + GLuint program + GLint location + GLsizei bufSize + GLuint *params + + + void glGetnUniformuivKHR + GLuint program + GLint location + GLsizei bufSize + GLuint *params + + + + void glGlobalAlphaFactorbSUN + GLbyte factor + + + void glGlobalAlphaFactordSUN + GLdouble factor + + + void glGlobalAlphaFactorfSUN + GLfloat factor + + + void glGlobalAlphaFactoriSUN + GLint factor + + + void glGlobalAlphaFactorsSUN + GLshort factor + + + void glGlobalAlphaFactorubSUN + GLubyte factor + + + void glGlobalAlphaFactoruiSUN + GLuint factor + + + void glGlobalAlphaFactorusSUN + GLushort factor + + + void glHint + GLenum target + GLenum mode + + + + void glHintPGI + GLenum target + GLint mode + + + void glHistogram + GLenum target + GLsizei width + GLenum internalformat + GLboolean sink + + + + void glHistogramEXT + GLenum target + GLsizei width + GLenum internalformat + GLboolean sink + + + + + void glIglooInterfaceSGIX + GLenum pname + const void *params + + + + void glImageTransformParameterfHP + GLenum target + GLenum pname + GLfloat param + + + void glImageTransformParameterfvHP + GLenum target + GLenum pname + const GLfloat *params + + + void glImageTransformParameteriHP + GLenum target + GLenum pname + GLint param + + + void glImageTransformParameterivHP + GLenum target + GLenum pname + const GLint *params + + + void glImportMemoryFdEXT + GLuint memory + GLuint64 size + GLenum handleType + GLint fd + + + void glImportMemoryWin32HandleEXT + GLuint memory + GLuint64 size + GLenum handleType + void *handle + + + void glImportMemoryWin32NameEXT + GLuint memory + GLuint64 size + GLenum handleType + const void *name + + + void glImportSemaphoreFdEXT + GLuint semaphore + GLenum handleType + GLint fd + + + void glImportSemaphoreWin32HandleEXT + GLuint semaphore + GLenum handleType + void *handle + + + void glImportSemaphoreWin32NameEXT + GLuint semaphore + GLenum handleType + const void *name + + + GLsync glImportSyncEXT + GLenum external_sync_type + GLintptr external_sync + GLbitfield flags + + + void glIndexFormatNV + GLenum type + GLsizei stride + + + void glIndexFuncEXT + GLenum func + GLclampf ref + + + void glIndexMask + GLuint mask + + + + void glIndexMaterialEXT + GLenum face + GLenum mode + + + void glIndexPointer + GLenum type + GLsizei stride + const void *pointer + + + void glIndexPointerEXT + GLenum type + GLsizei stride + GLsizei count + const void *pointer + + + void glIndexPointerListIBM + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glIndexd + GLdouble c + + + + void glIndexdv + const GLdouble *c + + + + void glIndexf + GLfloat c + + + + void glIndexfv + const GLfloat *c + + + + void glIndexi + GLint c + + + + void glIndexiv + const GLint *c + + + + void glIndexs + GLshort c + + + + void glIndexsv + const GLshort *c + + + + void glIndexub + GLubyte c + + + + void glIndexubv + const GLubyte *c + + + + void glIndexxOES + GLfixed component + + + void glIndexxvOES + const GLfixed *component + + + void glInitNames + + + + void glInsertComponentEXT + GLuint res + GLuint src + GLuint num + + + void glInsertEventMarkerEXT + GLsizei length + const GLchar *marker + + + void glInstrumentsBufferSGIX + GLsizei size + GLint *buffer + + + + void glInterleavedArrays + GLenum format + GLsizei stride + const void *pointer + + + void glInterpolatePathsNV + GLuint resultPath + GLuint pathA + GLuint pathB + GLfloat weight + + + void glInvalidateBufferData + GLuint buffer + + + void glInvalidateBufferSubData + GLuint buffer + GLintptr offset + GLsizeiptr length + + + void glInvalidateFramebuffer + GLenum target + GLsizei numAttachments + const GLenum *attachments + + + void glInvalidateNamedFramebufferData + GLuint framebuffer + GLsizei numAttachments + const GLenum *attachments + + + void glInvalidateNamedFramebufferSubData + GLuint framebuffer + GLsizei numAttachments + const GLenum *attachments + GLint x + GLint y + GLsizei width + GLsizei height + + + void glInvalidateSubFramebuffer + GLenum target + GLsizei numAttachments + const GLenum *attachments + GLint x + GLint y + GLsizei width + GLsizei height + + + void glInvalidateTexImage + GLuint texture + GLint level + + + void glInvalidateTexSubImage + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + + + GLboolean glIsAsyncMarkerSGIX + GLuint marker + + + GLboolean glIsBuffer + GLuint buffer + + + GLboolean glIsBufferARB + GLuint buffer + + + + GLboolean glIsBufferResidentNV + GLenum target + + + GLboolean glIsCommandListNV + GLuint list + + + GLboolean glIsEnabled + GLenum cap + + + + GLboolean glIsEnabledIndexedEXT + GLenum target + GLuint index + + + + + GLboolean glIsEnabledi + GLenum target + GLuint index + + + GLboolean glIsEnablediEXT + GLenum target + GLuint index + + + + GLboolean glIsEnablediNV + GLenum target + GLuint index + + + + GLboolean glIsEnablediOES + GLenum target + GLuint index + + + + GLboolean glIsFenceAPPLE + GLuint fence + + + GLboolean glIsFenceNV + GLuint fence + + + + GLboolean glIsFramebuffer + GLuint framebuffer + + + + GLboolean glIsFramebufferEXT + GLuint framebuffer + + + + + GLboolean glIsFramebufferOES + GLuint framebuffer + + + GLboolean glIsImageHandleResidentARB + GLuint64 handle + + + GLboolean glIsImageHandleResidentNV + GLuint64 handle + + + GLboolean glIsList + GLuint list + + + + GLboolean glIsMemoryObjectEXT + GLuint memoryObject + + + GLboolean glIsNameAMD + GLenum identifier + GLuint name + + + GLboolean glIsNamedBufferResidentNV + GLuint buffer + + + GLboolean glIsNamedStringARB + GLint namelen + const GLchar *name + + + GLboolean glIsObjectBufferATI + GLuint buffer + + + GLboolean glIsOcclusionQueryNV + GLuint id + + + GLboolean glIsPathNV + GLuint path + + + GLboolean glIsPointInFillPathNV + GLuint path + GLuint mask + GLfloat x + GLfloat y + + + GLboolean glIsPointInStrokePathNV + GLuint path + GLfloat x + GLfloat y + + + GLboolean glIsProgram + GLuint program + + + + GLboolean glIsProgramARB + GLuint program + + + + GLboolean glIsProgramNV + GLuint id + + + + + GLboolean glIsProgramPipeline + GLuint pipeline + + + GLboolean glIsProgramPipelineEXT + GLuint pipeline + + + GLboolean glIsQuery + GLuint id + + + + GLboolean glIsQueryARB + GLuint id + + + + GLboolean glIsQueryEXT + GLuint id + + + GLboolean glIsRenderbuffer + GLuint renderbuffer + + + + GLboolean glIsRenderbufferEXT + GLuint renderbuffer + + + + + GLboolean glIsRenderbufferOES + GLuint renderbuffer + + + GLboolean glIsSemaphoreEXT + GLuint semaphore + + + GLboolean glIsSampler + GLuint sampler + + + GLboolean glIsShader + GLuint shader + + + + GLboolean glIsStateNV + GLuint state + + + GLboolean glIsSync + GLsync sync + + + GLboolean glIsSyncAPPLE + GLsync sync + + + + GLboolean glIsTexture + GLuint texture + + + + GLboolean glIsTextureEXT + GLuint texture + + + + GLboolean glIsTextureHandleResidentARB + GLuint64 handle + + + GLboolean glIsTextureHandleResidentNV + GLuint64 handle + + + GLboolean glIsTransformFeedback + GLuint id + + + GLboolean glIsTransformFeedbackNV + GLuint id + + + + GLboolean glIsVariantEnabledEXT + GLuint id + GLenum cap + + + GLboolean glIsVertexArray + GLuint array + + + + GLboolean glIsVertexArrayAPPLE + GLuint array + + + + GLboolean glIsVertexArrayOES + GLuint array + + + + GLboolean glIsVertexAttribEnabledAPPLE + GLuint index + GLenum pname + + + void glLGPUCopyImageSubDataNVX + GLuint sourceGpu + GLbitfield destinationGpuMask + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srxY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei width + GLsizei height + GLsizei depth + + + void glLGPUInterlockNVX + + + void glLGPUNamedBufferSubDataNVX + GLbitfield gpuMask + GLuint buffer + GLintptr offset + GLsizeiptr size + const void *data + + + void glLabelObjectEXT + GLenum type + GLuint object + GLsizei length + const GLchar *label + + + void glLightEnviSGIX + GLenum pname + GLint param + + + void glLightModelf + GLenum pname + GLfloat param + + + + void glLightModelfv + GLenum pname + const GLfloat *params + + + + void glLightModeli + GLenum pname + GLint param + + + + void glLightModeliv + GLenum pname + const GLint *params + + + + void glLightModelx + GLenum pname + GLfixed param + + + void glLightModelxOES + GLenum pname + GLfixed param + + + void glLightModelxv + GLenum pname + const GLfixed *param + + + void glLightModelxvOES + GLenum pname + const GLfixed *param + + + void glLightf + GLenum light + GLenum pname + GLfloat param + + + + void glLightfv + GLenum light + GLenum pname + const GLfloat *params + + + + void glLighti + GLenum light + GLenum pname + GLint param + + + + void glLightiv + GLenum light + GLenum pname + const GLint *params + + + + void glLightx + GLenum light + GLenum pname + GLfixed param + + + void glLightxOES + GLenum light + GLenum pname + GLfixed param + + + void glLightxv + GLenum light + GLenum pname + const GLfixed *params + + + void glLightxvOES + GLenum light + GLenum pname + const GLfixed *params + + + void glLineStipple + GLint factor + GLushort pattern + + + + void glLineWidth + GLfloat width + + + + void glLineWidthx + GLfixed width + + + void glLineWidthxOES + GLfixed width + + + void glLinkProgram + GLuint program + + + void glLinkProgramARB + GLhandleARB programObj + + + + void glListBase + GLuint base + + + + void glListDrawCommandsStatesClientNV + GLuint list + GLuint segment + const void **indirects + const GLsizei *sizes + const GLuint *states + const GLuint *fbos + GLuint count + + + void glListParameterfSGIX + GLuint list + GLenum pname + GLfloat param + + + + void glListParameterfvSGIX + GLuint list + GLenum pname + const GLfloat *params + + + + void glListParameteriSGIX + GLuint list + GLenum pname + GLint param + + + + void glListParameterivSGIX + GLuint list + GLenum pname + const GLint *params + + + + void glLoadIdentity + + + + void glLoadIdentityDeformationMapSGIX + GLbitfield mask + + + + void glLoadMatrixd + const GLdouble *m + + + + void glLoadMatrixf + const GLfloat *m + + + + void glLoadMatrixx + const GLfixed *m + + + void glLoadMatrixxOES + const GLfixed *m + + + void glLoadName + GLuint name + + + + void glLoadPaletteFromModelViewMatrixOES + + + void glLoadProgramNV + GLenum target + GLuint id + GLsizei len + const GLubyte *program + + + + void glLoadTransposeMatrixd + const GLdouble *m + + + void glLoadTransposeMatrixdARB + const GLdouble *m + + + + void glLoadTransposeMatrixf + const GLfloat *m + + + void glLoadTransposeMatrixfARB + const GLfloat *m + + + + void glLoadTransposeMatrixxOES + const GLfixed *m + + + void glLockArraysEXT + GLint first + GLsizei count + + + void glLogicOp + GLenum opcode + + + + void glMakeBufferNonResidentNV + GLenum target + + + void glMakeBufferResidentNV + GLenum target + GLenum access + + + void glMakeImageHandleNonResidentARB + GLuint64 handle + + + void glMakeImageHandleNonResidentNV + GLuint64 handle + + + void glMakeImageHandleResidentARB + GLuint64 handle + GLenum access + + + void glMakeImageHandleResidentNV + GLuint64 handle + GLenum access + + + void glMakeNamedBufferNonResidentNV + GLuint buffer + + + void glMakeNamedBufferResidentNV + GLuint buffer + GLenum access + + + void glMakeTextureHandleNonResidentARB + GLuint64 handle + + + void glMakeTextureHandleNonResidentNV + GLuint64 handle + + + void glMakeTextureHandleResidentARB + GLuint64 handle + + + void glMakeTextureHandleResidentNV + GLuint64 handle + + + void glMap1d + GLenum target + GLdouble u1 + GLdouble u2 + GLint stride + GLint order + const GLdouble *points + + + + void glMap1f + GLenum target + GLfloat u1 + GLfloat u2 + GLint stride + GLint order + const GLfloat *points + + + + void glMap1xOES + GLenum target + GLfixed u1 + GLfixed u2 + GLint stride + GLint order + GLfixed points + + + void glMap2d + GLenum target + GLdouble u1 + GLdouble u2 + GLint ustride + GLint uorder + GLdouble v1 + GLdouble v2 + GLint vstride + GLint vorder + const GLdouble *points + + + + void glMap2f + GLenum target + GLfloat u1 + GLfloat u2 + GLint ustride + GLint uorder + GLfloat v1 + GLfloat v2 + GLint vstride + GLint vorder + const GLfloat *points + + + + void glMap2xOES + GLenum target + GLfixed u1 + GLfixed u2 + GLint ustride + GLint uorder + GLfixed v1 + GLfixed v2 + GLint vstride + GLint vorder + GLfixed points + + + void *glMapBuffer + GLenum target + GLenum access + + + void *glMapBufferARB + GLenum target + GLenum access + + + + void *glMapBufferOES + GLenum target + GLenum access + + + + void *glMapBufferRange + GLenum target + GLintptr offset + GLsizeiptr length + GLbitfield access + + + + void *glMapBufferRangeEXT + GLenum target + GLintptr offset + GLsizeiptr length + GLbitfield access + + + + void glMapControlPointsNV + GLenum target + GLuint index + GLenum type + GLsizei ustride + GLsizei vstride + GLint uorder + GLint vorder + GLboolean packed + const void *points + + + void glMapGrid1d + GLint un + GLdouble u1 + GLdouble u2 + + + + void glMapGrid1f + GLint un + GLfloat u1 + GLfloat u2 + + + + void glMapGrid1xOES + GLint n + GLfixed u1 + GLfixed u2 + + + void glMapGrid2d + GLint un + GLdouble u1 + GLdouble u2 + GLint vn + GLdouble v1 + GLdouble v2 + + + + void glMapGrid2f + GLint un + GLfloat u1 + GLfloat u2 + GLint vn + GLfloat v1 + GLfloat v2 + + + + void glMapGrid2xOES + GLint n + GLfixed u1 + GLfixed u2 + GLfixed v1 + GLfixed v2 + + + void *glMapNamedBuffer + GLuint buffer + GLenum access + + + void *glMapNamedBufferEXT + GLuint buffer + GLenum access + + + void *glMapNamedBufferRange + GLuint buffer + GLintptr offset + GLsizeiptr length + GLbitfield access + + + void *glMapNamedBufferRangeEXT + GLuint buffer + GLintptr offset + GLsizeiptr length + GLbitfield access + + + void *glMapObjectBufferATI + GLuint buffer + + + void glMapParameterfvNV + GLenum target + GLenum pname + const GLfloat *params + + + void glMapParameterivNV + GLenum target + GLenum pname + const GLint *params + + + void *glMapTexture2DINTEL + GLuint texture + GLint level + GLbitfield access + GLint *stride + GLenum *layout + + + void glMapVertexAttrib1dAPPLE + GLuint index + GLuint size + GLdouble u1 + GLdouble u2 + GLint stride + GLint order + const GLdouble *points + + + void glMapVertexAttrib1fAPPLE + GLuint index + GLuint size + GLfloat u1 + GLfloat u2 + GLint stride + GLint order + const GLfloat *points + + + void glMapVertexAttrib2dAPPLE + GLuint index + GLuint size + GLdouble u1 + GLdouble u2 + GLint ustride + GLint uorder + GLdouble v1 + GLdouble v2 + GLint vstride + GLint vorder + const GLdouble *points + + + void glMapVertexAttrib2fAPPLE + GLuint index + GLuint size + GLfloat u1 + GLfloat u2 + GLint ustride + GLint uorder + GLfloat v1 + GLfloat v2 + GLint vstride + GLint vorder + const GLfloat *points + + + void glMaterialf + GLenum face + GLenum pname + GLfloat param + + + + void glMaterialfv + GLenum face + GLenum pname + const GLfloat *params + + + + void glMateriali + GLenum face + GLenum pname + GLint param + + + + void glMaterialiv + GLenum face + GLenum pname + const GLint *params + + + + void glMaterialx + GLenum face + GLenum pname + GLfixed param + + + void glMaterialxOES + GLenum face + GLenum pname + GLfixed param + + + void glMaterialxv + GLenum face + GLenum pname + const GLfixed *param + + + void glMaterialxvOES + GLenum face + GLenum pname + const GLfixed *param + + + void glMatrixFrustumEXT + GLenum mode + GLdouble left + GLdouble right + GLdouble bottom + GLdouble top + GLdouble zNear + GLdouble zFar + + + void glMatrixIndexPointerARB + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glMatrixIndexPointerOES + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glMatrixIndexubvARB + GLint size + const GLubyte *indices + + + + void glMatrixIndexuivARB + GLint size + const GLuint *indices + + + + void glMatrixIndexusvARB + GLint size + const GLushort *indices + + + + void glMatrixLoad3x2fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixLoad3x3fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixLoadIdentityEXT + GLenum mode + + + void glMatrixLoadTranspose3x3fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixLoadTransposedEXT + GLenum mode + const GLdouble *m + + + void glMatrixLoadTransposefEXT + GLenum mode + const GLfloat *m + + + void glMatrixLoaddEXT + GLenum mode + const GLdouble *m + + + void glMatrixLoadfEXT + GLenum mode + const GLfloat *m + + + void glMatrixMode + GLenum mode + + + + void glMatrixMult3x2fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixMult3x3fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixMultTranspose3x3fNV + GLenum matrixMode + const GLfloat *m + + + void glMatrixMultTransposedEXT + GLenum mode + const GLdouble *m + + + void glMatrixMultTransposefEXT + GLenum mode + const GLfloat *m + + + void glMatrixMultdEXT + GLenum mode + const GLdouble *m + + + void glMatrixMultfEXT + GLenum mode + const GLfloat *m + + + void glMatrixOrthoEXT + GLenum mode + GLdouble left + GLdouble right + GLdouble bottom + GLdouble top + GLdouble zNear + GLdouble zFar + + + void glMatrixPopEXT + GLenum mode + + + void glMatrixPushEXT + GLenum mode + + + void glMatrixRotatedEXT + GLenum mode + GLdouble angle + GLdouble x + GLdouble y + GLdouble z + + + void glMatrixRotatefEXT + GLenum mode + GLfloat angle + GLfloat x + GLfloat y + GLfloat z + + + void glMatrixScaledEXT + GLenum mode + GLdouble x + GLdouble y + GLdouble z + + + void glMatrixScalefEXT + GLenum mode + GLfloat x + GLfloat y + GLfloat z + + + void glMatrixTranslatedEXT + GLenum mode + GLdouble x + GLdouble y + GLdouble z + + + void glMatrixTranslatefEXT + GLenum mode + GLfloat x + GLfloat y + GLfloat z + + + void glMaxActiveShaderCoresARM + GLuint count + + + void glMaxShaderCompilerThreadsKHR + GLuint count + + + void glMaxShaderCompilerThreadsARB + GLuint count + + + + void glMemoryBarrier + GLbitfield barriers + + + void glMemoryBarrierByRegion + GLbitfield barriers + + + void glMemoryBarrierEXT + GLbitfield barriers + + + + void glMemoryObjectParameterivEXT + GLuint memoryObject + GLenum pname + const GLint *params + + + void glMinSampleShading + GLfloat value + + + void glMinSampleShadingARB + GLfloat value + + + + void glMinSampleShadingOES + GLfloat value + + + + void glMinmax + GLenum target + GLenum internalformat + GLboolean sink + + + + void glMinmaxEXT + GLenum target + GLenum internalformat + GLboolean sink + + + + + void glMultMatrixd + const GLdouble *m + + + + void glMultMatrixf + const GLfloat *m + + + + void glMultMatrixx + const GLfixed *m + + + void glMultMatrixxOES + const GLfixed *m + + + void glMultTransposeMatrixd + const GLdouble *m + + + void glMultTransposeMatrixdARB + const GLdouble *m + + + + void glMultTransposeMatrixf + const GLfloat *m + + + void glMultTransposeMatrixfARB + const GLfloat *m + + + + void glMultTransposeMatrixxOES + const GLfixed *m + + + void glMultiDrawArrays + GLenum mode + const GLint *first + const GLsizei *count + GLsizei drawcount + + + void glMultiDrawArraysEXT + GLenum mode + const GLint *first + const GLsizei *count + GLsizei primcount + + + + void glMultiDrawArraysIndirect + GLenum mode + const void *indirect + GLsizei drawcount + GLsizei stride + + + void glMultiDrawArraysIndirectAMD + GLenum mode + const void *indirect + GLsizei primcount + GLsizei stride + + + + void glMultiDrawArraysIndirectBindlessCountNV + GLenum mode + const void *indirect + GLsizei drawCount + GLsizei maxDrawCount + GLsizei stride + GLint vertexBufferCount + + + void glMultiDrawArraysIndirectBindlessNV + GLenum mode + const void *indirect + GLsizei drawCount + GLsizei stride + GLint vertexBufferCount + + + void glMultiDrawArraysIndirectCount + GLenum mode + const void *indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + void glMultiDrawArraysIndirectCountARB + GLenum mode + const void *indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + + void glMultiDrawArraysIndirectEXT + GLenum mode + const void *indirect + GLsizei drawcount + GLsizei stride + + + + void glMultiDrawElementArrayAPPLE + GLenum mode + const GLint *first + const GLsizei *count + GLsizei primcount + + + void glMultiDrawElements + GLenum mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei drawcount + + + void glMultiDrawElementsBaseVertex + GLenum mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei drawcount + const GLint *basevertex + + + void glMultiDrawElementsBaseVertexEXT + GLenum mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei drawcount + const GLint *basevertex + + + + void glMultiDrawElementsEXT + GLenum mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei primcount + + + + void glMultiDrawElementsIndirect + GLenum mode + GLenum type + const void *indirect + GLsizei drawcount + GLsizei stride + + + void glMultiDrawElementsIndirectAMD + GLenum mode + GLenum type + const void *indirect + GLsizei primcount + GLsizei stride + + + + void glMultiDrawElementsIndirectBindlessCountNV + GLenum mode + GLenum type + const void *indirect + GLsizei drawCount + GLsizei maxDrawCount + GLsizei stride + GLint vertexBufferCount + + + void glMultiDrawElementsIndirectBindlessNV + GLenum mode + GLenum type + const void *indirect + GLsizei drawCount + GLsizei stride + GLint vertexBufferCount + + + void glMultiDrawElementsIndirectCount + GLenum mode + GLenum type + const void *indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + void glMultiDrawElementsIndirectCountARB + GLenum mode + GLenum type + const void *indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + + void glMultiDrawElementsIndirectEXT + GLenum mode + GLenum type + const void *indirect + GLsizei drawcount + GLsizei stride + + + + void glMultiDrawMeshTasksIndirectEXT + GLintptr indirect + GLsizei drawcount + GLsizei stride + + + void glMultiDrawMeshTasksIndirectNV + GLintptr indirect + GLsizei drawcount + GLsizei stride + + + void glMultiDrawMeshTasksIndirectCountEXT + GLintptr indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + void glMultiDrawMeshTasksIndirectCountNV + GLintptr indirect + GLintptr drawcount + GLsizei maxdrawcount + GLsizei stride + + + void glMultiDrawRangeElementArrayAPPLE + GLenum mode + GLuint start + GLuint end + const GLint *first + const GLsizei *count + GLsizei primcount + + + void glMultiModeDrawArraysIBM + const GLenum *mode + const GLint *first + const GLsizei *count + GLsizei primcount + GLint modestride + + + void glMultiModeDrawElementsIBM + const GLenum *mode + const GLsizei *count + GLenum type + const void *const*indices + GLsizei primcount + GLint modestride + + + void glMultiTexBufferEXT + GLenum texunit + GLenum target + GLenum internalformat + GLuint buffer + + + void glMultiTexCoord1bOES + GLenum texture + GLbyte s + + + void glMultiTexCoord1bvOES + GLenum texture + const GLbyte *coords + + + void glMultiTexCoord1d + GLenum target + GLdouble s + + + + void glMultiTexCoord1dARB + GLenum target + GLdouble s + + + + + void glMultiTexCoord1dv + GLenum target + const GLdouble *v + + + + void glMultiTexCoord1dvARB + GLenum target + const GLdouble *v + + + + + void glMultiTexCoord1f + GLenum target + GLfloat s + + + + void glMultiTexCoord1fARB + GLenum target + GLfloat s + + + + + void glMultiTexCoord1fv + GLenum target + const GLfloat *v + + + + void glMultiTexCoord1fvARB + GLenum target + const GLfloat *v + + + + + void glMultiTexCoord1hNV + GLenum target + GLhalfNV s + + + + void glMultiTexCoord1hvNV + GLenum target + const GLhalfNV *v + + + + void glMultiTexCoord1i + GLenum target + GLint s + + + + void glMultiTexCoord1iARB + GLenum target + GLint s + + + + + void glMultiTexCoord1iv + GLenum target + const GLint *v + + + + void glMultiTexCoord1ivARB + GLenum target + const GLint *v + + + + + void glMultiTexCoord1s + GLenum target + GLshort s + + + + void glMultiTexCoord1sARB + GLenum target + GLshort s + + + + + void glMultiTexCoord1sv + GLenum target + const GLshort *v + + + + void glMultiTexCoord1svARB + GLenum target + const GLshort *v + + + + + void glMultiTexCoord1xOES + GLenum texture + GLfixed s + + + void glMultiTexCoord1xvOES + GLenum texture + const GLfixed *coords + + + void glMultiTexCoord2bOES + GLenum texture + GLbyte s + GLbyte t + + + void glMultiTexCoord2bvOES + GLenum texture + const GLbyte *coords + + + void glMultiTexCoord2d + GLenum target + GLdouble s + GLdouble t + + + + void glMultiTexCoord2dARB + GLenum target + GLdouble s + GLdouble t + + + + + void glMultiTexCoord2dv + GLenum target + const GLdouble *v + + + + void glMultiTexCoord2dvARB + GLenum target + const GLdouble *v + + + + + void glMultiTexCoord2f + GLenum target + GLfloat s + GLfloat t + + + + void glMultiTexCoord2fARB + GLenum target + GLfloat s + GLfloat t + + + + + void glMultiTexCoord2fv + GLenum target + const GLfloat *v + + + + void glMultiTexCoord2fvARB + GLenum target + const GLfloat *v + + + + + void glMultiTexCoord2hNV + GLenum target + GLhalfNV s + GLhalfNV t + + + + void glMultiTexCoord2hvNV + GLenum target + const GLhalfNV *v + + + + void glMultiTexCoord2i + GLenum target + GLint s + GLint t + + + + void glMultiTexCoord2iARB + GLenum target + GLint s + GLint t + + + + + void glMultiTexCoord2iv + GLenum target + const GLint *v + + + + void glMultiTexCoord2ivARB + GLenum target + const GLint *v + + + + + void glMultiTexCoord2s + GLenum target + GLshort s + GLshort t + + + + void glMultiTexCoord2sARB + GLenum target + GLshort s + GLshort t + + + + + void glMultiTexCoord2sv + GLenum target + const GLshort *v + + + + void glMultiTexCoord2svARB + GLenum target + const GLshort *v + + + + + void glMultiTexCoord2xOES + GLenum texture + GLfixed s + GLfixed t + + + void glMultiTexCoord2xvOES + GLenum texture + const GLfixed *coords + + + void glMultiTexCoord3bOES + GLenum texture + GLbyte s + GLbyte t + GLbyte r + + + void glMultiTexCoord3bvOES + GLenum texture + const GLbyte *coords + + + void glMultiTexCoord3d + GLenum target + GLdouble s + GLdouble t + GLdouble r + + + + void glMultiTexCoord3dARB + GLenum target + GLdouble s + GLdouble t + GLdouble r + + + + + void glMultiTexCoord3dv + GLenum target + const GLdouble *v + + + + void glMultiTexCoord3dvARB + GLenum target + const GLdouble *v + + + + + void glMultiTexCoord3f + GLenum target + GLfloat s + GLfloat t + GLfloat r + + + + void glMultiTexCoord3fARB + GLenum target + GLfloat s + GLfloat t + GLfloat r + + + + + void glMultiTexCoord3fv + GLenum target + const GLfloat *v + + + + void glMultiTexCoord3fvARB + GLenum target + const GLfloat *v + + + + + void glMultiTexCoord3hNV + GLenum target + GLhalfNV s + GLhalfNV t + GLhalfNV r + + + + void glMultiTexCoord3hvNV + GLenum target + const GLhalfNV *v + + + + void glMultiTexCoord3i + GLenum target + GLint s + GLint t + GLint r + + + + void glMultiTexCoord3iARB + GLenum target + GLint s + GLint t + GLint r + + + + + void glMultiTexCoord3iv + GLenum target + const GLint *v + + + + void glMultiTexCoord3ivARB + GLenum target + const GLint *v + + + + + void glMultiTexCoord3s + GLenum target + GLshort s + GLshort t + GLshort r + + + + void glMultiTexCoord3sARB + GLenum target + GLshort s + GLshort t + GLshort r + + + + + void glMultiTexCoord3sv + GLenum target + const GLshort *v + + + + void glMultiTexCoord3svARB + GLenum target + const GLshort *v + + + + + void glMultiTexCoord3xOES + GLenum texture + GLfixed s + GLfixed t + GLfixed r + + + void glMultiTexCoord3xvOES + GLenum texture + const GLfixed *coords + + + void glMultiTexCoord4bOES + GLenum texture + GLbyte s + GLbyte t + GLbyte r + GLbyte q + + + void glMultiTexCoord4bvOES + GLenum texture + const GLbyte *coords + + + void glMultiTexCoord4d + GLenum target + GLdouble s + GLdouble t + GLdouble r + GLdouble q + + + + void glMultiTexCoord4dARB + GLenum target + GLdouble s + GLdouble t + GLdouble r + GLdouble q + + + + + void glMultiTexCoord4dv + GLenum target + const GLdouble *v + + + + void glMultiTexCoord4dvARB + GLenum target + const GLdouble *v + + + + + void glMultiTexCoord4f + GLenum target + GLfloat s + GLfloat t + GLfloat r + GLfloat q + + + + void glMultiTexCoord4fARB + GLenum target + GLfloat s + GLfloat t + GLfloat r + GLfloat q + + + + + void glMultiTexCoord4fv + GLenum target + const GLfloat *v + + + + void glMultiTexCoord4fvARB + GLenum target + const GLfloat *v + + + + + void glMultiTexCoord4hNV + GLenum target + GLhalfNV s + GLhalfNV t + GLhalfNV r + GLhalfNV q + + + + void glMultiTexCoord4hvNV + GLenum target + const GLhalfNV *v + + + + void glMultiTexCoord4i + GLenum target + GLint s + GLint t + GLint r + GLint q + + + + void glMultiTexCoord4iARB + GLenum target + GLint s + GLint t + GLint r + GLint q + + + + + void glMultiTexCoord4iv + GLenum target + const GLint *v + + + + void glMultiTexCoord4ivARB + GLenum target + const GLint *v + + + + + void glMultiTexCoord4s + GLenum target + GLshort s + GLshort t + GLshort r + GLshort q + + + + void glMultiTexCoord4sARB + GLenum target + GLshort s + GLshort t + GLshort r + GLshort q + + + + + void glMultiTexCoord4sv + GLenum target + const GLshort *v + + + + void glMultiTexCoord4svARB + GLenum target + const GLshort *v + + + + + void glMultiTexCoord4x + GLenum texture + GLfixed s + GLfixed t + GLfixed r + GLfixed q + + + void glMultiTexCoord4xOES + GLenum texture + GLfixed s + GLfixed t + GLfixed r + GLfixed q + + + void glMultiTexCoord4xvOES + GLenum texture + const GLfixed *coords + + + void glMultiTexCoordP1ui + GLenum texture + GLenum type + GLuint coords + + + void glMultiTexCoordP1uiv + GLenum texture + GLenum type + const GLuint *coords + + + void glMultiTexCoordP2ui + GLenum texture + GLenum type + GLuint coords + + + void glMultiTexCoordP2uiv + GLenum texture + GLenum type + const GLuint *coords + + + void glMultiTexCoordP3ui + GLenum texture + GLenum type + GLuint coords + + + void glMultiTexCoordP3uiv + GLenum texture + GLenum type + const GLuint *coords + + + void glMultiTexCoordP4ui + GLenum texture + GLenum type + GLuint coords + + + void glMultiTexCoordP4uiv + GLenum texture + GLenum type + const GLuint *coords + + + void glMultiTexCoordPointerEXT + GLenum texunit + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glMultiTexEnvfEXT + GLenum texunit + GLenum target + GLenum pname + GLfloat param + + + + void glMultiTexEnvfvEXT + GLenum texunit + GLenum target + GLenum pname + const GLfloat *params + + + void glMultiTexEnviEXT + GLenum texunit + GLenum target + GLenum pname + GLint param + + + + void glMultiTexEnvivEXT + GLenum texunit + GLenum target + GLenum pname + const GLint *params + + + void glMultiTexGendEXT + GLenum texunit + GLenum coord + GLenum pname + GLdouble param + + + + void glMultiTexGendvEXT + GLenum texunit + GLenum coord + GLenum pname + const GLdouble *params + + + void glMultiTexGenfEXT + GLenum texunit + GLenum coord + GLenum pname + GLfloat param + + + + void glMultiTexGenfvEXT + GLenum texunit + GLenum coord + GLenum pname + const GLfloat *params + + + void glMultiTexGeniEXT + GLenum texunit + GLenum coord + GLenum pname + GLint param + + + + void glMultiTexGenivEXT + GLenum texunit + GLenum coord + GLenum pname + const GLint *params + + + void glMultiTexImage1DEXT + GLenum texunit + GLenum target + GLint level + GLint internalformat + GLsizei width + GLint border + GLenum format + GLenum type + const void *pixels + + + void glMultiTexImage2DEXT + GLenum texunit + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLint border + GLenum format + GLenum type + const void *pixels + + + void glMultiTexImage3DEXT + GLenum texunit + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLenum format + GLenum type + const void *pixels + + + void glMultiTexParameterIivEXT + GLenum texunit + GLenum target + GLenum pname + const GLint *params + + + void glMultiTexParameterIuivEXT + GLenum texunit + GLenum target + GLenum pname + const GLuint *params + + + void glMultiTexParameterfEXT + GLenum texunit + GLenum target + GLenum pname + GLfloat param + + + + void glMultiTexParameterfvEXT + GLenum texunit + GLenum target + GLenum pname + const GLfloat *params + + + void glMultiTexParameteriEXT + GLenum texunit + GLenum target + GLenum pname + GLint param + + + + void glMultiTexParameterivEXT + GLenum texunit + GLenum target + GLenum pname + const GLint *params + + + void glMultiTexRenderbufferEXT + GLenum texunit + GLenum target + GLuint renderbuffer + + + void glMultiTexSubImage1DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLenum type + const void *pixels + + + void glMultiTexSubImage2DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + void glMultiTexSubImage3DEXT + GLenum texunit + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + void glMulticastBarrierNV + + + void glMulticastBlitFramebufferNV + GLuint srcGpu + GLuint dstGpu + GLint srcX0 + GLint srcY0 + GLint srcX1 + GLint srcY1 + GLint dstX0 + GLint dstY0 + GLint dstX1 + GLint dstY1 + GLbitfield mask + GLenum filter + + + void glMulticastBufferSubDataNV + GLbitfield gpuMask + GLuint buffer + GLintptr offset + GLsizeiptr size + const void *data + + + void glMulticastCopyBufferSubDataNV + GLuint readGpu + GLbitfield writeGpuMask + GLuint readBuffer + GLuint writeBuffer + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + void glMulticastCopyImageSubDataNV + GLuint srcGpu + GLbitfield dstGpuMask + GLuint srcName + GLenum srcTarget + GLint srcLevel + GLint srcX + GLint srcY + GLint srcZ + GLuint dstName + GLenum dstTarget + GLint dstLevel + GLint dstX + GLint dstY + GLint dstZ + GLsizei srcWidth + GLsizei srcHeight + GLsizei srcDepth + + + void glMulticastFramebufferSampleLocationsfvNV + GLuint gpu + GLuint framebuffer + GLuint start + GLsizei count + const GLfloat *v + + + void glMulticastGetQueryObjecti64vNV + GLuint gpu + GLuint id + GLenum pname + GLint64 *params + + + void glMulticastGetQueryObjectivNV + GLuint gpu + GLuint id + GLenum pname + GLint *params + + + void glMulticastGetQueryObjectui64vNV + GLuint gpu + GLuint id + GLenum pname + GLuint64 *params + + + void glMulticastGetQueryObjectuivNV + GLuint gpu + GLuint id + GLenum pname + GLuint *params + + + void glMulticastScissorArrayvNVX + GLuint gpu + GLuint first + GLsizei count + const GLint *v + + + void glMulticastViewportArrayvNVX + GLuint gpu + GLuint first + GLsizei count + const GLfloat *v + + + void glMulticastViewportPositionWScaleNVX + GLuint gpu + GLuint index + GLfloat xcoeff + GLfloat ycoeff + + + void glMulticastWaitSyncNV + GLuint signalGpu + GLbitfield waitGpuMask + + + void glNamedBufferAttachMemoryNV + GLuint buffer + GLuint memory + GLuint64 offset + + + void glNamedBufferData + GLuint buffer + GLsizeiptr size + const void *data + GLenum usage + + + void glNamedBufferDataEXT + GLuint buffer + GLsizeiptr size + const void *data + GLenum usage + + + void glNamedBufferPageCommitmentARB + GLuint buffer + GLintptr offset + GLsizeiptr size + GLboolean commit + + + void glNamedBufferPageCommitmentEXT + GLuint buffer + GLintptr offset + GLsizeiptr size + GLboolean commit + + + void glNamedBufferPageCommitmentMemNV + GLuint buffer + GLintptr offset + GLsizeiptr size + GLuint memory + GLuint64 memOffset + GLboolean commit + + + void glNamedBufferStorage + GLuint buffer + GLsizeiptr size + const void *data + GLbitfield flags + + + void glNamedBufferStorageExternalEXT + GLuint buffer + GLintptr offset + GLsizeiptr size + GLeglClientBufferEXT clientBuffer + GLbitfield flags + + + void glNamedBufferStorageEXT + GLuint buffer + GLsizeiptr size + const void *data + GLbitfield flags + + + + void glNamedBufferStorageMemEXT + GLuint buffer + GLsizeiptr size + GLuint memory + GLuint64 offset + + + void glNamedBufferSubData + GLuint buffer + GLintptr offset + GLsizeiptr size + const void *data + + + void glNamedBufferSubDataEXT + GLuint buffer + GLintptr offset + GLsizeiptr size + const void *data + + + + void glNamedCopyBufferSubDataEXT + GLuint readBuffer + GLuint writeBuffer + GLintptr readOffset + GLintptr writeOffset + GLsizeiptr size + + + void glNamedFramebufferDrawBuffer + GLuint framebuffer + GLenum buf + + + void glNamedFramebufferDrawBuffers + GLuint framebuffer + GLsizei n + const GLenum *bufs + + + void glNamedFramebufferParameteri + GLuint framebuffer + GLenum pname + GLint param + + + void glNamedFramebufferParameteriEXT + GLuint framebuffer + GLenum pname + GLint param + + + void glNamedFramebufferReadBuffer + GLuint framebuffer + GLenum src + + + void glNamedFramebufferRenderbuffer + GLuint framebuffer + GLenum attachment + GLenum renderbuffertarget + GLuint renderbuffer + + + void glNamedFramebufferRenderbufferEXT + GLuint framebuffer + GLenum attachment + GLenum renderbuffertarget + GLuint renderbuffer + + + void glNamedFramebufferSampleLocationsfvARB + GLuint framebuffer + GLuint start + GLsizei count + const GLfloat *v + + + void glNamedFramebufferSampleLocationsfvNV + GLuint framebuffer + GLuint start + GLsizei count + const GLfloat *v + + + void glNamedFramebufferTexture + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + + + void glNamedFramebufferSamplePositionsfvAMD + GLuint framebuffer + GLuint numsamples + GLuint pixelindex + const GLfloat *values + + + void glNamedFramebufferTexture1DEXT + GLuint framebuffer + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + void glNamedFramebufferTexture2DEXT + GLuint framebuffer + GLenum attachment + GLenum textarget + GLuint texture + GLint level + + + void glNamedFramebufferTexture3DEXT + GLuint framebuffer + GLenum attachment + GLenum textarget + GLuint texture + GLint level + GLint zoffset + + + void glNamedFramebufferTextureEXT + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + + + void glNamedFramebufferTextureFaceEXT + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + GLenum face + + + void glNamedFramebufferTextureLayer + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + GLint layer + + + void glNamedFramebufferTextureLayerEXT + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + GLint layer + + + void glNamedFramebufferTextureMultiviewOVR + GLuint framebuffer + GLenum attachment + GLuint texture + GLint level + GLint baseViewIndex + GLsizei numViews + + + void glNamedProgramLocalParameter4dEXT + GLuint program + GLenum target + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glNamedProgramLocalParameter4dvEXT + GLuint program + GLenum target + GLuint index + const GLdouble *params + + + void glNamedProgramLocalParameter4fEXT + GLuint program + GLenum target + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glNamedProgramLocalParameter4fvEXT + GLuint program + GLenum target + GLuint index + const GLfloat *params + + + void glNamedProgramLocalParameterI4iEXT + GLuint program + GLenum target + GLuint index + GLint x + GLint y + GLint z + GLint w + + + + void glNamedProgramLocalParameterI4ivEXT + GLuint program + GLenum target + GLuint index + const GLint *params + + + void glNamedProgramLocalParameterI4uiEXT + GLuint program + GLenum target + GLuint index + GLuint x + GLuint y + GLuint z + GLuint w + + + + void glNamedProgramLocalParameterI4uivEXT + GLuint program + GLenum target + GLuint index + const GLuint *params + + + void glNamedProgramLocalParameters4fvEXT + GLuint program + GLenum target + GLuint index + GLsizei count + const GLfloat *params + + + void glNamedProgramLocalParametersI4ivEXT + GLuint program + GLenum target + GLuint index + GLsizei count + const GLint *params + + + void glNamedProgramLocalParametersI4uivEXT + GLuint program + GLenum target + GLuint index + GLsizei count + const GLuint *params + + + void glNamedProgramStringEXT + GLuint program + GLenum target + GLenum format + GLsizei len + const void *string + + + void glNamedRenderbufferStorage + GLuint renderbuffer + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedRenderbufferStorageEXT + GLuint renderbuffer + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedRenderbufferStorageMultisample + GLuint renderbuffer + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedRenderbufferStorageMultisampleAdvancedAMD + GLuint renderbuffer + GLsizei samples + GLsizei storageSamples + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedRenderbufferStorageMultisampleCoverageEXT + GLuint renderbuffer + GLsizei coverageSamples + GLsizei colorSamples + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedRenderbufferStorageMultisampleEXT + GLuint renderbuffer + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + void glNamedStringARB + GLenum type + GLint namelen + const GLchar *name + GLint stringlen + const GLchar *string + + + void glNewList + GLuint list + GLenum mode + + + + GLuint glNewObjectBufferATI + GLsizei size + const void *pointer + GLenum usage + + + void glNormal3b + GLbyte nx + GLbyte ny + GLbyte nz + + + + void glNormal3bv + const GLbyte *v + + + + void glNormal3d + GLdouble nx + GLdouble ny + GLdouble nz + + + + void glNormal3dv + const GLdouble *v + + + + void glNormal3f + GLfloat nx + GLfloat ny + GLfloat nz + + + + void glNormal3fVertex3fSUN + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glNormal3fVertex3fvSUN + const GLfloat *n + const GLfloat *v + + + void glNormal3fv + const GLfloat *v + + + + void glNormal3hNV + GLhalfNV nx + GLhalfNV ny + GLhalfNV nz + + + + void glNormal3hvNV + const GLhalfNV *v + + + + void glNormal3i + GLint nx + GLint ny + GLint nz + + + + void glNormal3iv + const GLint *v + + + + void glNormal3s + GLshort nx + GLshort ny + GLshort nz + + + + void glNormal3sv + const GLshort *v + + + + void glNormal3x + GLfixed nx + GLfixed ny + GLfixed nz + + + void glNormal3xOES + GLfixed nx + GLfixed ny + GLfixed nz + + + void glNormal3xvOES + const GLfixed *coords + + + void glNormalFormatNV + GLenum type + GLsizei stride + + + void glNormalP3ui + GLenum type + GLuint coords + + + void glNormalP3uiv + GLenum type + const GLuint *coords + + + void glNormalPointer + GLenum type + GLsizei stride + const void *pointer + + + void glNormalPointerEXT + GLenum type + GLsizei stride + GLsizei count + const void *pointer + + + void glNormalPointerListIBM + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glNormalPointervINTEL + GLenum type + const void **pointer + + + void glNormalStream3bATI + GLenum stream + GLbyte nx + GLbyte ny + GLbyte nz + + + void glNormalStream3bvATI + GLenum stream + const GLbyte *coords + + + void glNormalStream3dATI + GLenum stream + GLdouble nx + GLdouble ny + GLdouble nz + + + void glNormalStream3dvATI + GLenum stream + const GLdouble *coords + + + void glNormalStream3fATI + GLenum stream + GLfloat nx + GLfloat ny + GLfloat nz + + + void glNormalStream3fvATI + GLenum stream + const GLfloat *coords + + + void glNormalStream3iATI + GLenum stream + GLint nx + GLint ny + GLint nz + + + void glNormalStream3ivATI + GLenum stream + const GLint *coords + + + void glNormalStream3sATI + GLenum stream + GLshort nx + GLshort ny + GLshort nz + + + void glNormalStream3svATI + GLenum stream + const GLshort *coords + + + void glObjectLabel + GLenum identifier + GLuint name + GLsizei length + const GLchar *label + + + void glObjectLabelKHR + GLenum identifier + GLuint name + GLsizei length + const GLchar *label + + + + void glObjectPtrLabel + const void *ptr + GLsizei length + const GLchar *label + + + void glObjectPtrLabelKHR + const void *ptr + GLsizei length + const GLchar *label + + + + GLenum glObjectPurgeableAPPLE + GLenum objectType + GLuint name + GLenum option + + + GLenum glObjectUnpurgeableAPPLE + GLenum objectType + GLuint name + GLenum option + + + void glOrtho + GLdouble left + GLdouble right + GLdouble bottom + GLdouble top + GLdouble zNear + GLdouble zFar + + + + void glOrthof + GLfloat l + GLfloat r + GLfloat b + GLfloat t + GLfloat n + GLfloat f + + + void glOrthofOES + GLfloat l + GLfloat r + GLfloat b + GLfloat t + GLfloat n + GLfloat f + + + + void glOrthox + GLfixed l + GLfixed r + GLfixed b + GLfixed t + GLfixed n + GLfixed f + + + void glOrthoxOES + GLfixed l + GLfixed r + GLfixed b + GLfixed t + GLfixed n + GLfixed f + + + void glPNTrianglesfATI + GLenum pname + GLfloat param + + + void glPNTrianglesiATI + GLenum pname + GLint param + + + void glPassTexCoordATI + GLuint dst + GLuint coord + GLenum swizzle + + + void glPassThrough + GLfloat token + + + + void glPassThroughxOES + GLfixed token + + + void glPatchParameterfv + GLenum pname + const GLfloat *values + + + void glPatchParameteri + GLenum pname + GLint value + + + void glPatchParameteriEXT + GLenum pname + GLint value + + + + void glPatchParameteriOES + GLenum pname + GLint value + + + + void glPathColorGenNV + GLenum color + GLenum genMode + GLenum colorFormat + const GLfloat *coeffs + + + void glPathCommandsNV + GLuint path + GLsizei numCommands + const GLubyte *commands + GLsizei numCoords + GLenum coordType + const void *coords + + + void glPathCoordsNV + GLuint path + GLsizei numCoords + GLenum coordType + const void *coords + + + void glPathCoverDepthFuncNV + GLenum func + + + void glPathDashArrayNV + GLuint path + GLsizei dashCount + const GLfloat *dashArray + + + void glPathFogGenNV + GLenum genMode + + + GLenum glPathGlyphIndexArrayNV + GLuint firstPathName + GLenum fontTarget + const void *fontName + GLbitfield fontStyle + GLuint firstGlyphIndex + GLsizei numGlyphs + GLuint pathParameterTemplate + GLfloat emScale + + + GLenum glPathGlyphIndexRangeNV + GLenum fontTarget + const void *fontName + GLbitfield fontStyle + GLuint pathParameterTemplate + GLfloat emScale + GLuint *baseAndCount + + + void glPathGlyphRangeNV + GLuint firstPathName + GLenum fontTarget + const void *fontName + GLbitfield fontStyle + GLuint firstGlyph + GLsizei numGlyphs + GLenum handleMissingGlyphs + GLuint pathParameterTemplate + GLfloat emScale + + + void glPathGlyphsNV + GLuint firstPathName + GLenum fontTarget + const void *fontName + GLbitfield fontStyle + GLsizei numGlyphs + GLenum type + const void *charcodes + GLenum handleMissingGlyphs + GLuint pathParameterTemplate + GLfloat emScale + + + GLenum glPathMemoryGlyphIndexArrayNV + GLuint firstPathName + GLenum fontTarget + GLsizeiptr fontSize + const void *fontData + GLsizei faceIndex + GLuint firstGlyphIndex + GLsizei numGlyphs + GLuint pathParameterTemplate + GLfloat emScale + + + void glPathParameterfNV + GLuint path + GLenum pname + GLfloat value + + + void glPathParameterfvNV + GLuint path + GLenum pname + const GLfloat *value + + + void glPathParameteriNV + GLuint path + GLenum pname + GLint value + + + void glPathParameterivNV + GLuint path + GLenum pname + const GLint *value + + + void glPathStencilDepthOffsetNV + GLfloat factor + GLfloat units + + + void glPathStencilFuncNV + GLenum func + GLint ref + GLuint mask + + + void glPathStringNV + GLuint path + GLenum format + GLsizei length + const void *pathString + + + void glPathSubCommandsNV + GLuint path + GLsizei commandStart + GLsizei commandsToDelete + GLsizei numCommands + const GLubyte *commands + GLsizei numCoords + GLenum coordType + const void *coords + + + void glPathSubCoordsNV + GLuint path + GLsizei coordStart + GLsizei numCoords + GLenum coordType + const void *coords + + + void glPathTexGenNV + GLenum texCoordSet + GLenum genMode + GLint components + const GLfloat *coeffs + + + void glPauseTransformFeedback + + + void glPauseTransformFeedbackNV + + + + void glPixelDataRangeNV + GLenum target + GLsizei length + const void *pointer + + + void glPixelMapfv + GLenum map + GLsizei mapsize + const GLfloat *values + + + + + void glPixelMapuiv + GLenum map + GLsizei mapsize + const GLuint *values + + + + + void glPixelMapusv + GLenum map + GLsizei mapsize + const GLushort *values + + + + + void glPixelMapx + GLenum map + GLint size + const GLfixed *values + + + void glPixelStoref + GLenum pname + GLfloat param + + + + void glPixelStorei + GLenum pname + GLint param + + + + void glPixelStorex + GLenum pname + GLfixed param + + + void glPixelTexGenParameterfSGIS + GLenum pname + GLfloat param + + + void glPixelTexGenParameterfvSGIS + GLenum pname + const GLfloat *params + + + void glPixelTexGenParameteriSGIS + GLenum pname + GLint param + + + void glPixelTexGenParameterivSGIS + GLenum pname + const GLint *params + + + void glPixelTexGenSGIX + GLenum mode + + + + void glPixelTransferf + GLenum pname + GLfloat param + + + + void glPixelTransferi + GLenum pname + GLint param + + + + void glPixelTransferxOES + GLenum pname + GLfixed param + + + void glPixelTransformParameterfEXT + GLenum target + GLenum pname + GLfloat param + + + + void glPixelTransformParameterfvEXT + GLenum target + GLenum pname + const GLfloat *params + + + void glPixelTransformParameteriEXT + GLenum target + GLenum pname + GLint param + + + + void glPixelTransformParameterivEXT + GLenum target + GLenum pname + const GLint *params + + + void glPixelZoom + GLfloat xfactor + GLfloat yfactor + + + + void glPixelZoomxOES + GLfixed xfactor + GLfixed yfactor + + + GLboolean glPointAlongPathNV + GLuint path + GLsizei startSegment + GLsizei numSegments + GLfloat distance + GLfloat *x + GLfloat *y + GLfloat *tangentX + GLfloat *tangentY + + + void glPointParameterf + GLenum pname + GLfloat param + + + + void glPointParameterfARB + GLenum pname + GLfloat param + + + + + void glPointParameterfEXT + GLenum pname + GLfloat param + + + + void glPointParameterfSGIS + GLenum pname + GLfloat param + + + + void glPointParameterfv + GLenum pname + const GLfloat *params + + + + void glPointParameterfvARB + GLenum pname + const GLfloat *params + + + + + void glPointParameterfvEXT + GLenum pname + const GLfloat *params + + + + void glPointParameterfvSGIS + GLenum pname + const GLfloat *params + + + + void glPointParameteri + GLenum pname + GLint param + + + + void glPointParameteriNV + GLenum pname + GLint param + + + + + void glPointParameteriv + GLenum pname + const GLint *params + + + + void glPointParameterivNV + GLenum pname + const GLint *params + + + + + void glPointParameterx + GLenum pname + GLfixed param + + + void glPointParameterxOES + GLenum pname + GLfixed param + + + void glPointParameterxv + GLenum pname + const GLfixed *params + + + void glPointParameterxvOES + GLenum pname + const GLfixed *params + + + void glPointSize + GLfloat size + + + + void glPointSizePointerOES + GLenum type + GLsizei stride + const void *pointer + + + void glPointSizex + GLfixed size + + + void glPointSizexOES + GLfixed size + + + GLint glPollAsyncSGIX + GLuint *markerp + + + GLint glPollInstrumentsSGIX + GLint *marker_p + + + + void glPolygonMode + GLenum face + GLenum mode + + + + void glPolygonModeNV + GLenum face + GLenum mode + + + + void glPolygonOffset + GLfloat factor + GLfloat units + + + + void glPolygonOffsetClamp + GLfloat factor + GLfloat units + GLfloat clamp + + + + void glPolygonOffsetClampEXT + GLfloat factor + GLfloat units + GLfloat clamp + + + + void glPolygonOffsetEXT + GLfloat factor + GLfloat bias + + + + void glPolygonOffsetx + GLfixed factor + GLfixed units + + + void glPolygonOffsetxOES + GLfixed factor + GLfixed units + + + void glPolygonStipple + const GLubyte *mask + + + + + void glPopAttrib + + + + void glPopClientAttrib + + + void glPopDebugGroup + + + void glPopDebugGroupKHR + + + + void glPopGroupMarkerEXT + + + void glPopMatrix + + + + void glPopName + + + + void glPresentFrameDualFillNV + GLuint video_slot + GLuint64EXT minPresentTime + GLuint beginPresentTimeId + GLuint presentDurationId + GLenum type + GLenum target0 + GLuint fill0 + GLenum target1 + GLuint fill1 + GLenum target2 + GLuint fill2 + GLenum target3 + GLuint fill3 + + + void glPresentFrameKeyedNV + GLuint video_slot + GLuint64EXT minPresentTime + GLuint beginPresentTimeId + GLuint presentDurationId + GLenum type + GLenum target0 + GLuint fill0 + GLuint key0 + GLenum target1 + GLuint fill1 + GLuint key1 + + + void glPrimitiveBoundingBox + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + + + void glPrimitiveBoundingBoxARB + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + + + + void glPrimitiveBoundingBoxEXT + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + + + + void glPrimitiveBoundingBoxOES + GLfloat minX + GLfloat minY + GLfloat minZ + GLfloat minW + GLfloat maxX + GLfloat maxY + GLfloat maxZ + GLfloat maxW + + + + void glPrimitiveRestartIndex + GLuint index + + + void glPrimitiveRestartIndexNV + GLuint index + + + + void glPrimitiveRestartNV + + + + void glPrioritizeTextures + GLsizei n + const GLuint *textures + const GLfloat *priorities + + + + void glPrioritizeTexturesEXT + GLsizei n + const GLuint *textures + const GLclampf *priorities + + + + + void glPrioritizeTexturesxOES + GLsizei n + const GLuint *textures + const GLfixed *priorities + + + void glProgramBinary + GLuint program + GLenum binaryFormat + const void *binary + GLsizei length + + + void glProgramBinaryOES + GLuint program + GLenum binaryFormat + const void *binary + GLint length + + + + void glProgramBufferParametersIivNV + GLenum target + GLuint bindingIndex + GLuint wordIndex + GLsizei count + const GLint *params + + + void glProgramBufferParametersIuivNV + GLenum target + GLuint bindingIndex + GLuint wordIndex + GLsizei count + const GLuint *params + + + void glProgramBufferParametersfvNV + GLenum target + GLuint bindingIndex + GLuint wordIndex + GLsizei count + const GLfloat *params + + + void glProgramEnvParameter4dARB + GLenum target + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glProgramEnvParameter4dvARB + GLenum target + GLuint index + const GLdouble *params + + + void glProgramEnvParameter4fARB + GLenum target + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glProgramEnvParameter4fvARB + GLenum target + GLuint index + const GLfloat *params + + + void glProgramEnvParameterI4iNV + GLenum target + GLuint index + GLint x + GLint y + GLint z + GLint w + + + + void glProgramEnvParameterI4ivNV + GLenum target + GLuint index + const GLint *params + + + void glProgramEnvParameterI4uiNV + GLenum target + GLuint index + GLuint x + GLuint y + GLuint z + GLuint w + + + + void glProgramEnvParameterI4uivNV + GLenum target + GLuint index + const GLuint *params + + + void glProgramEnvParameters4fvEXT + GLenum target + GLuint index + GLsizei count + const GLfloat *params + + + + void glProgramEnvParametersI4ivNV + GLenum target + GLuint index + GLsizei count + const GLint *params + + + void glProgramEnvParametersI4uivNV + GLenum target + GLuint index + GLsizei count + const GLuint *params + + + void glProgramLocalParameter4dARB + GLenum target + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glProgramLocalParameter4dvARB + GLenum target + GLuint index + const GLdouble *params + + + void glProgramLocalParameter4fARB + GLenum target + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glProgramLocalParameter4fvARB + GLenum target + GLuint index + const GLfloat *params + + + void glProgramLocalParameterI4iNV + GLenum target + GLuint index + GLint x + GLint y + GLint z + GLint w + + + + void glProgramLocalParameterI4ivNV + GLenum target + GLuint index + const GLint *params + + + void glProgramLocalParameterI4uiNV + GLenum target + GLuint index + GLuint x + GLuint y + GLuint z + GLuint w + + + + void glProgramLocalParameterI4uivNV + GLenum target + GLuint index + const GLuint *params + + + void glProgramLocalParameters4fvEXT + GLenum target + GLuint index + GLsizei count + const GLfloat *params + + + + void glProgramLocalParametersI4ivNV + GLenum target + GLuint index + GLsizei count + const GLint *params + + + void glProgramLocalParametersI4uivNV + GLenum target + GLuint index + GLsizei count + const GLuint *params + + + void glProgramNamedParameter4dNV + GLuint id + GLsizei len + const GLubyte *name + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glProgramNamedParameter4dvNV + GLuint id + GLsizei len + const GLubyte *name + const GLdouble *v + + + + void glProgramNamedParameter4fNV + GLuint id + GLsizei len + const GLubyte *name + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glProgramNamedParameter4fvNV + GLuint id + GLsizei len + const GLubyte *name + const GLfloat *v + + + + void glProgramParameter4dNV + GLenum target + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glProgramParameter4dvNV + GLenum target + GLuint index + const GLdouble *v + + + + void glProgramParameter4fNV + GLenum target + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glProgramParameter4fvNV + GLenum target + GLuint index + const GLfloat *v + + + + void glProgramParameteri + GLuint program + GLenum pname + GLint value + + + void glProgramParameteriARB + GLuint program + GLenum pname + GLint value + + + + void glProgramParameteriEXT + GLuint program + GLenum pname + GLint value + + + + void glProgramParameters4dvNV + GLenum target + GLuint index + GLsizei count + const GLdouble *v + + + + void glProgramParameters4fvNV + GLenum target + GLuint index + GLsizei count + const GLfloat *v + + + + void glProgramPathFragmentInputGenNV + GLuint program + GLint location + GLenum genMode + GLint components + const GLfloat *coeffs + + + void glProgramStringARB + GLenum target + GLenum format + GLsizei len + const void *string + + + void glProgramSubroutineParametersuivNV + GLenum target + GLsizei count + const GLuint *params + + + void glProgramUniform1d + GLuint program + GLint location + GLdouble v0 + + + void glProgramUniform1dEXT + GLuint program + GLint location + GLdouble x + + + void glProgramUniform1dv + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform1dvEXT + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform1f + GLuint program + GLint location + GLfloat v0 + + + void glProgramUniform1fEXT + GLuint program + GLint location + GLfloat v0 + + + + void glProgramUniform1fv + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + void glProgramUniform1fvEXT + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + + void glProgramUniform1i + GLuint program + GLint location + GLint v0 + + + void glProgramUniform1i64ARB + GLuint program + GLint location + GLint64 x + + + void glProgramUniform1i64NV + GLuint program + GLint location + GLint64EXT x + + + void glProgramUniform1i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + + + void glProgramUniform1i64vNV + GLuint program + GLint location + GLsizei count + const GLint64EXT *value + + + void glProgramUniform1iEXT + GLuint program + GLint location + GLint v0 + + + + void glProgramUniform1iv + GLuint program + GLint location + GLsizei count + const GLint *value + + + void glProgramUniform1ivEXT + GLuint program + GLint location + GLsizei count + const GLint *value + + + + void glProgramUniform1ui + GLuint program + GLint location + GLuint v0 + + + void glProgramUniform1ui64ARB + GLuint program + GLint location + GLuint64 x + + + void glProgramUniform1ui64NV + GLuint program + GLint location + GLuint64EXT x + + + void glProgramUniform1ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + + + void glProgramUniform1ui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64EXT *value + + + void glProgramUniform1uiEXT + GLuint program + GLint location + GLuint v0 + + + + void glProgramUniform1uiv + GLuint program + GLint location + GLsizei count + const GLuint *value + + + void glProgramUniform1uivEXT + GLuint program + GLint location + GLsizei count + const GLuint *value + + + + void glProgramUniform2d + GLuint program + GLint location + GLdouble v0 + GLdouble v1 + + + void glProgramUniform2dEXT + GLuint program + GLint location + GLdouble x + GLdouble y + + + void glProgramUniform2dv + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform2dvEXT + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform2f + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + + + void glProgramUniform2fEXT + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + + + + void glProgramUniform2fv + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + void glProgramUniform2fvEXT + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + + void glProgramUniform2i + GLuint program + GLint location + GLint v0 + GLint v1 + + + void glProgramUniform2i64ARB + GLuint program + GLint location + GLint64 x + GLint64 y + + + void glProgramUniform2i64NV + GLuint program + GLint location + GLint64EXT x + GLint64EXT y + + + void glProgramUniform2i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + + + void glProgramUniform2i64vNV + GLuint program + GLint location + GLsizei count + const GLint64EXT *value + + + void glProgramUniform2iEXT + GLuint program + GLint location + GLint v0 + GLint v1 + + + + void glProgramUniform2iv + GLuint program + GLint location + GLsizei count + const GLint *value + + + void glProgramUniform2ivEXT + GLuint program + GLint location + GLsizei count + const GLint *value + + + + void glProgramUniform2ui + GLuint program + GLint location + GLuint v0 + GLuint v1 + + + void glProgramUniform2ui64ARB + GLuint program + GLint location + GLuint64 x + GLuint64 y + + + void glProgramUniform2ui64NV + GLuint program + GLint location + GLuint64EXT x + GLuint64EXT y + + + void glProgramUniform2ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + + + void glProgramUniform2ui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64EXT *value + + + void glProgramUniform2uiEXT + GLuint program + GLint location + GLuint v0 + GLuint v1 + + + + void glProgramUniform2uiv + GLuint program + GLint location + GLsizei count + const GLuint *value + + + void glProgramUniform2uivEXT + GLuint program + GLint location + GLsizei count + const GLuint *value + + + + void glProgramUniform3d + GLuint program + GLint location + GLdouble v0 + GLdouble v1 + GLdouble v2 + + + void glProgramUniform3dEXT + GLuint program + GLint location + GLdouble x + GLdouble y + GLdouble z + + + void glProgramUniform3dv + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform3dvEXT + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform3f + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + + + void glProgramUniform3fEXT + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + + + + void glProgramUniform3fv + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + void glProgramUniform3fvEXT + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + + void glProgramUniform3i + GLuint program + GLint location + GLint v0 + GLint v1 + GLint v2 + + + void glProgramUniform3i64ARB + GLuint program + GLint location + GLint64 x + GLint64 y + GLint64 z + + + void glProgramUniform3i64NV + GLuint program + GLint location + GLint64EXT x + GLint64EXT y + GLint64EXT z + + + void glProgramUniform3i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + + + void glProgramUniform3i64vNV + GLuint program + GLint location + GLsizei count + const GLint64EXT *value + + + void glProgramUniform3iEXT + GLuint program + GLint location + GLint v0 + GLint v1 + GLint v2 + + + + void glProgramUniform3iv + GLuint program + GLint location + GLsizei count + const GLint *value + + + void glProgramUniform3ivEXT + GLuint program + GLint location + GLsizei count + const GLint *value + + + + void glProgramUniform3ui + GLuint program + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + + + void glProgramUniform3ui64ARB + GLuint program + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + + + void glProgramUniform3ui64NV + GLuint program + GLint location + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + + + void glProgramUniform3ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + + + void glProgramUniform3ui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64EXT *value + + + void glProgramUniform3uiEXT + GLuint program + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + + + + void glProgramUniform3uiv + GLuint program + GLint location + GLsizei count + const GLuint *value + + + void glProgramUniform3uivEXT + GLuint program + GLint location + GLsizei count + const GLuint *value + + + + void glProgramUniform4d + GLuint program + GLint location + GLdouble v0 + GLdouble v1 + GLdouble v2 + GLdouble v3 + + + void glProgramUniform4dEXT + GLuint program + GLint location + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + void glProgramUniform4dv + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform4dvEXT + GLuint program + GLint location + GLsizei count + const GLdouble *value + + + void glProgramUniform4f + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + GLfloat v3 + + + void glProgramUniform4fEXT + GLuint program + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + GLfloat v3 + + + + void glProgramUniform4fv + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + void glProgramUniform4fvEXT + GLuint program + GLint location + GLsizei count + const GLfloat *value + + + + void glProgramUniform4i + GLuint program + GLint location + GLint v0 + GLint v1 + GLint v2 + GLint v3 + + + void glProgramUniform4i64ARB + GLuint program + GLint location + GLint64 x + GLint64 y + GLint64 z + GLint64 w + + + void glProgramUniform4i64NV + GLuint program + GLint location + GLint64EXT x + GLint64EXT y + GLint64EXT z + GLint64EXT w + + + void glProgramUniform4i64vARB + GLuint program + GLint location + GLsizei count + const GLint64 *value + + + void glProgramUniform4i64vNV + GLuint program + GLint location + GLsizei count + const GLint64EXT *value + + + void glProgramUniform4iEXT + GLuint program + GLint location + GLint v0 + GLint v1 + GLint v2 + GLint v3 + + + + void glProgramUniform4iv + GLuint program + GLint location + GLsizei count + const GLint *value + + + void glProgramUniform4ivEXT + GLuint program + GLint location + GLsizei count + const GLint *value + + + + void glProgramUniform4ui + GLuint program + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + GLuint v3 + + + void glProgramUniform4ui64ARB + GLuint program + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + GLuint64 w + + + void glProgramUniform4ui64NV + GLuint program + GLint location + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + GLuint64EXT w + + + void glProgramUniform4ui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *value + + + void glProgramUniform4ui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64EXT *value + + + void glProgramUniform4uiEXT + GLuint program + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + GLuint v3 + + + + void glProgramUniform4uiv + GLuint program + GLint location + GLsizei count + const GLuint *value + + + void glProgramUniform4uivEXT + GLuint program + GLint location + GLsizei count + const GLuint *value + + + + void glProgramUniformHandleui64ARB + GLuint program + GLint location + GLuint64 value + + + void glProgramUniformHandleui64IMG + GLuint program + GLint location + GLuint64 value + + + + void glProgramUniformHandleui64NV + GLuint program + GLint location + GLuint64 value + + + void glProgramUniformHandleui64vARB + GLuint program + GLint location + GLsizei count + const GLuint64 *values + + + void glProgramUniformHandleui64vIMG + GLuint program + GLint location + GLsizei count + const GLuint64 *values + + + + void glProgramUniformHandleui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64 *values + + + void glProgramUniformMatrix2dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix2fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix2x3dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2x3dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2x3fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix2x3fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix2x4dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2x4dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix2x4fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix2x4fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix3dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix3fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix3x2dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3x2dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3x2fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix3x2fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix3x4dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3x4dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix3x4fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix3x4fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix4dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix4fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix4x2dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4x2dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4x2fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix4x2fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformMatrix4x3dv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4x3dvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glProgramUniformMatrix4x3fv + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glProgramUniformMatrix4x3fvEXT + GLuint program + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glProgramUniformui64NV + GLuint program + GLint location + GLuint64EXT value + + + void glProgramUniformui64vNV + GLuint program + GLint location + GLsizei count + const GLuint64EXT *value + + + void glProgramVertexLimitNV + GLenum target + GLint limit + + + void glProvokingVertex + GLenum mode + + + void glProvokingVertexEXT + GLenum mode + + + + void glPushAttrib + GLbitfield mask + + + + void glPushClientAttrib + GLbitfield mask + + + void glPushClientAttribDefaultEXT + GLbitfield mask + + + void glPushDebugGroup + GLenum source + GLuint id + GLsizei length + const GLchar *message + + + void glPushDebugGroupKHR + GLenum source + GLuint id + GLsizei length + const GLchar *message + + + + void glPushGroupMarkerEXT + GLsizei length + const GLchar *marker + + + void glPushMatrix + + + + void glPushName + GLuint name + + + + void glQueryCounter + GLuint id + GLenum target + + + void glQueryCounterEXT + GLuint id + GLenum target + + + + GLbitfield glQueryMatrixxOES + GLfixed *mantissa + GLint *exponent + + + void glQueryObjectParameteruiAMD + GLenum target + GLuint id + GLenum pname + GLuint param + + + GLint glQueryResourceNV + GLenum queryType + GLint tagId + GLuint count + GLint *buffer + + + void glQueryResourceTagNV + GLint tagId + const GLchar *tagString + + + void glRasterPos2d + GLdouble x + GLdouble y + + + + void glRasterPos2dv + const GLdouble *v + + + + void glRasterPos2f + GLfloat x + GLfloat y + + + + void glRasterPos2fv + const GLfloat *v + + + + void glRasterPos2i + GLint x + GLint y + + + + void glRasterPos2iv + const GLint *v + + + + void glRasterPos2s + GLshort x + GLshort y + + + + void glRasterPos2sv + const GLshort *v + + + + void glRasterPos2xOES + GLfixed x + GLfixed y + + + void glRasterPos2xvOES + const GLfixed *coords + + + void glRasterPos3d + GLdouble x + GLdouble y + GLdouble z + + + + void glRasterPos3dv + const GLdouble *v + + + + void glRasterPos3f + GLfloat x + GLfloat y + GLfloat z + + + + void glRasterPos3fv + const GLfloat *v + + + + void glRasterPos3i + GLint x + GLint y + GLint z + + + + void glRasterPos3iv + const GLint *v + + + + void glRasterPos3s + GLshort x + GLshort y + GLshort z + + + + void glRasterPos3sv + const GLshort *v + + + + void glRasterPos3xOES + GLfixed x + GLfixed y + GLfixed z + + + void glRasterPos3xvOES + const GLfixed *coords + + + void glRasterPos4d + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glRasterPos4dv + const GLdouble *v + + + + void glRasterPos4f + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glRasterPos4fv + const GLfloat *v + + + + void glRasterPos4i + GLint x + GLint y + GLint z + GLint w + + + + void glRasterPos4iv + const GLint *v + + + + void glRasterPos4s + GLshort x + GLshort y + GLshort z + GLshort w + + + + void glRasterPos4sv + const GLshort *v + + + + void glRasterPos4xOES + GLfixed x + GLfixed y + GLfixed z + GLfixed w + + + void glRasterPos4xvOES + const GLfixed *coords + + + void glRasterSamplesEXT + GLuint samples + GLboolean fixedsamplelocations + + + void glReadBuffer + GLenum src + + + + void glReadBufferIndexedEXT + GLenum src + GLint index + + + void glReadBufferNV + GLenum mode + + + void glReadInstrumentsSGIX + GLint marker + + + + void glReadPixels + GLint x + GLint y + GLsizei width + GLsizei height + GLenum format + GLenum type + void *pixels + + + + + void glReadnPixels + GLint x + GLint y + GLsizei width + GLsizei height + GLenum format + GLenum type + GLsizei bufSize + void *data + + + void glReadnPixelsARB + GLint x + GLint y + GLsizei width + GLsizei height + GLenum format + GLenum type + GLsizei bufSize + void *data + + + + void glReadnPixelsEXT + GLint x + GLint y + GLsizei width + GLsizei height + GLenum format + GLenum type + GLsizei bufSize + void *data + + + + void glReadnPixelsKHR + GLint x + GLint y + GLsizei width + GLsizei height + GLenum format + GLenum type + GLsizei bufSize + void *data + + + + GLboolean glReleaseKeyedMutexWin32EXT + GLuint memory + GLuint64 key + + + void glRectd + GLdouble x1 + GLdouble y1 + GLdouble x2 + GLdouble y2 + + + + void glRectdv + const GLdouble *v1 + const GLdouble *v2 + + + + void glRectf + GLfloat x1 + GLfloat y1 + GLfloat x2 + GLfloat y2 + + + + void glRectfv + const GLfloat *v1 + const GLfloat *v2 + + + + void glRecti + GLint x1 + GLint y1 + GLint x2 + GLint y2 + + + + void glRectiv + const GLint *v1 + const GLint *v2 + + + + void glRects + GLshort x1 + GLshort y1 + GLshort x2 + GLshort y2 + + + + void glRectsv + const GLshort *v1 + const GLshort *v2 + + + + void glRectxOES + GLfixed x1 + GLfixed y1 + GLfixed x2 + GLfixed y2 + + + void glRectxvOES + const GLfixed *v1 + const GLfixed *v2 + + + void glReferencePlaneSGIX + const GLdouble *equation + + + + void* glReleaseClientPointerRangeMESA + GLbitfield flags + GLsizeiptr *size + + + void glReleaseShaderCompiler + + + void glRenderGpuMaskNV + GLbitfield mask + + + GLint glRenderMode + GLenum mode + + + + void glRenderbufferStorage + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + + + + void glRenderbufferStorageEXT + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + + + + + void glRenderbufferStorageMultisample + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + + void glRenderbufferStorageMultisampleANGLE + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + void glRenderbufferStorageMultisampleAPPLE + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + void glRenderbufferStorageMultisampleAdvancedAMD + GLenum target + GLsizei samples + GLsizei storageSamples + GLenum internalformat + GLsizei width + GLsizei height + + + void glRenderbufferStorageMultisampleCoverageNV + GLenum target + GLsizei coverageSamples + GLsizei colorSamples + GLenum internalformat + GLsizei width + GLsizei height + + + void glRenderbufferStorageMultisampleEXT + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + + + void glRenderbufferStorageMultisampleIMG + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + void glRenderbufferStorageMultisampleNV + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + + + + void glRenderbufferStorageOES + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + + + void glReplacementCodePointerSUN + GLenum type + GLsizei stride + const void **pointer + + + void glReplacementCodeubSUN + GLubyte code + + + void glReplacementCodeubvSUN + const GLubyte *code + + + void glReplacementCodeuiColor3fVertex3fSUN + GLuint rc + GLfloat r + GLfloat g + GLfloat b + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiColor3fVertex3fvSUN + const GLuint *rc + const GLfloat *c + const GLfloat *v + + + void glReplacementCodeuiColor4fNormal3fVertex3fSUN + GLuint rc + GLfloat r + GLfloat g + GLfloat b + GLfloat a + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiColor4fNormal3fVertex3fvSUN + const GLuint *rc + const GLfloat *c + const GLfloat *n + const GLfloat *v + + + void glReplacementCodeuiColor4ubVertex3fSUN + GLuint rc + GLubyte r + GLubyte g + GLubyte b + GLubyte a + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiColor4ubVertex3fvSUN + const GLuint *rc + const GLubyte *c + const GLfloat *v + + + void glReplacementCodeuiNormal3fVertex3fSUN + GLuint rc + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiNormal3fVertex3fvSUN + const GLuint *rc + const GLfloat *n + const GLfloat *v + + + void glReplacementCodeuiSUN + GLuint code + + + void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN + GLuint rc + GLfloat s + GLfloat t + GLfloat r + GLfloat g + GLfloat b + GLfloat a + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN + const GLuint *rc + const GLfloat *tc + const GLfloat *c + const GLfloat *n + const GLfloat *v + + + void glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN + GLuint rc + GLfloat s + GLfloat t + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN + const GLuint *rc + const GLfloat *tc + const GLfloat *n + const GLfloat *v + + + void glReplacementCodeuiTexCoord2fVertex3fSUN + GLuint rc + GLfloat s + GLfloat t + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiTexCoord2fVertex3fvSUN + const GLuint *rc + const GLfloat *tc + const GLfloat *v + + + void glReplacementCodeuiVertex3fSUN + GLuint rc + GLfloat x + GLfloat y + GLfloat z + + + void glReplacementCodeuiVertex3fvSUN + const GLuint *rc + const GLfloat *v + + + void glReplacementCodeuivSUN + const GLuint *code + + + void glReplacementCodeusSUN + GLushort code + + + void glReplacementCodeusvSUN + const GLushort *code + + + void glRequestResidentProgramsNV + GLsizei n + const GLuint *programs + + + + void glResetHistogram + GLenum target + + + + void glResetHistogramEXT + GLenum target + + + + + void glResetMemoryObjectParameterNV + GLuint memory + GLenum pname + + + void glResetMinmax + GLenum target + + + + void glResetMinmaxEXT + GLenum target + + + + + void glResizeBuffersMESA + + + void glResolveDepthValuesNV + + + void glResolveMultisampleFramebufferAPPLE + + + void glResumeTransformFeedback + + + void glResumeTransformFeedbackNV + + + + void glRotated + GLdouble angle + GLdouble x + GLdouble y + GLdouble z + + + + void glRotatef + GLfloat angle + GLfloat x + GLfloat y + GLfloat z + + + + void glRotatex + GLfixed angle + GLfixed x + GLfixed y + GLfixed z + + + void glRotatexOES + GLfixed angle + GLfixed x + GLfixed y + GLfixed z + + + void glSampleCoverage + GLfloat value + GLboolean invert + + + + void glSampleCoverageARB + GLfloat value + GLboolean invert + + + + void glSampleCoveragex + GLclampx value + GLboolean invert + + + void glSampleCoveragexOES + GLclampx value + GLboolean invert + + + void glSampleMapATI + GLuint dst + GLuint interp + GLenum swizzle + + + void glSampleMaskEXT + GLclampf value + GLboolean invert + + + void glSampleMaskIndexedNV + GLuint index + GLbitfield mask + + + void glSampleMaskSGIS + GLclampf value + GLboolean invert + + + + + void glSampleMaski + GLuint maskNumber + GLbitfield mask + + + void glSamplePatternEXT + GLenum pattern + + + void glSamplePatternSGIS + GLenum pattern + + + + + void glSamplerParameterIiv + GLuint sampler + GLenum pname + const GLint *param + + + void glSamplerParameterIivEXT + GLuint sampler + GLenum pname + const GLint *param + + + + void glSamplerParameterIivOES + GLuint sampler + GLenum pname + const GLint *param + + + + void glSamplerParameterIuiv + GLuint sampler + GLenum pname + const GLuint *param + + + void glSamplerParameterIuivEXT + GLuint sampler + GLenum pname + const GLuint *param + + + + void glSamplerParameterIuivOES + GLuint sampler + GLenum pname + const GLuint *param + + + + void glSamplerParameterf + GLuint sampler + GLenum pname + GLfloat param + + + void glSamplerParameterfv + GLuint sampler + GLenum pname + const GLfloat *param + + + void glSamplerParameteri + GLuint sampler + GLenum pname + GLint param + + + void glSamplerParameteriv + GLuint sampler + GLenum pname + const GLint *param + + + void glScaled + GLdouble x + GLdouble y + GLdouble z + + + + void glScalef + GLfloat x + GLfloat y + GLfloat z + + + + void glScalex + GLfixed x + GLfixed y + GLfixed z + + + void glScalexOES + GLfixed x + GLfixed y + GLfixed z + + + void glScissor + GLint x + GLint y + GLsizei width + GLsizei height + + + + void glScissorArrayv + GLuint first + GLsizei count + const GLint *v + + + void glScissorArrayvNV + GLuint first + GLsizei count + const GLint *v + + + + void glScissorArrayvOES + GLuint first + GLsizei count + const GLint *v + + + + void glScissorExclusiveArrayvNV + GLuint first + GLsizei count + const GLint *v + + + void glScissorExclusiveNV + GLint x + GLint y + GLsizei width + GLsizei height + + + void glScissorIndexed + GLuint index + GLint left + GLint bottom + GLsizei width + GLsizei height + + + void glScissorIndexedNV + GLuint index + GLint left + GLint bottom + GLsizei width + GLsizei height + + + + void glScissorIndexedOES + GLuint index + GLint left + GLint bottom + GLsizei width + GLsizei height + + + + void glScissorIndexedv + GLuint index + const GLint *v + + + void glScissorIndexedvNV + GLuint index + const GLint *v + + + + void glScissorIndexedvOES + GLuint index + const GLint *v + + + + void glSecondaryColor3b + GLbyte red + GLbyte green + GLbyte blue + + + + void glSecondaryColor3bEXT + GLbyte red + GLbyte green + GLbyte blue + + + + + void glSecondaryColor3bv + const GLbyte *v + + + + void glSecondaryColor3bvEXT + const GLbyte *v + + + + + void glSecondaryColor3d + GLdouble red + GLdouble green + GLdouble blue + + + + void glSecondaryColor3dEXT + GLdouble red + GLdouble green + GLdouble blue + + + + + void glSecondaryColor3dv + const GLdouble *v + + + + void glSecondaryColor3dvEXT + const GLdouble *v + + + + + void glSecondaryColor3f + GLfloat red + GLfloat green + GLfloat blue + + + + void glSecondaryColor3fEXT + GLfloat red + GLfloat green + GLfloat blue + + + + + void glSecondaryColor3fv + const GLfloat *v + + + + void glSecondaryColor3fvEXT + const GLfloat *v + + + + + void glSecondaryColor3hNV + GLhalfNV red + GLhalfNV green + GLhalfNV blue + + + + void glSecondaryColor3hvNV + const GLhalfNV *v + + + + void glSecondaryColor3i + GLint red + GLint green + GLint blue + + + + void glSecondaryColor3iEXT + GLint red + GLint green + GLint blue + + + + + void glSecondaryColor3iv + const GLint *v + + + + void glSecondaryColor3ivEXT + const GLint *v + + + + + void glSecondaryColor3s + GLshort red + GLshort green + GLshort blue + + + + void glSecondaryColor3sEXT + GLshort red + GLshort green + GLshort blue + + + + + void glSecondaryColor3sv + const GLshort *v + + + + void glSecondaryColor3svEXT + const GLshort *v + + + + + void glSecondaryColor3ub + GLubyte red + GLubyte green + GLubyte blue + + + + void glSecondaryColor3ubEXT + GLubyte red + GLubyte green + GLubyte blue + + + + + void glSecondaryColor3ubv + const GLubyte *v + + + + void glSecondaryColor3ubvEXT + const GLubyte *v + + + + + void glSecondaryColor3ui + GLuint red + GLuint green + GLuint blue + + + + void glSecondaryColor3uiEXT + GLuint red + GLuint green + GLuint blue + + + + + void glSecondaryColor3uiv + const GLuint *v + + + + void glSecondaryColor3uivEXT + const GLuint *v + + + + + void glSecondaryColor3us + GLushort red + GLushort green + GLushort blue + + + + void glSecondaryColor3usEXT + GLushort red + GLushort green + GLushort blue + + + + + void glSecondaryColor3usv + const GLushort *v + + + + void glSecondaryColor3usvEXT + const GLushort *v + + + + + void glSecondaryColorFormatNV + GLint size + GLenum type + GLsizei stride + + + void glSecondaryColorP3ui + GLenum type + GLuint color + + + void glSecondaryColorP3uiv + GLenum type + const GLuint *color + + + void glSecondaryColorPointer + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glSecondaryColorPointerEXT + GLint size + GLenum type + GLsizei stride + const void *pointer + + + + void glSecondaryColorPointerListIBM + GLint size + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glSelectBuffer + GLsizei size + GLuint *buffer + + + + void glSelectPerfMonitorCountersAMD + GLuint monitor + GLboolean enable + GLuint group + GLint numCounters + GLuint *counterList + + + void glSemaphoreParameterivNV + GLuint semaphore + GLenum pname + const GLint *params + + + void glSemaphoreParameterui64vEXT + GLuint semaphore + GLenum pname + const GLuint64 *params + + + void glSeparableFilter2D + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *row + const void *column + + + + + void glSeparableFilter2DEXT + GLenum target + GLenum internalformat + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *row + const void *column + + + + + void glSetFenceAPPLE + GLuint fence + + + void glSetFenceNV + GLuint fence + GLenum condition + + + void glSetFragmentShaderConstantATI + GLuint dst + const GLfloat *value + + + void glSetInvariantEXT + GLuint id + GLenum type + const void *addr + + + void glSetLocalConstantEXT + GLuint id + GLenum type + const void *addr + + + void glSetMultisamplefvAMD + GLenum pname + GLuint index + const GLfloat *val + + + void glShadeModel + GLenum mode + + + + void glShaderBinary + GLsizei count + const GLuint *shaders + GLenum binaryFormat + const void *binary + GLsizei length + + + void glShaderOp1EXT + GLenum op + GLuint res + GLuint arg1 + + + void glShaderOp2EXT + GLenum op + GLuint res + GLuint arg1 + GLuint arg2 + + + void glShaderOp3EXT + GLenum op + GLuint res + GLuint arg1 + GLuint arg2 + GLuint arg3 + + + void glShaderSource + GLuint shader + GLsizei count + const GLchar *const*string + const GLint *length + + + void glShaderSourceARB + GLhandleARB shaderObj + GLsizei count + const GLcharARB **string + const GLint *length + + + + void glShaderStorageBlockBinding + GLuint program + GLuint storageBlockIndex + GLuint storageBlockBinding + + + void glShadingRateEXT + GLenum rate + + + void glShadingRateCombinerOpsEXT + GLenum combinerOp0 + GLenum combinerOp1 + + + void glShadingRateImageBarrierNV + GLboolean synchronize + + + void glShadingRateQCOM + GLenum rate + + + void glShadingRateImagePaletteNV + GLuint viewport + GLuint first + GLsizei count + const GLenum *rates + + + void glShadingRateSampleOrderNV + GLenum order + + + void glShadingRateSampleOrderCustomNV + GLenum rate + GLuint samples + const GLint *locations + + + void glSharpenTexFuncSGIS + GLenum target + GLsizei n + const GLfloat *points + + + + void glSignalSemaphoreEXT + GLuint semaphore + GLuint numBufferBarriers + const GLuint *buffers + GLuint numTextureBarriers + const GLuint *textures + const GLenum *dstLayouts + + + void glSignalSemaphoreui64NVX + GLuint signalGpu + GLsizei fenceObjectCount + const GLuint *semaphoreArray + const GLuint64 *fenceValueArray + + + void glSpecializeShader + GLuint shader + const GLchar *pEntryPoint + GLuint numSpecializationConstants + const GLuint *pConstantIndex + const GLuint *pConstantValue + + + void glSpecializeShaderARB + GLuint shader + const GLchar *pEntryPoint + GLuint numSpecializationConstants + const GLuint *pConstantIndex + const GLuint *pConstantValue + + + + void glSpriteParameterfSGIX + GLenum pname + GLfloat param + + + + void glSpriteParameterfvSGIX + GLenum pname + const GLfloat *params + + + + void glSpriteParameteriSGIX + GLenum pname + GLint param + + + + void glSpriteParameterivSGIX + GLenum pname + const GLint *params + + + + void glStartInstrumentsSGIX + + + + void glStartTilingQCOM + GLuint x + GLuint y + GLuint width + GLuint height + GLbitfield preserveMask + + + void glStateCaptureNV + GLuint state + GLenum mode + + + void glStencilClearTagEXT + GLsizei stencilTagBits + GLuint stencilClearTag + + + + void glStencilFillPathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLenum fillMode + GLuint mask + GLenum transformType + const GLfloat *transformValues + + + void glStencilFillPathNV + GLuint path + GLenum fillMode + GLuint mask + + + void glStencilFunc + GLenum func + GLint ref + GLuint mask + + + + void glStencilFuncSeparate + GLenum face + GLenum func + GLint ref + GLuint mask + + + void glStencilFuncSeparateATI + GLenum frontfunc + GLenum backfunc + GLint ref + GLuint mask + + + void glStencilMask + GLuint mask + + + + void glStencilMaskSeparate + GLenum face + GLuint mask + + + void glStencilOp + GLenum fail + GLenum zfail + GLenum zpass + + + + void glStencilOpSeparate + GLenum face + GLenum sfail + GLenum dpfail + GLenum dppass + + + void glStencilOpSeparateATI + GLenum face + GLenum sfail + GLenum dpfail + GLenum dppass + + + + void glStencilOpValueAMD + GLenum face + GLuint value + + + void glStencilStrokePathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLint reference + GLuint mask + GLenum transformType + const GLfloat *transformValues + + + void glStencilStrokePathNV + GLuint path + GLint reference + GLuint mask + + + void glStencilThenCoverFillPathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLenum fillMode + GLuint mask + GLenum coverMode + GLenum transformType + const GLfloat *transformValues + + + void glStencilThenCoverFillPathNV + GLuint path + GLenum fillMode + GLuint mask + GLenum coverMode + + + void glStencilThenCoverStrokePathInstancedNV + GLsizei numPaths + GLenum pathNameType + const void *paths + GLuint pathBase + GLint reference + GLuint mask + GLenum coverMode + GLenum transformType + const GLfloat *transformValues + + + void glStencilThenCoverStrokePathNV + GLuint path + GLint reference + GLuint mask + GLenum coverMode + + + void glStopInstrumentsSGIX + GLint marker + + + + void glStringMarkerGREMEDY + GLsizei len + const void *string + + + void glSubpixelPrecisionBiasNV + GLuint xbits + GLuint ybits + + + void glSwizzleEXT + GLuint res + GLuint in + GLenum outX + GLenum outY + GLenum outZ + GLenum outW + + + void glSyncTextureINTEL + GLuint texture + + + void glTagSampleBufferSGIX + + + + void glTangent3bEXT + GLbyte tx + GLbyte ty + GLbyte tz + + + + void glTangent3bvEXT + const GLbyte *v + + + void glTangent3dEXT + GLdouble tx + GLdouble ty + GLdouble tz + + + + void glTangent3dvEXT + const GLdouble *v + + + void glTangent3fEXT + GLfloat tx + GLfloat ty + GLfloat tz + + + + void glTangent3fvEXT + const GLfloat *v + + + void glTangent3iEXT + GLint tx + GLint ty + GLint tz + + + + void glTangent3ivEXT + const GLint *v + + + void glTangent3sEXT + GLshort tx + GLshort ty + GLshort tz + + + + void glTangent3svEXT + const GLshort *v + + + void glTangentPointerEXT + GLenum type + GLsizei stride + const void *pointer + + + void glTbufferMask3DFX + GLuint mask + + + void glTessellationFactorAMD + GLfloat factor + + + void glTessellationModeAMD + GLenum mode + + + GLboolean glTestFenceAPPLE + GLuint fence + + + GLboolean glTestFenceNV + GLuint fence + + + + GLboolean glTestObjectAPPLE + GLenum object + GLuint name + + + void glTexAttachMemoryNV + GLenum target + GLuint memory + GLuint64 offset + + + void glTexBuffer + GLenum target + GLenum internalformat + GLuint buffer + + + void glTexBufferARB + GLenum target + GLenum internalformat + GLuint buffer + + + + + void glTexBufferEXT + GLenum target + GLenum internalformat + GLuint buffer + + + + void glTexBufferOES + GLenum target + GLenum internalformat + GLuint buffer + + + + void glTexBufferRange + GLenum target + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + + void glTexBufferRangeEXT + GLenum target + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + + + void glTexBufferRangeOES + GLenum target + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + + + void glTexBumpParameterfvATI + GLenum pname + const GLfloat *param + + + void glTexBumpParameterivATI + GLenum pname + const GLint *param + + + void glTexCoord1bOES + GLbyte s + + + void glTexCoord1bvOES + const GLbyte *coords + + + void glTexCoord1d + GLdouble s + + + + void glTexCoord1dv + const GLdouble *v + + + + void glTexCoord1f + GLfloat s + + + + void glTexCoord1fv + const GLfloat *v + + + + void glTexCoord1hNV + GLhalfNV s + + + + void glTexCoord1hvNV + const GLhalfNV *v + + + + void glTexCoord1i + GLint s + + + + void glTexCoord1iv + const GLint *v + + + + void glTexCoord1s + GLshort s + + + + void glTexCoord1sv + const GLshort *v + + + + void glTexCoord1xOES + GLfixed s + + + void glTexCoord1xvOES + const GLfixed *coords + + + void glTexCoord2bOES + GLbyte s + GLbyte t + + + void glTexCoord2bvOES + const GLbyte *coords + + + void glTexCoord2d + GLdouble s + GLdouble t + + + + void glTexCoord2dv + const GLdouble *v + + + + void glTexCoord2f + GLfloat s + GLfloat t + + + + void glTexCoord2fColor3fVertex3fSUN + GLfloat s + GLfloat t + GLfloat r + GLfloat g + GLfloat b + GLfloat x + GLfloat y + GLfloat z + + + void glTexCoord2fColor3fVertex3fvSUN + const GLfloat *tc + const GLfloat *c + const GLfloat *v + + + void glTexCoord2fColor4fNormal3fVertex3fSUN + GLfloat s + GLfloat t + GLfloat r + GLfloat g + GLfloat b + GLfloat a + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glTexCoord2fColor4fNormal3fVertex3fvSUN + const GLfloat *tc + const GLfloat *c + const GLfloat *n + const GLfloat *v + + + void glTexCoord2fColor4ubVertex3fSUN + GLfloat s + GLfloat t + GLubyte r + GLubyte g + GLubyte b + GLubyte a + GLfloat x + GLfloat y + GLfloat z + + + void glTexCoord2fColor4ubVertex3fvSUN + const GLfloat *tc + const GLubyte *c + const GLfloat *v + + + void glTexCoord2fNormal3fVertex3fSUN + GLfloat s + GLfloat t + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + + + void glTexCoord2fNormal3fVertex3fvSUN + const GLfloat *tc + const GLfloat *n + const GLfloat *v + + + void glTexCoord2fVertex3fSUN + GLfloat s + GLfloat t + GLfloat x + GLfloat y + GLfloat z + + + void glTexCoord2fVertex3fvSUN + const GLfloat *tc + const GLfloat *v + + + void glTexCoord2fv + const GLfloat *v + + + + void glTexCoord2hNV + GLhalfNV s + GLhalfNV t + + + + void glTexCoord2hvNV + const GLhalfNV *v + + + + void glTexCoord2i + GLint s + GLint t + + + + void glTexCoord2iv + const GLint *v + + + + void glTexCoord2s + GLshort s + GLshort t + + + + void glTexCoord2sv + const GLshort *v + + + + void glTexCoord2xOES + GLfixed s + GLfixed t + + + void glTexCoord2xvOES + const GLfixed *coords + + + void glTexCoord3bOES + GLbyte s + GLbyte t + GLbyte r + + + void glTexCoord3bvOES + const GLbyte *coords + + + void glTexCoord3d + GLdouble s + GLdouble t + GLdouble r + + + + void glTexCoord3dv + const GLdouble *v + + + + void glTexCoord3f + GLfloat s + GLfloat t + GLfloat r + + + + void glTexCoord3fv + const GLfloat *v + + + + void glTexCoord3hNV + GLhalfNV s + GLhalfNV t + GLhalfNV r + + + + void glTexCoord3hvNV + const GLhalfNV *v + + + + void glTexCoord3i + GLint s + GLint t + GLint r + + + + void glTexCoord3iv + const GLint *v + + + + void glTexCoord3s + GLshort s + GLshort t + GLshort r + + + + void glTexCoord3sv + const GLshort *v + + + + void glTexCoord3xOES + GLfixed s + GLfixed t + GLfixed r + + + void glTexCoord3xvOES + const GLfixed *coords + + + void glTexCoord4bOES + GLbyte s + GLbyte t + GLbyte r + GLbyte q + + + void glTexCoord4bvOES + const GLbyte *coords + + + void glTexCoord4d + GLdouble s + GLdouble t + GLdouble r + GLdouble q + + + + void glTexCoord4dv + const GLdouble *v + + + + void glTexCoord4f + GLfloat s + GLfloat t + GLfloat r + GLfloat q + + + + void glTexCoord4fColor4fNormal3fVertex4fSUN + GLfloat s + GLfloat t + GLfloat p + GLfloat q + GLfloat r + GLfloat g + GLfloat b + GLfloat a + GLfloat nx + GLfloat ny + GLfloat nz + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + void glTexCoord4fColor4fNormal3fVertex4fvSUN + const GLfloat *tc + const GLfloat *c + const GLfloat *n + const GLfloat *v + + + void glTexCoord4fVertex4fSUN + GLfloat s + GLfloat t + GLfloat p + GLfloat q + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + void glTexCoord4fVertex4fvSUN + const GLfloat *tc + const GLfloat *v + + + void glTexCoord4fv + const GLfloat *v + + + + void glTexCoord4hNV + GLhalfNV s + GLhalfNV t + GLhalfNV r + GLhalfNV q + + + + void glTexCoord4hvNV + const GLhalfNV *v + + + + void glTexCoord4i + GLint s + GLint t + GLint r + GLint q + + + + void glTexCoord4iv + const GLint *v + + + + void glTexCoord4s + GLshort s + GLshort t + GLshort r + GLshort q + + + + void glTexCoord4sv + const GLshort *v + + + + void glTexCoord4xOES + GLfixed s + GLfixed t + GLfixed r + GLfixed q + + + void glTexCoord4xvOES + const GLfixed *coords + + + void glTexCoordFormatNV + GLint size + GLenum type + GLsizei stride + + + void glTexCoordP1ui + GLenum type + GLuint coords + + + void glTexCoordP1uiv + GLenum type + const GLuint *coords + + + void glTexCoordP2ui + GLenum type + GLuint coords + + + void glTexCoordP2uiv + GLenum type + const GLuint *coords + + + void glTexCoordP3ui + GLenum type + GLuint coords + + + void glTexCoordP3uiv + GLenum type + const GLuint *coords + + + void glTexCoordP4ui + GLenum type + GLuint coords + + + void glTexCoordP4uiv + GLenum type + const GLuint *coords + + + void glTexCoordPointer + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glTexCoordPointerEXT + GLint size + GLenum type + GLsizei stride + GLsizei count + const void *pointer + + + void glTexCoordPointerListIBM + GLint size + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glTexCoordPointervINTEL + GLint size + GLenum type + const void **pointer + + + void glTexEnvf + GLenum target + GLenum pname + GLfloat param + + + + void glTexEnvfv + GLenum target + GLenum pname + const GLfloat *params + + + + void glTexEnvi + GLenum target + GLenum pname + GLint param + + + + void glTexEnviv + GLenum target + GLenum pname + const GLint *params + + + + void glTexEnvx + GLenum target + GLenum pname + GLfixed param + + + void glTexEnvxOES + GLenum target + GLenum pname + GLfixed param + + + void glTexEnvxv + GLenum target + GLenum pname + const GLfixed *params + + + void glTexEnvxvOES + GLenum target + GLenum pname + const GLfixed *params + + + void glTexEstimateMotionQCOM + GLuint ref + GLuint target + GLuint output + + + void glTexEstimateMotionRegionsQCOM + GLuint ref + GLuint target + GLuint output + GLuint mask + + + void glExtrapolateTex2DQCOM + GLuint src1 + GLuint src2 + GLuint output + GLfloat scaleFactor + + + void glTexFilterFuncSGIS + GLenum target + GLenum filter + GLsizei n + const GLfloat *weights + + + + void glTexGend + GLenum coord + GLenum pname + GLdouble param + + + + void glTexGendv + GLenum coord + GLenum pname + const GLdouble *params + + + + void glTexGenf + GLenum coord + GLenum pname + GLfloat param + + + + void glTexGenfOES + GLenum coord + GLenum pname + GLfloat param + + + void glTexGenfv + GLenum coord + GLenum pname + const GLfloat *params + + + + void glTexGenfvOES + GLenum coord + GLenum pname + const GLfloat *params + + + void glTexGeni + GLenum coord + GLenum pname + GLint param + + + + void glTexGeniOES + GLenum coord + GLenum pname + GLint param + + + void glTexGeniv + GLenum coord + GLenum pname + const GLint *params + + + + void glTexGenivOES + GLenum coord + GLenum pname + const GLint *params + + + void glTexGenxOES + GLenum coord + GLenum pname + GLfixed param + + + void glTexGenxvOES + GLenum coord + GLenum pname + const GLfixed *params + + + void glTexImage1D + GLenum target + GLint level + GLint internalformat + GLsizei width + GLint border + GLenum format + GLenum type + const void *pixels + + + + + void glTexImage2D + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLint border + GLenum format + GLenum type + const void *pixels + + + + + void glTexImage2DMultisample + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLboolean fixedsamplelocations + + + void glTexImage2DMultisampleCoverageNV + GLenum target + GLsizei coverageSamples + GLsizei colorSamples + GLint internalFormat + GLsizei width + GLsizei height + GLboolean fixedSampleLocations + + + void glTexImage3D + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLenum format + GLenum type + const void *pixels + + + + + void glTexImage3DEXT + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLenum format + GLenum type + const void *pixels + + + + + void glTexImage3DMultisample + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedsamplelocations + + + void glTexImage3DMultisampleCoverageNV + GLenum target + GLsizei coverageSamples + GLsizei colorSamples + GLint internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedSampleLocations + + + void glTexImage3DOES + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLenum format + GLenum type + const void *pixels + + + void glTexImage4DSGIS + GLenum target + GLint level + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLsizei size4d + GLint border + GLenum format + GLenum type + const void *pixels + + + + void glTexPageCommitmentARB + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLboolean commit + + + void glTexPageCommitmentEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLboolean commit + + + + void glTexPageCommitmentMemNV + GLenum target + GLint layer + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLuint memory + GLuint64 offset + GLboolean commit + + + void glTexParameterIiv + GLenum target + GLenum pname + const GLint *params + + + + void glTexParameterIivEXT + GLenum target + GLenum pname + const GLint *params + + + + void glTexParameterIivOES + GLenum target + GLenum pname + const GLint *params + + + + void glTexParameterIuiv + GLenum target + GLenum pname + const GLuint *params + + + + void glTexParameterIuivEXT + GLenum target + GLenum pname + const GLuint *params + + + + void glTexParameterIuivOES + GLenum target + GLenum pname + const GLuint *params + + + + void glTexParameterf + GLenum target + GLenum pname + GLfloat param + + + + void glTexParameterfv + GLenum target + GLenum pname + const GLfloat *params + + + + void glTexParameteri + GLenum target + GLenum pname + GLint param + + + + void glTexParameteriv + GLenum target + GLenum pname + const GLint *params + + + + void glTexParameterx + GLenum target + GLenum pname + GLfixed param + + + void glTexParameterxOES + GLenum target + GLenum pname + GLfixed param + + + void glTexParameterxv + GLenum target + GLenum pname + const GLfixed *params + + + void glTexParameterxvOES + GLenum target + GLenum pname + const GLfixed *params + + + void glTexRenderbufferNV + GLenum target + GLuint renderbuffer + + + void glTexStorage1D + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + + + void glTexStorage1DEXT + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + + + + void glTexStorage2D + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + + + void glTexStorage2DEXT + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + + + + void glTexStorage2DMultisample + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLboolean fixedsamplelocations + + + void glTexStorage3D + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + + + void glTexStorage3DEXT + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + + + + void glTexStorage3DMultisample + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedsamplelocations + + + void glTexStorage3DMultisampleOES + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedsamplelocations + + + + void glTexStorageAttribs2DEXT + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + const GLint* attrib_list + + + void glTexStorageAttribs3DEXT + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + const GLint* attrib_list + + + void glTexStorageMem1DEXT + GLenum target + GLsizei levels + GLenum internalFormat + GLsizei width + GLuint memory + GLuint64 offset + + + void glTexStorageMem2DEXT + GLenum target + GLsizei levels + GLenum internalFormat + GLsizei width + GLsizei height + GLuint memory + GLuint64 offset + + + void glTexStorageMem2DMultisampleEXT + GLenum target + GLsizei samples + GLenum internalFormat + GLsizei width + GLsizei height + GLboolean fixedSampleLocations + GLuint memory + GLuint64 offset + + + void glTexStorageMem3DEXT + GLenum target + GLsizei levels + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLuint memory + GLuint64 offset + + + void glTexStorageMem3DMultisampleEXT + GLenum target + GLsizei samples + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedSampleLocations + GLuint memory + GLuint64 offset + + + void glTexStorageSparseAMD + GLenum target + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLsizei layers + GLbitfield flags + + + void glTexSubImage1D + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage1DEXT + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage2D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage2DEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage3D + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage3DEXT + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + + + void glTexSubImage3DOES + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + void glTexSubImage4DSGIS + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLint woffset + GLsizei width + GLsizei height + GLsizei depth + GLsizei size4d + GLenum format + GLenum type + const void *pixels + + + + void glTextureAttachMemoryNV + GLuint texture + GLuint memory + GLuint64 offset + + + void glTextureBarrier + + + void glTextureBarrierNV + + + + void glTextureBuffer + GLuint texture + GLenum internalformat + GLuint buffer + + + void glTextureBufferEXT + GLuint texture + GLenum target + GLenum internalformat + GLuint buffer + + + void glTextureBufferRange + GLuint texture + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + + void glTextureBufferRangeEXT + GLuint texture + GLenum target + GLenum internalformat + GLuint buffer + GLintptr offset + GLsizeiptr size + + + void glTextureColorMaskSGIS + GLboolean red + GLboolean green + GLboolean blue + GLboolean alpha + + + + void glTextureFoveationParametersQCOM + GLuint texture + GLuint layer + GLuint focalPoint + GLfloat focalX + GLfloat focalY + GLfloat gainX + GLfloat gainY + GLfloat foveaArea + + + void glTextureImage1DEXT + GLuint texture + GLenum target + GLint level + GLint internalformat + GLsizei width + GLint border + GLenum format + GLenum type + const void *pixels + + + void glTextureImage2DEXT + GLuint texture + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLint border + GLenum format + GLenum type + const void *pixels + + + void glTextureImage2DMultisampleCoverageNV + GLuint texture + GLenum target + GLsizei coverageSamples + GLsizei colorSamples + GLint internalFormat + GLsizei width + GLsizei height + GLboolean fixedSampleLocations + + + void glTextureImage2DMultisampleNV + GLuint texture + GLenum target + GLsizei samples + GLint internalFormat + GLsizei width + GLsizei height + GLboolean fixedSampleLocations + + + void glTextureImage3DEXT + GLuint texture + GLenum target + GLint level + GLint internalformat + GLsizei width + GLsizei height + GLsizei depth + GLint border + GLenum format + GLenum type + const void *pixels + + + void glTextureImage3DMultisampleCoverageNV + GLuint texture + GLenum target + GLsizei coverageSamples + GLsizei colorSamples + GLint internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedSampleLocations + + + void glTextureImage3DMultisampleNV + GLuint texture + GLenum target + GLsizei samples + GLint internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedSampleLocations + + + void glTextureLightEXT + GLenum pname + + + void glTextureMaterialEXT + GLenum face + GLenum mode + + + void glTextureNormalEXT + GLenum mode + + + void glTexturePageCommitmentEXT + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLboolean commit + + + void glTexturePageCommitmentMemNV + GLuint texture + GLint layer + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLuint memory + GLuint64 offset + GLboolean commit + + + void glTextureParameterIiv + GLuint texture + GLenum pname + const GLint *params + + + void glTextureParameterIivEXT + GLuint texture + GLenum target + GLenum pname + const GLint *params + + + void glTextureParameterIuiv + GLuint texture + GLenum pname + const GLuint *params + + + void glTextureParameterIuivEXT + GLuint texture + GLenum target + GLenum pname + const GLuint *params + + + void glTextureParameterf + GLuint texture + GLenum pname + GLfloat param + + + void glTextureParameterfEXT + GLuint texture + GLenum target + GLenum pname + GLfloat param + + + + void glTextureParameterfv + GLuint texture + GLenum pname + const GLfloat *param + + + void glTextureParameterfvEXT + GLuint texture + GLenum target + GLenum pname + const GLfloat *params + + + void glTextureParameteri + GLuint texture + GLenum pname + GLint param + + + void glTextureParameteriEXT + GLuint texture + GLenum target + GLenum pname + GLint param + + + + void glTextureParameteriv + GLuint texture + GLenum pname + const GLint *param + + + void glTextureParameterivEXT + GLuint texture + GLenum target + GLenum pname + const GLint *params + + + void glTextureRangeAPPLE + GLenum target + GLsizei length + const void *pointer + + + void glTextureRenderbufferEXT + GLuint texture + GLenum target + GLuint renderbuffer + + + void glTextureStorage1D + GLuint texture + GLsizei levels + GLenum internalformat + GLsizei width + + + void glTextureStorage1DEXT + GLuint texture + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + + + void glTextureStorage2D + GLuint texture + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + + + void glTextureStorage2DEXT + GLuint texture + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + + + void glTextureStorage2DMultisample + GLuint texture + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLboolean fixedsamplelocations + + + void glTextureStorage2DMultisampleEXT + GLuint texture + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLboolean fixedsamplelocations + + + void glTextureStorage3D + GLuint texture + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + + + void glTextureStorage3DEXT + GLuint texture + GLenum target + GLsizei levels + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + + + void glTextureStorage3DMultisample + GLuint texture + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedsamplelocations + + + void glTextureStorage3DMultisampleEXT + GLuint texture + GLenum target + GLsizei samples + GLenum internalformat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedsamplelocations + + + void glTextureStorageMem1DEXT + GLuint texture + GLsizei levels + GLenum internalFormat + GLsizei width + GLuint memory + GLuint64 offset + + + void glTextureStorageMem2DEXT + GLuint texture + GLsizei levels + GLenum internalFormat + GLsizei width + GLsizei height + GLuint memory + GLuint64 offset + + + void glTextureStorageMem2DMultisampleEXT + GLuint texture + GLsizei samples + GLenum internalFormat + GLsizei width + GLsizei height + GLboolean fixedSampleLocations + GLuint memory + GLuint64 offset + + + void glTextureStorageMem3DEXT + GLuint texture + GLsizei levels + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLuint memory + GLuint64 offset + + + void glTextureStorageMem3DMultisampleEXT + GLuint texture + GLsizei samples + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLboolean fixedSampleLocations + GLuint memory + GLuint64 offset + + + void glTextureStorageSparseAMD + GLuint texture + GLenum target + GLenum internalFormat + GLsizei width + GLsizei height + GLsizei depth + GLsizei layers + GLbitfield flags + + + void glTextureSubImage1D + GLuint texture + GLint level + GLint xoffset + GLsizei width + GLenum format + GLenum type + const void *pixels + + + void glTextureSubImage1DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLsizei width + GLenum format + GLenum type + const void *pixels + + + void glTextureSubImage2D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + void glTextureSubImage2DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLsizei width + GLsizei height + GLenum format + GLenum type + const void *pixels + + + void glTextureSubImage3D + GLuint texture + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + void glTextureSubImage3DEXT + GLuint texture + GLenum target + GLint level + GLint xoffset + GLint yoffset + GLint zoffset + GLsizei width + GLsizei height + GLsizei depth + GLenum format + GLenum type + const void *pixels + + + void glTextureView + GLuint texture + GLenum target + GLuint origtexture + GLenum internalformat + GLuint minlevel + GLuint numlevels + GLuint minlayer + GLuint numlayers + + + void glTextureViewEXT + GLuint texture + GLenum target + GLuint origtexture + GLenum internalformat + GLuint minlevel + GLuint numlevels + GLuint minlayer + GLuint numlayers + + + + void glTextureViewOES + GLuint texture + GLenum target + GLuint origtexture + GLenum internalformat + GLuint minlevel + GLuint numlevels + GLuint minlayer + GLuint numlayers + + + + void glTrackMatrixNV + GLenum target + GLuint address + GLenum matrix + GLenum transform + + + + void glTransformFeedbackAttribsNV + GLsizei count + const GLint *attribs + GLenum bufferMode + + + void glTransformFeedbackBufferBase + GLuint xfb + GLuint index + GLuint buffer + + + void glTransformFeedbackBufferRange + GLuint xfb + GLuint index + GLuint buffer + GLintptr offset + GLsizeiptr size + + + void glTransformFeedbackStreamAttribsNV + GLsizei count + const GLint *attribs + GLsizei nbuffers + const GLint *bufstreams + GLenum bufferMode + + + void glTransformFeedbackVaryings + GLuint program + GLsizei count + const GLchar *const*varyings + GLenum bufferMode + + + + void glTransformFeedbackVaryingsEXT + GLuint program + GLsizei count + const GLchar *const*varyings + GLenum bufferMode + + + + void glTransformFeedbackVaryingsNV + GLuint program + GLsizei count + const GLint *locations + GLenum bufferMode + + + void glTransformPathNV + GLuint resultPath + GLuint srcPath + GLenum transformType + const GLfloat *transformValues + + + void glTranslated + GLdouble x + GLdouble y + GLdouble z + + + + void glTranslatef + GLfloat x + GLfloat y + GLfloat z + + + + void glTranslatex + GLfixed x + GLfixed y + GLfixed z + + + void glTranslatexOES + GLfixed x + GLfixed y + GLfixed z + + + void glUniform1d + GLint location + GLdouble x + + + void glUniform1dv + GLint location + GLsizei count + const GLdouble *value + + + void glUniform1f + GLint location + GLfloat v0 + + + void glUniform1fARB + GLint location + GLfloat v0 + + + + void glUniform1fv + GLint location + GLsizei count + const GLfloat *value + + + void glUniform1fvARB + GLint location + GLsizei count + const GLfloat *value + + + + void glUniform1i + GLint location + GLint v0 + + + void glUniform1i64ARB + GLint location + GLint64 x + + + void glUniform1i64NV + GLint location + GLint64EXT x + + + void glUniform1i64vARB + GLint location + GLsizei count + const GLint64 *value + + + void glUniform1i64vNV + GLint location + GLsizei count + const GLint64EXT *value + + + void glUniform1iARB + GLint location + GLint v0 + + + + void glUniform1iv + GLint location + GLsizei count + const GLint *value + + + void glUniform1ivARB + GLint location + GLsizei count + const GLint *value + + + + void glUniform1ui + GLint location + GLuint v0 + + + void glUniform1ui64ARB + GLint location + GLuint64 x + + + void glUniform1ui64NV + GLint location + GLuint64EXT x + + + void glUniform1ui64vARB + GLint location + GLsizei count + const GLuint64 *value + + + void glUniform1ui64vNV + GLint location + GLsizei count + const GLuint64EXT *value + + + void glUniform1uiEXT + GLint location + GLuint v0 + + + + void glUniform1uiv + GLint location + GLsizei count + const GLuint *value + + + void glUniform1uivEXT + GLint location + GLsizei count + const GLuint *value + + + + void glUniform2d + GLint location + GLdouble x + GLdouble y + + + void glUniform2dv + GLint location + GLsizei count + const GLdouble *value + + + void glUniform2f + GLint location + GLfloat v0 + GLfloat v1 + + + void glUniform2fARB + GLint location + GLfloat v0 + GLfloat v1 + + + + void glUniform2fv + GLint location + GLsizei count + const GLfloat *value + + + void glUniform2fvARB + GLint location + GLsizei count + const GLfloat *value + + + + void glUniform2i + GLint location + GLint v0 + GLint v1 + + + void glUniform2i64ARB + GLint location + GLint64 x + GLint64 y + + + void glUniform2i64NV + GLint location + GLint64EXT x + GLint64EXT y + + + void glUniform2i64vARB + GLint location + GLsizei count + const GLint64 *value + + + void glUniform2i64vNV + GLint location + GLsizei count + const GLint64EXT *value + + + void glUniform2iARB + GLint location + GLint v0 + GLint v1 + + + + void glUniform2iv + GLint location + GLsizei count + const GLint *value + + + void glUniform2ivARB + GLint location + GLsizei count + const GLint *value + + + + void glUniform2ui + GLint location + GLuint v0 + GLuint v1 + + + void glUniform2ui64ARB + GLint location + GLuint64 x + GLuint64 y + + + void glUniform2ui64NV + GLint location + GLuint64EXT x + GLuint64EXT y + + + void glUniform2ui64vARB + GLint location + GLsizei count + const GLuint64 *value + + + void glUniform2ui64vNV + GLint location + GLsizei count + const GLuint64EXT *value + + + void glUniform2uiEXT + GLint location + GLuint v0 + GLuint v1 + + + + void glUniform2uiv + GLint location + GLsizei count + const GLuint *value + + + void glUniform2uivEXT + GLint location + GLsizei count + const GLuint *value + + + + void glUniform3d + GLint location + GLdouble x + GLdouble y + GLdouble z + + + void glUniform3dv + GLint location + GLsizei count + const GLdouble *value + + + void glUniform3f + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + + + void glUniform3fARB + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + + + + void glUniform3fv + GLint location + GLsizei count + const GLfloat *value + + + void glUniform3fvARB + GLint location + GLsizei count + const GLfloat *value + + + + void glUniform3i + GLint location + GLint v0 + GLint v1 + GLint v2 + + + void glUniform3i64ARB + GLint location + GLint64 x + GLint64 y + GLint64 z + + + void glUniform3i64NV + GLint location + GLint64EXT x + GLint64EXT y + GLint64EXT z + + + void glUniform3i64vARB + GLint location + GLsizei count + const GLint64 *value + + + void glUniform3i64vNV + GLint location + GLsizei count + const GLint64EXT *value + + + void glUniform3iARB + GLint location + GLint v0 + GLint v1 + GLint v2 + + + + void glUniform3iv + GLint location + GLsizei count + const GLint *value + + + void glUniform3ivARB + GLint location + GLsizei count + const GLint *value + + + + void glUniform3ui + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + + + void glUniform3ui64ARB + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + + + void glUniform3ui64NV + GLint location + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + + + void glUniform3ui64vARB + GLint location + GLsizei count + const GLuint64 *value + + + void glUniform3ui64vNV + GLint location + GLsizei count + const GLuint64EXT *value + + + void glUniform3uiEXT + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + + + + void glUniform3uiv + GLint location + GLsizei count + const GLuint *value + + + void glUniform3uivEXT + GLint location + GLsizei count + const GLuint *value + + + + void glUniform4d + GLint location + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + void glUniform4dv + GLint location + GLsizei count + const GLdouble *value + + + void glUniform4f + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + GLfloat v3 + + + void glUniform4fARB + GLint location + GLfloat v0 + GLfloat v1 + GLfloat v2 + GLfloat v3 + + + + void glUniform4fv + GLint location + GLsizei count + const GLfloat *value + + + void glUniform4fvARB + GLint location + GLsizei count + const GLfloat *value + + + + void glUniform4i + GLint location + GLint v0 + GLint v1 + GLint v2 + GLint v3 + + + void glUniform4i64ARB + GLint location + GLint64 x + GLint64 y + GLint64 z + GLint64 w + + + void glUniform4i64NV + GLint location + GLint64EXT x + GLint64EXT y + GLint64EXT z + GLint64EXT w + + + void glUniform4i64vARB + GLint location + GLsizei count + const GLint64 *value + + + void glUniform4i64vNV + GLint location + GLsizei count + const GLint64EXT *value + + + void glUniform4iARB + GLint location + GLint v0 + GLint v1 + GLint v2 + GLint v3 + + + + void glUniform4iv + GLint location + GLsizei count + const GLint *value + + + void glUniform4ivARB + GLint location + GLsizei count + const GLint *value + + + + void glUniform4ui + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + GLuint v3 + + + void glUniform4ui64ARB + GLint location + GLuint64 x + GLuint64 y + GLuint64 z + GLuint64 w + + + void glUniform4ui64NV + GLint location + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + GLuint64EXT w + + + void glUniform4ui64vARB + GLint location + GLsizei count + const GLuint64 *value + + + void glUniform4ui64vNV + GLint location + GLsizei count + const GLuint64EXT *value + + + void glUniform4uiEXT + GLint location + GLuint v0 + GLuint v1 + GLuint v2 + GLuint v3 + + + + void glUniform4uiv + GLint location + GLsizei count + const GLuint *value + + + void glUniform4uivEXT + GLint location + GLsizei count + const GLuint *value + + + + void glUniformBlockBinding + GLuint program + GLuint uniformBlockIndex + GLuint uniformBlockBinding + + + + void glUniformBufferEXT + GLuint program + GLint location + GLuint buffer + + + void glUniformHandleui64ARB + GLint location + GLuint64 value + + + void glUniformHandleui64IMG + GLint location + GLuint64 value + + + + void glUniformHandleui64NV + GLint location + GLuint64 value + + + void glUniformHandleui64vARB + GLint location + GLsizei count + const GLuint64 *value + + + void glUniformHandleui64vIMG + GLint location + GLsizei count + const GLuint64 *value + + + + void glUniformHandleui64vNV + GLint location + GLsizei count + const GLuint64 *value + + + void glUniformMatrix2dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix2fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glUniformMatrix2fvARB + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix2x3dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix2x3fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix2x3fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix2x4dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix2x4fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix2x4fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix3dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix3fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glUniformMatrix3fvARB + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix3x2dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix3x2fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix3x2fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix3x4dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix3x4fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix3x4fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix4dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix4fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + void glUniformMatrix4fvARB + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix4x2dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix4x2fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix4x2fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix4x3dv + GLint location + GLsizei count + GLboolean transpose + const GLdouble *value + + + void glUniformMatrix4x3fv + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformMatrix4x3fvNV + GLint location + GLsizei count + GLboolean transpose + const GLfloat *value + + + + void glUniformSubroutinesuiv + GLenum shadertype + GLsizei count + const GLuint *indices + + + void glUniformui64NV + GLint location + GLuint64EXT value + + + void glUniformui64vNV + GLint location + GLsizei count + const GLuint64EXT *value + + + void glUnlockArraysEXT + + + GLboolean glUnmapBuffer + GLenum target + + + GLboolean glUnmapBufferARB + GLenum target + + + + GLboolean glUnmapBufferOES + GLenum target + + + + GLboolean glUnmapNamedBuffer + GLuint buffer + + + GLboolean glUnmapNamedBufferEXT + GLuint buffer + + + void glUnmapObjectBufferATI + GLuint buffer + + + void glUnmapTexture2DINTEL + GLuint texture + GLint level + + + void glUpdateObjectBufferATI + GLuint buffer + GLuint offset + GLsizei size + const void *pointer + GLenum preserve + + + void glUploadGpuMaskNVX + GLbitfield mask + + + void glUseProgram + GLuint program + + + void glUseProgramObjectARB + GLhandleARB programObj + + + + void glUseProgramStages + GLuint pipeline + GLbitfield stages + GLuint program + + + void glUseProgramStagesEXT + GLuint pipeline + GLbitfield stages + GLuint program + + + void glUseShaderProgramEXT + GLenum type + GLuint program + + + void glVDPAUFiniNV + + + void glVDPAUGetSurfaceivNV + GLvdpauSurfaceNV surface + GLenum pname + GLsizei count + GLsizei *length + GLint *values + + + void glVDPAUInitNV + const void *vdpDevice + const void *getProcAddress + + + GLboolean glVDPAUIsSurfaceNV + GLvdpauSurfaceNV surface + + + void glVDPAUMapSurfacesNV + GLsizei numSurfaces + const GLvdpauSurfaceNV *surfaces + + + GLvdpauSurfaceNV glVDPAURegisterOutputSurfaceNV + const void *vdpSurface + GLenum target + GLsizei numTextureNames + const GLuint *textureNames + + + GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceNV + const void *vdpSurface + GLenum target + GLsizei numTextureNames + const GLuint *textureNames + + + GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceWithPictureStructureNV + const void *vdpSurface + GLenum target + GLsizei numTextureNames + const GLuint *textureNames + GLboolean isFrameStructure + + + void glVDPAUSurfaceAccessNV + GLvdpauSurfaceNV surface + GLenum access + + + void glVDPAUUnmapSurfacesNV + GLsizei numSurface + const GLvdpauSurfaceNV *surfaces + + + void glVDPAUUnregisterSurfaceNV + GLvdpauSurfaceNV surface + + + void glValidateProgram + GLuint program + + + void glValidateProgramARB + GLhandleARB programObj + + + + void glValidateProgramPipeline + GLuint pipeline + + + void glValidateProgramPipelineEXT + GLuint pipeline + + + void glVariantArrayObjectATI + GLuint id + GLenum type + GLsizei stride + GLuint buffer + GLuint offset + + + void glVariantPointerEXT + GLuint id + GLenum type + GLuint stride + const void *addr + + + void glVariantbvEXT + GLuint id + const GLbyte *addr + + + void glVariantdvEXT + GLuint id + const GLdouble *addr + + + void glVariantfvEXT + GLuint id + const GLfloat *addr + + + void glVariantivEXT + GLuint id + const GLint *addr + + + void glVariantsvEXT + GLuint id + const GLshort *addr + + + void glVariantubvEXT + GLuint id + const GLubyte *addr + + + void glVariantuivEXT + GLuint id + const GLuint *addr + + + void glVariantusvEXT + GLuint id + const GLushort *addr + + + void glVertex2bOES + GLbyte x + GLbyte y + + + void glVertex2bvOES + const GLbyte *coords + + + void glVertex2d + GLdouble x + GLdouble y + + + + void glVertex2dv + const GLdouble *v + + + + void glVertex2f + GLfloat x + GLfloat y + + + + void glVertex2fv + const GLfloat *v + + + + void glVertex2hNV + GLhalfNV x + GLhalfNV y + + + + void glVertex2hvNV + const GLhalfNV *v + + + + void glVertex2i + GLint x + GLint y + + + + void glVertex2iv + const GLint *v + + + + void glVertex2s + GLshort x + GLshort y + + + + void glVertex2sv + const GLshort *v + + + + void glVertex2xOES + GLfixed x + + + void glVertex2xvOES + const GLfixed *coords + + + void glVertex3bOES + GLbyte x + GLbyte y + GLbyte z + + + void glVertex3bvOES + const GLbyte *coords + + + void glVertex3d + GLdouble x + GLdouble y + GLdouble z + + + + void glVertex3dv + const GLdouble *v + + + + void glVertex3f + GLfloat x + GLfloat y + GLfloat z + + + + void glVertex3fv + const GLfloat *v + + + + void glVertex3hNV + GLhalfNV x + GLhalfNV y + GLhalfNV z + + + + void glVertex3hvNV + const GLhalfNV *v + + + + void glVertex3i + GLint x + GLint y + GLint z + + + + void glVertex3iv + const GLint *v + + + + void glVertex3s + GLshort x + GLshort y + GLshort z + + + + void glVertex3sv + const GLshort *v + + + + void glVertex3xOES + GLfixed x + GLfixed y + + + void glVertex3xvOES + const GLfixed *coords + + + void glVertex4bOES + GLbyte x + GLbyte y + GLbyte z + GLbyte w + + + void glVertex4bvOES + const GLbyte *coords + + + void glVertex4d + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glVertex4dv + const GLdouble *v + + + + void glVertex4f + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glVertex4fv + const GLfloat *v + + + + void glVertex4hNV + GLhalfNV x + GLhalfNV y + GLhalfNV z + GLhalfNV w + + + + void glVertex4hvNV + const GLhalfNV *v + + + + void glVertex4i + GLint x + GLint y + GLint z + GLint w + + + + void glVertex4iv + const GLint *v + + + + void glVertex4s + GLshort x + GLshort y + GLshort z + GLshort w + + + + void glVertex4sv + const GLshort *v + + + + void glVertex4xOES + GLfixed x + GLfixed y + GLfixed z + + + void glVertex4xvOES + const GLfixed *coords + + + void glVertexArrayAttribBinding + GLuint vaobj + GLuint attribindex + GLuint bindingindex + + + void glVertexArrayAttribFormat + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLboolean normalized + GLuint relativeoffset + + + void glVertexArrayAttribIFormat + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexArrayAttribLFormat + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexArrayBindVertexBufferEXT + GLuint vaobj + GLuint bindingindex + GLuint buffer + GLintptr offset + GLsizei stride + + + void glVertexArrayBindingDivisor + GLuint vaobj + GLuint bindingindex + GLuint divisor + + + void glVertexArrayColorOffsetEXT + GLuint vaobj + GLuint buffer + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayEdgeFlagOffsetEXT + GLuint vaobj + GLuint buffer + GLsizei stride + GLintptr offset + + + void glVertexArrayElementBuffer + GLuint vaobj + GLuint buffer + + + void glVertexArrayFogCoordOffsetEXT + GLuint vaobj + GLuint buffer + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayIndexOffsetEXT + GLuint vaobj + GLuint buffer + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayMultiTexCoordOffsetEXT + GLuint vaobj + GLuint buffer + GLenum texunit + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayNormalOffsetEXT + GLuint vaobj + GLuint buffer + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayParameteriAPPLE + GLenum pname + GLint param + + + void glVertexArrayRangeAPPLE + GLsizei length + void *pointer + + + void glVertexArrayRangeNV + GLsizei length + const void *pointer + + + void glVertexArraySecondaryColorOffsetEXT + GLuint vaobj + GLuint buffer + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayTexCoordOffsetEXT + GLuint vaobj + GLuint buffer + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayVertexAttribBindingEXT + GLuint vaobj + GLuint attribindex + GLuint bindingindex + + + void glVertexArrayVertexAttribDivisorEXT + GLuint vaobj + GLuint index + GLuint divisor + + + void glVertexArrayVertexAttribFormatEXT + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLboolean normalized + GLuint relativeoffset + + + void glVertexArrayVertexAttribIFormatEXT + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexArrayVertexAttribIOffsetEXT + GLuint vaobj + GLuint buffer + GLuint index + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayVertexAttribLFormatEXT + GLuint vaobj + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexArrayVertexAttribLOffsetEXT + GLuint vaobj + GLuint buffer + GLuint index + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexArrayVertexAttribOffsetEXT + GLuint vaobj + GLuint buffer + GLuint index + GLint size + GLenum type + GLboolean normalized + GLsizei stride + GLintptr offset + + + void glVertexArrayVertexBindingDivisorEXT + GLuint vaobj + GLuint bindingindex + GLuint divisor + + + void glVertexArrayVertexBuffer + GLuint vaobj + GLuint bindingindex + GLuint buffer + GLintptr offset + GLsizei stride + + + void glVertexArrayVertexBuffers + GLuint vaobj + GLuint first + GLsizei count + const GLuint *buffers + const GLintptr *offsets + const GLsizei *strides + + + void glVertexArrayVertexOffsetEXT + GLuint vaobj + GLuint buffer + GLint size + GLenum type + GLsizei stride + GLintptr offset + + + void glVertexAttrib1d + GLuint index + GLdouble x + + + + void glVertexAttrib1dARB + GLuint index + GLdouble x + + + + + void glVertexAttrib1dNV + GLuint index + GLdouble x + + + + + void glVertexAttrib1dv + GLuint index + const GLdouble *v + + + + void glVertexAttrib1dvARB + GLuint index + const GLdouble *v + + + + + void glVertexAttrib1dvNV + GLuint index + const GLdouble *v + + + + + void glVertexAttrib1f + GLuint index + GLfloat x + + + + void glVertexAttrib1fARB + GLuint index + GLfloat x + + + + + void glVertexAttrib1fNV + GLuint index + GLfloat x + + + + + void glVertexAttrib1fv + GLuint index + const GLfloat *v + + + + void glVertexAttrib1fvARB + GLuint index + const GLfloat *v + + + + + void glVertexAttrib1fvNV + GLuint index + const GLfloat *v + + + + + void glVertexAttrib1hNV + GLuint index + GLhalfNV x + + + + void glVertexAttrib1hvNV + GLuint index + const GLhalfNV *v + + + + void glVertexAttrib1s + GLuint index + GLshort x + + + + void glVertexAttrib1sARB + GLuint index + GLshort x + + + + + void glVertexAttrib1sNV + GLuint index + GLshort x + + + + + void glVertexAttrib1sv + GLuint index + const GLshort *v + + + + void glVertexAttrib1svARB + GLuint index + const GLshort *v + + + + + void glVertexAttrib1svNV + GLuint index + const GLshort *v + + + + + void glVertexAttrib2d + GLuint index + GLdouble x + GLdouble y + + + + void glVertexAttrib2dARB + GLuint index + GLdouble x + GLdouble y + + + + + void glVertexAttrib2dNV + GLuint index + GLdouble x + GLdouble y + + + + + void glVertexAttrib2dv + GLuint index + const GLdouble *v + + + + void glVertexAttrib2dvARB + GLuint index + const GLdouble *v + + + + + void glVertexAttrib2dvNV + GLuint index + const GLdouble *v + + + + + void glVertexAttrib2f + GLuint index + GLfloat x + GLfloat y + + + + void glVertexAttrib2fARB + GLuint index + GLfloat x + GLfloat y + + + + + void glVertexAttrib2fNV + GLuint index + GLfloat x + GLfloat y + + + + + void glVertexAttrib2fv + GLuint index + const GLfloat *v + + + + void glVertexAttrib2fvARB + GLuint index + const GLfloat *v + + + + + void glVertexAttrib2fvNV + GLuint index + const GLfloat *v + + + + + void glVertexAttrib2hNV + GLuint index + GLhalfNV x + GLhalfNV y + + + + void glVertexAttrib2hvNV + GLuint index + const GLhalfNV *v + + + + void glVertexAttrib2s + GLuint index + GLshort x + GLshort y + + + + void glVertexAttrib2sARB + GLuint index + GLshort x + GLshort y + + + + + void glVertexAttrib2sNV + GLuint index + GLshort x + GLshort y + + + + + void glVertexAttrib2sv + GLuint index + const GLshort *v + + + + void glVertexAttrib2svARB + GLuint index + const GLshort *v + + + + + void glVertexAttrib2svNV + GLuint index + const GLshort *v + + + + + void glVertexAttrib3d + GLuint index + GLdouble x + GLdouble y + GLdouble z + + + + void glVertexAttrib3dARB + GLuint index + GLdouble x + GLdouble y + GLdouble z + + + + + void glVertexAttrib3dNV + GLuint index + GLdouble x + GLdouble y + GLdouble z + + + + + void glVertexAttrib3dv + GLuint index + const GLdouble *v + + + + void glVertexAttrib3dvARB + GLuint index + const GLdouble *v + + + + + void glVertexAttrib3dvNV + GLuint index + const GLdouble *v + + + + + void glVertexAttrib3f + GLuint index + GLfloat x + GLfloat y + GLfloat z + + + + void glVertexAttrib3fARB + GLuint index + GLfloat x + GLfloat y + GLfloat z + + + + + void glVertexAttrib3fNV + GLuint index + GLfloat x + GLfloat y + GLfloat z + + + + + void glVertexAttrib3fv + GLuint index + const GLfloat *v + + + + void glVertexAttrib3fvARB + GLuint index + const GLfloat *v + + + + + void glVertexAttrib3fvNV + GLuint index + const GLfloat *v + + + + + void glVertexAttrib3hNV + GLuint index + GLhalfNV x + GLhalfNV y + GLhalfNV z + + + + void glVertexAttrib3hvNV + GLuint index + const GLhalfNV *v + + + + void glVertexAttrib3s + GLuint index + GLshort x + GLshort y + GLshort z + + + + void glVertexAttrib3sARB + GLuint index + GLshort x + GLshort y + GLshort z + + + + + void glVertexAttrib3sNV + GLuint index + GLshort x + GLshort y + GLshort z + + + + + void glVertexAttrib3sv + GLuint index + const GLshort *v + + + + void glVertexAttrib3svARB + GLuint index + const GLshort *v + + + + + void glVertexAttrib3svNV + GLuint index + const GLshort *v + + + + + void glVertexAttrib4Nbv + GLuint index + const GLbyte *v + + + void glVertexAttrib4NbvARB + GLuint index + const GLbyte *v + + + + void glVertexAttrib4Niv + GLuint index + const GLint *v + + + void glVertexAttrib4NivARB + GLuint index + const GLint *v + + + + void glVertexAttrib4Nsv + GLuint index + const GLshort *v + + + void glVertexAttrib4NsvARB + GLuint index + const GLshort *v + + + + void glVertexAttrib4Nub + GLuint index + GLubyte x + GLubyte y + GLubyte z + GLubyte w + + + void glVertexAttrib4NubARB + GLuint index + GLubyte x + GLubyte y + GLubyte z + GLubyte w + + + + void glVertexAttrib4Nubv + GLuint index + const GLubyte *v + + + + void glVertexAttrib4NubvARB + GLuint index + const GLubyte *v + + + + + void glVertexAttrib4Nuiv + GLuint index + const GLuint *v + + + void glVertexAttrib4NuivARB + GLuint index + const GLuint *v + + + + void glVertexAttrib4Nusv + GLuint index + const GLushort *v + + + void glVertexAttrib4NusvARB + GLuint index + const GLushort *v + + + + void glVertexAttrib4bv + GLuint index + const GLbyte *v + + + void glVertexAttrib4bvARB + GLuint index + const GLbyte *v + + + + void glVertexAttrib4d + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glVertexAttrib4dARB + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + + void glVertexAttrib4dNV + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + + void glVertexAttrib4dv + GLuint index + const GLdouble *v + + + + void glVertexAttrib4dvARB + GLuint index + const GLdouble *v + + + + + void glVertexAttrib4dvNV + GLuint index + const GLdouble *v + + + + + void glVertexAttrib4f + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glVertexAttrib4fARB + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + + void glVertexAttrib4fNV + GLuint index + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + + void glVertexAttrib4fv + GLuint index + const GLfloat *v + + + + void glVertexAttrib4fvARB + GLuint index + const GLfloat *v + + + + + void glVertexAttrib4fvNV + GLuint index + const GLfloat *v + + + + + void glVertexAttrib4hNV + GLuint index + GLhalfNV x + GLhalfNV y + GLhalfNV z + GLhalfNV w + + + + void glVertexAttrib4hvNV + GLuint index + const GLhalfNV *v + + + + void glVertexAttrib4iv + GLuint index + const GLint *v + + + void glVertexAttrib4ivARB + GLuint index + const GLint *v + + + + void glVertexAttrib4s + GLuint index + GLshort x + GLshort y + GLshort z + GLshort w + + + + void glVertexAttrib4sARB + GLuint index + GLshort x + GLshort y + GLshort z + GLshort w + + + + + void glVertexAttrib4sNV + GLuint index + GLshort x + GLshort y + GLshort z + GLshort w + + + + + void glVertexAttrib4sv + GLuint index + const GLshort *v + + + + void glVertexAttrib4svARB + GLuint index + const GLshort *v + + + + + void glVertexAttrib4svNV + GLuint index + const GLshort *v + + + + + void glVertexAttrib4ubNV + GLuint index + GLubyte x + GLubyte y + GLubyte z + GLubyte w + + + + + void glVertexAttrib4ubv + GLuint index + const GLubyte *v + + + void glVertexAttrib4ubvARB + GLuint index + const GLubyte *v + + + + void glVertexAttrib4ubvNV + GLuint index + const GLubyte *v + + + + + void glVertexAttrib4uiv + GLuint index + const GLuint *v + + + void glVertexAttrib4uivARB + GLuint index + const GLuint *v + + + + void glVertexAttrib4usv + GLuint index + const GLushort *v + + + void glVertexAttrib4usvARB + GLuint index + const GLushort *v + + + + void glVertexAttribArrayObjectATI + GLuint index + GLint size + GLenum type + GLboolean normalized + GLsizei stride + GLuint buffer + GLuint offset + + + void glVertexAttribBinding + GLuint attribindex + GLuint bindingindex + + + void glVertexAttribDivisor + GLuint index + GLuint divisor + + + void glVertexAttribDivisorANGLE + GLuint index + GLuint divisor + + + + void glVertexAttribDivisorARB + GLuint index + GLuint divisor + + + + void glVertexAttribDivisorEXT + GLuint index + GLuint divisor + + + + void glVertexAttribDivisorNV + GLuint index + GLuint divisor + + + + void glVertexAttribFormat + GLuint attribindex + GLint size + GLenum type + GLboolean normalized + GLuint relativeoffset + + + void glVertexAttribFormatNV + GLuint index + GLint size + GLenum type + GLboolean normalized + GLsizei stride + + + void glVertexAttribI1i + GLuint index + GLint x + + + + void glVertexAttribI1iEXT + GLuint index + GLint x + + + + + void glVertexAttribI1iv + GLuint index + const GLint *v + + + void glVertexAttribI1ivEXT + GLuint index + const GLint *v + + + + void glVertexAttribI1ui + GLuint index + GLuint x + + + + void glVertexAttribI1uiEXT + GLuint index + GLuint x + + + + + void glVertexAttribI1uiv + GLuint index + const GLuint *v + + + void glVertexAttribI1uivEXT + GLuint index + const GLuint *v + + + + void glVertexAttribI2i + GLuint index + GLint x + GLint y + + + + void glVertexAttribI2iEXT + GLuint index + GLint x + GLint y + + + + + void glVertexAttribI2iv + GLuint index + const GLint *v + + + void glVertexAttribI2ivEXT + GLuint index + const GLint *v + + + + void glVertexAttribI2ui + GLuint index + GLuint x + GLuint y + + + + void glVertexAttribI2uiEXT + GLuint index + GLuint x + GLuint y + + + + + void glVertexAttribI2uiv + GLuint index + const GLuint *v + + + void glVertexAttribI2uivEXT + GLuint index + const GLuint *v + + + + void glVertexAttribI3i + GLuint index + GLint x + GLint y + GLint z + + + + void glVertexAttribI3iEXT + GLuint index + GLint x + GLint y + GLint z + + + + + void glVertexAttribI3iv + GLuint index + const GLint *v + + + void glVertexAttribI3ivEXT + GLuint index + const GLint *v + + + + void glVertexAttribI3ui + GLuint index + GLuint x + GLuint y + GLuint z + + + + void glVertexAttribI3uiEXT + GLuint index + GLuint x + GLuint y + GLuint z + + + + + void glVertexAttribI3uiv + GLuint index + const GLuint *v + + + void glVertexAttribI3uivEXT + GLuint index + const GLuint *v + + + + void glVertexAttribI4bv + GLuint index + const GLbyte *v + + + void glVertexAttribI4bvEXT + GLuint index + const GLbyte *v + + + + void glVertexAttribI4i + GLuint index + GLint x + GLint y + GLint z + GLint w + + + + void glVertexAttribI4iEXT + GLuint index + GLint x + GLint y + GLint z + GLint w + + + + + void glVertexAttribI4iv + GLuint index + const GLint *v + + + void glVertexAttribI4ivEXT + GLuint index + const GLint *v + + + + void glVertexAttribI4sv + GLuint index + const GLshort *v + + + void glVertexAttribI4svEXT + GLuint index + const GLshort *v + + + + void glVertexAttribI4ubv + GLuint index + const GLubyte *v + + + void glVertexAttribI4ubvEXT + GLuint index + const GLubyte *v + + + + void glVertexAttribI4ui + GLuint index + GLuint x + GLuint y + GLuint z + GLuint w + + + + void glVertexAttribI4uiEXT + GLuint index + GLuint x + GLuint y + GLuint z + GLuint w + + + + + void glVertexAttribI4uiv + GLuint index + const GLuint *v + + + void glVertexAttribI4uivEXT + GLuint index + const GLuint *v + + + + void glVertexAttribI4usv + GLuint index + const GLushort *v + + + void glVertexAttribI4usvEXT + GLuint index + const GLushort *v + + + + void glVertexAttribIFormat + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexAttribIFormatNV + GLuint index + GLint size + GLenum type + GLsizei stride + + + void glVertexAttribIPointer + GLuint index + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glVertexAttribIPointerEXT + GLuint index + GLint size + GLenum type + GLsizei stride + const void *pointer + + + + void glVertexAttribL1d + GLuint index + GLdouble x + + + void glVertexAttribL1dEXT + GLuint index + GLdouble x + + + + void glVertexAttribL1dv + GLuint index + const GLdouble *v + + + void glVertexAttribL1dvEXT + GLuint index + const GLdouble *v + + + + void glVertexAttribL1i64NV + GLuint index + GLint64EXT x + + + void glVertexAttribL1i64vNV + GLuint index + const GLint64EXT *v + + + void glVertexAttribL1ui64ARB + GLuint index + GLuint64EXT x + + + void glVertexAttribL1ui64NV + GLuint index + GLuint64EXT x + + + void glVertexAttribL1ui64vARB + GLuint index + const GLuint64EXT *v + + + void glVertexAttribL1ui64vNV + GLuint index + const GLuint64EXT *v + + + void glVertexAttribL2d + GLuint index + GLdouble x + GLdouble y + + + void glVertexAttribL2dEXT + GLuint index + GLdouble x + GLdouble y + + + + void glVertexAttribL2dv + GLuint index + const GLdouble *v + + + void glVertexAttribL2dvEXT + GLuint index + const GLdouble *v + + + + void glVertexAttribL2i64NV + GLuint index + GLint64EXT x + GLint64EXT y + + + void glVertexAttribL2i64vNV + GLuint index + const GLint64EXT *v + + + void glVertexAttribL2ui64NV + GLuint index + GLuint64EXT x + GLuint64EXT y + + + void glVertexAttribL2ui64vNV + GLuint index + const GLuint64EXT *v + + + void glVertexAttribL3d + GLuint index + GLdouble x + GLdouble y + GLdouble z + + + void glVertexAttribL3dEXT + GLuint index + GLdouble x + GLdouble y + GLdouble z + + + + void glVertexAttribL3dv + GLuint index + const GLdouble *v + + + void glVertexAttribL3dvEXT + GLuint index + const GLdouble *v + + + + void glVertexAttribL3i64NV + GLuint index + GLint64EXT x + GLint64EXT y + GLint64EXT z + + + void glVertexAttribL3i64vNV + GLuint index + const GLint64EXT *v + + + void glVertexAttribL3ui64NV + GLuint index + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + + + void glVertexAttribL3ui64vNV + GLuint index + const GLuint64EXT *v + + + void glVertexAttribL4d + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + void glVertexAttribL4dEXT + GLuint index + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glVertexAttribL4dv + GLuint index + const GLdouble *v + + + void glVertexAttribL4dvEXT + GLuint index + const GLdouble *v + + + + void glVertexAttribL4i64NV + GLuint index + GLint64EXT x + GLint64EXT y + GLint64EXT z + GLint64EXT w + + + void glVertexAttribL4i64vNV + GLuint index + const GLint64EXT *v + + + void glVertexAttribL4ui64NV + GLuint index + GLuint64EXT x + GLuint64EXT y + GLuint64EXT z + GLuint64EXT w + + + void glVertexAttribL4ui64vNV + GLuint index + const GLuint64EXT *v + + + void glVertexAttribLFormat + GLuint attribindex + GLint size + GLenum type + GLuint relativeoffset + + + void glVertexAttribLFormatNV + GLuint index + GLint size + GLenum type + GLsizei stride + + + void glVertexAttribLPointer + GLuint index + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glVertexAttribLPointerEXT + GLuint index + GLint size + GLenum type + GLsizei stride + const void *pointer + + + + void glVertexAttribP1ui + GLuint index + GLenum type + GLboolean normalized + GLuint value + + + void glVertexAttribP1uiv + GLuint index + GLenum type + GLboolean normalized + const GLuint *value + + + void glVertexAttribP2ui + GLuint index + GLenum type + GLboolean normalized + GLuint value + + + void glVertexAttribP2uiv + GLuint index + GLenum type + GLboolean normalized + const GLuint *value + + + void glVertexAttribP3ui + GLuint index + GLenum type + GLboolean normalized + GLuint value + + + void glVertexAttribP3uiv + GLuint index + GLenum type + GLboolean normalized + const GLuint *value + + + void glVertexAttribP4ui + GLuint index + GLenum type + GLboolean normalized + GLuint value + + + void glVertexAttribP4uiv + GLuint index + GLenum type + GLboolean normalized + const GLuint *value + + + void glVertexAttribParameteriAMD + GLuint index + GLenum pname + GLint param + + + void glVertexAttribPointer + GLuint index + GLint size + GLenum type + GLboolean normalized + GLsizei stride + const void *pointer + + + void glVertexAttribPointerARB + GLuint index + GLint size + GLenum type + GLboolean normalized + GLsizei stride + const void *pointer + + + + void glVertexAttribPointerNV + GLuint index + GLint fsize + GLenum type + GLsizei stride + const void *pointer + + + void glVertexAttribs1dvNV + GLuint index + GLsizei count + const GLdouble *v + + + + void glVertexAttribs1fvNV + GLuint index + GLsizei count + const GLfloat *v + + + + void glVertexAttribs1hvNV + GLuint index + GLsizei n + const GLhalfNV *v + + + + void glVertexAttribs1svNV + GLuint index + GLsizei count + const GLshort *v + + + + void glVertexAttribs2dvNV + GLuint index + GLsizei count + const GLdouble *v + + + + void glVertexAttribs2fvNV + GLuint index + GLsizei count + const GLfloat *v + + + + void glVertexAttribs2hvNV + GLuint index + GLsizei n + const GLhalfNV *v + + + + void glVertexAttribs2svNV + GLuint index + GLsizei count + const GLshort *v + + + + void glVertexAttribs3dvNV + GLuint index + GLsizei count + const GLdouble *v + + + + void glVertexAttribs3fvNV + GLuint index + GLsizei count + const GLfloat *v + + + + void glVertexAttribs3hvNV + GLuint index + GLsizei n + const GLhalfNV *v + + + + void glVertexAttribs3svNV + GLuint index + GLsizei count + const GLshort *v + + + + void glVertexAttribs4dvNV + GLuint index + GLsizei count + const GLdouble *v + + + + void glVertexAttribs4fvNV + GLuint index + GLsizei count + const GLfloat *v + + + + void glVertexAttribs4hvNV + GLuint index + GLsizei n + const GLhalfNV *v + + + + void glVertexAttribs4svNV + GLuint index + GLsizei count + const GLshort *v + + + + void glVertexAttribs4ubvNV + GLuint index + GLsizei count + const GLubyte *v + + + + void glVertexBindingDivisor + GLuint bindingindex + GLuint divisor + + + void glVertexBlendARB + GLint count + + + + void glVertexBlendEnvfATI + GLenum pname + GLfloat param + + + void glVertexBlendEnviATI + GLenum pname + GLint param + + + void glVertexFormatNV + GLint size + GLenum type + GLsizei stride + + + void glVertexP2ui + GLenum type + GLuint value + + + void glVertexP2uiv + GLenum type + const GLuint *value + + + void glVertexP3ui + GLenum type + GLuint value + + + void glVertexP3uiv + GLenum type + const GLuint *value + + + void glVertexP4ui + GLenum type + GLuint value + + + void glVertexP4uiv + GLenum type + const GLuint *value + + + void glVertexPointer + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glVertexPointerEXT + GLint size + GLenum type + GLsizei stride + GLsizei count + const void *pointer + + + void glVertexPointerListIBM + GLint size + GLenum type + GLint stride + const void **pointer + GLint ptrstride + + + void glVertexPointervINTEL + GLint size + GLenum type + const void **pointer + + + void glVertexStream1dATI + GLenum stream + GLdouble x + + + void glVertexStream1dvATI + GLenum stream + const GLdouble *coords + + + void glVertexStream1fATI + GLenum stream + GLfloat x + + + void glVertexStream1fvATI + GLenum stream + const GLfloat *coords + + + void glVertexStream1iATI + GLenum stream + GLint x + + + void glVertexStream1ivATI + GLenum stream + const GLint *coords + + + void glVertexStream1sATI + GLenum stream + GLshort x + + + void glVertexStream1svATI + GLenum stream + const GLshort *coords + + + void glVertexStream2dATI + GLenum stream + GLdouble x + GLdouble y + + + void glVertexStream2dvATI + GLenum stream + const GLdouble *coords + + + void glVertexStream2fATI + GLenum stream + GLfloat x + GLfloat y + + + void glVertexStream2fvATI + GLenum stream + const GLfloat *coords + + + void glVertexStream2iATI + GLenum stream + GLint x + GLint y + + + void glVertexStream2ivATI + GLenum stream + const GLint *coords + + + void glVertexStream2sATI + GLenum stream + GLshort x + GLshort y + + + void glVertexStream2svATI + GLenum stream + const GLshort *coords + + + void glVertexStream3dATI + GLenum stream + GLdouble x + GLdouble y + GLdouble z + + + void glVertexStream3dvATI + GLenum stream + const GLdouble *coords + + + void glVertexStream3fATI + GLenum stream + GLfloat x + GLfloat y + GLfloat z + + + void glVertexStream3fvATI + GLenum stream + const GLfloat *coords + + + void glVertexStream3iATI + GLenum stream + GLint x + GLint y + GLint z + + + void glVertexStream3ivATI + GLenum stream + const GLint *coords + + + void glVertexStream3sATI + GLenum stream + GLshort x + GLshort y + GLshort z + + + void glVertexStream3svATI + GLenum stream + const GLshort *coords + + + void glVertexStream4dATI + GLenum stream + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + void glVertexStream4dvATI + GLenum stream + const GLdouble *coords + + + void glVertexStream4fATI + GLenum stream + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + void glVertexStream4fvATI + GLenum stream + const GLfloat *coords + + + void glVertexStream4iATI + GLenum stream + GLint x + GLint y + GLint z + GLint w + + + void glVertexStream4ivATI + GLenum stream + const GLint *coords + + + void glVertexStream4sATI + GLenum stream + GLshort x + GLshort y + GLshort z + GLshort w + + + void glVertexStream4svATI + GLenum stream + const GLshort *coords + + + void glVertexWeightPointerEXT + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glVertexWeightfEXT + GLfloat weight + + + + void glVertexWeightfvEXT + const GLfloat *weight + + + + void glVertexWeighthNV + GLhalfNV weight + + + + void glVertexWeighthvNV + const GLhalfNV *weight + + + + GLenum glVideoCaptureNV + GLuint video_capture_slot + GLuint *sequence_num + GLuint64EXT *capture_time + + + void glVideoCaptureStreamParameterdvNV + GLuint video_capture_slot + GLuint stream + GLenum pname + const GLdouble *params + + + void glVideoCaptureStreamParameterfvNV + GLuint video_capture_slot + GLuint stream + GLenum pname + const GLfloat *params + + + void glVideoCaptureStreamParameterivNV + GLuint video_capture_slot + GLuint stream + GLenum pname + const GLint *params + + + void glViewport + GLint x + GLint y + GLsizei width + GLsizei height + + + + void glViewportArrayv + GLuint first + GLsizei count + const GLfloat *v + + + void glViewportArrayvNV + GLuint first + GLsizei count + const GLfloat *v + + + + void glViewportArrayvOES + GLuint first + GLsizei count + const GLfloat *v + + + + void glViewportIndexedf + GLuint index + GLfloat x + GLfloat y + GLfloat w + GLfloat h + + + void glViewportIndexedfOES + GLuint index + GLfloat x + GLfloat y + GLfloat w + GLfloat h + + + + void glViewportIndexedfNV + GLuint index + GLfloat x + GLfloat y + GLfloat w + GLfloat h + + + + void glViewportIndexedfv + GLuint index + const GLfloat *v + + + void glViewportIndexedfvOES + GLuint index + const GLfloat *v + + + + void glViewportIndexedfvNV + GLuint index + const GLfloat *v + + + + void glViewportPositionWScaleNV + GLuint index + GLfloat xcoeff + GLfloat ycoeff + + + void glViewportSwizzleNV + GLuint index + GLenum swizzlex + GLenum swizzley + GLenum swizzlez + GLenum swizzlew + + + void glWaitSemaphoreEXT + GLuint semaphore + GLuint numBufferBarriers + const GLuint *buffers + GLuint numTextureBarriers + const GLuint *textures + const GLenum *srcLayouts + + + void glWaitSemaphoreui64NVX + GLuint waitGpu + GLsizei fenceObjectCount + const GLuint *semaphoreArray + const GLuint64 *fenceValueArray + + + void glWaitSync + GLsync sync + GLbitfield flags + GLuint64 timeout + + + void glWaitSyncAPPLE + GLsync sync + GLbitfield flags + GLuint64 timeout + + + + void glWeightPathsNV + GLuint resultPath + GLsizei numPaths + const GLuint *paths + const GLfloat *weights + + + void glWeightPointerARB + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glWeightPointerOES + GLint size + GLenum type + GLsizei stride + const void *pointer + + + void glWeightbvARB + GLint size + const GLbyte *weights + + + + void glWeightdvARB + GLint size + const GLdouble *weights + + + + void glWeightfvARB + GLint size + const GLfloat *weights + + + + void glWeightivARB + GLint size + const GLint *weights + + + + void glWeightsvARB + GLint size + const GLshort *weights + + + + void glWeightubvARB + GLint size + const GLubyte *weights + + + + void glWeightuivARB + GLint size + const GLuint *weights + + + + void glWeightusvARB + GLint size + const GLushort *weights + + + + void glWindowPos2d + GLdouble x + GLdouble y + + + + void glWindowPos2dARB + GLdouble x + GLdouble y + + + + + void glWindowPos2dMESA + GLdouble x + GLdouble y + + + + + void glWindowPos2dv + const GLdouble *v + + + + void glWindowPos2dvARB + const GLdouble *v + + + + + void glWindowPos2dvMESA + const GLdouble *v + + + + void glWindowPos2f + GLfloat x + GLfloat y + + + + void glWindowPos2fARB + GLfloat x + GLfloat y + + + + + void glWindowPos2fMESA + GLfloat x + GLfloat y + + + + + void glWindowPos2fv + const GLfloat *v + + + + void glWindowPos2fvARB + const GLfloat *v + + + + + void glWindowPos2fvMESA + const GLfloat *v + + + + void glWindowPos2i + GLint x + GLint y + + + + void glWindowPos2iARB + GLint x + GLint y + + + + + void glWindowPos2iMESA + GLint x + GLint y + + + + + void glWindowPos2iv + const GLint *v + + + + void glWindowPos2ivARB + const GLint *v + + + + + void glWindowPos2ivMESA + const GLint *v + + + + void glWindowPos2s + GLshort x + GLshort y + + + + void glWindowPos2sARB + GLshort x + GLshort y + + + + + void glWindowPos2sMESA + GLshort x + GLshort y + + + + + void glWindowPos2sv + const GLshort *v + + + + void glWindowPos2svARB + const GLshort *v + + + + + void glWindowPos2svMESA + const GLshort *v + + + + void glWindowPos3d + GLdouble x + GLdouble y + GLdouble z + + + + void glWindowPos3dARB + GLdouble x + GLdouble y + GLdouble z + + + + + void glWindowPos3dMESA + GLdouble x + GLdouble y + GLdouble z + + + + + void glWindowPos3dv + const GLdouble *v + + + + void glWindowPos3dvARB + const GLdouble *v + + + + + void glWindowPos3dvMESA + const GLdouble *v + + + + void glWindowPos3f + GLfloat x + GLfloat y + GLfloat z + + + + void glWindowPos3fARB + GLfloat x + GLfloat y + GLfloat z + + + + + void glWindowPos3fMESA + GLfloat x + GLfloat y + GLfloat z + + + + + void glWindowPos3fv + const GLfloat *v + + + + void glWindowPos3fvARB + const GLfloat *v + + + + + void glWindowPos3fvMESA + const GLfloat *v + + + + void glWindowPos3i + GLint x + GLint y + GLint z + + + + void glWindowPos3iARB + GLint x + GLint y + GLint z + + + + + void glWindowPos3iMESA + GLint x + GLint y + GLint z + + + + + void glWindowPos3iv + const GLint *v + + + + void glWindowPos3ivARB + const GLint *v + + + + + void glWindowPos3ivMESA + const GLint *v + + + + void glWindowPos3s + GLshort x + GLshort y + GLshort z + + + + void glWindowPos3sARB + GLshort x + GLshort y + GLshort z + + + + + void glWindowPos3sMESA + GLshort x + GLshort y + GLshort z + + + + + void glWindowPos3sv + const GLshort *v + + + + void glWindowPos3svARB + const GLshort *v + + + + + void glWindowPos3svMESA + const GLshort *v + + + + void glWindowPos4dMESA + GLdouble x + GLdouble y + GLdouble z + GLdouble w + + + + void glWindowPos4dvMESA + const GLdouble *v + + + void glWindowPos4fMESA + GLfloat x + GLfloat y + GLfloat z + GLfloat w + + + + void glWindowPos4fvMESA + const GLfloat *v + + + void glWindowPos4iMESA + GLint x + GLint y + GLint z + GLint w + + + + void glWindowPos4ivMESA + const GLint *v + + + void glWindowPos4sMESA + GLshort x + GLshort y + GLshort z + GLshort w + + + + void glWindowPos4svMESA + const GLshort *v + + + void glWindowRectanglesEXT + GLenum mode + GLsizei count + const GLint *box + + + void glWriteMaskEXT + GLuint res + GLuint in + GLenum outX + GLenum outY + GLenum outZ + GLenum outW + + + void glDrawVkImageNV + GLuint64 vkImage + GLuint sampler + GLfloat x0 + GLfloat y0 + GLfloat x1 + GLfloat y1 + GLfloat z + GLfloat s0 + GLfloat t0 + GLfloat s1 + GLfloat t1 + + + GLVULKANPROCNV glGetVkProcAddrNV + const GLchar *name + + + void glWaitVkSemaphoreNV + GLuint64 vkSemaphore + + + void glSignalVkSemaphoreNV + GLuint64 vkSemaphore + + + void glSignalVkFenceNV + GLuint64 vkFence + + + void glFramebufferParameteriMESA + GLenum target + GLenum pname + GLint param + + + void glGetFramebufferParameterivMESA + GLenum target + GLenum pname + GLint *params + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/machine.rs b/src/machine.rs index a468474..167d3f2 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -242,6 +242,8 @@ impl Machine { // when the feature is built in, so a guest can prove the trap works. #[cfg(feature = "hostcall")] iris_hostcall::register(iris_hostcall::SELFTEST, Box::new(iris_hostcall::SelfTest)); + #[cfg(feature = "hostgl")] + iris_hostgl::register(); Self::new_with_testdev(cfg, None) } @@ -731,6 +733,11 @@ impl Machine { // Source kind + broadcast standard come from `[vino]` in iris.toml. phys.vino.set_phys(phys.clone()); if let Some(mgras) = &phys.mgras { mgras.set_phys(phys.clone()); } + // Host GL frames composite straight into the IMPACT framebuffer. + #[cfg(feature = "hostgl")] + if let Some(mgras) = &phys.mgras { + iris_hostcall::set_display(Arc::new(crate::mgras::ImpactScreen(mgras.clone()))); + } let standard = match cfg.vino.standard { crate::config::VinoStandard::Ntsc => crate::video_source::VideoStandard::Ntsc, crate::config::VinoStandard::Pal => crate::video_source::VideoStandard::Pal, diff --git a/src/mgras/mod.rs b/src/mgras/mod.rs index b062389..a28d627 100644 --- a/src/mgras/mod.rs +++ b/src/mgras/mod.rs @@ -921,6 +921,15 @@ impl Mgras { } } + /// Composite a host GL frame at a screen position (see `Board::composite`). + pub fn composite(&self, x: i32, y: i32, bgra: &[u8], stride: usize, w: usize, h: usize) -> bool { + let ok = self.board.lock().composite(x, y, bgra, stride, w, h); + if ok { + self.dirty.store(true, Ordering::Release); + } + ok + } + /// Give the board its path to system memory, for DMA. pub fn set_phys(&self, mem: Arc) { self.board.lock().mem = Some(mem.clone()); @@ -1220,3 +1229,21 @@ impl BusDevice for Mgras { fn read64(&self, addr: u32) -> BusRead64 { BusRead64::ok(self.do_read(addr, 64)) } fn write64(&self, addr: u32, val: u64) -> u32 { self.do_write(addr, 64, val); BUS_OK } } + +/// The board as the display host GL presents into: frames land in the +/// framebuffer under their window (see `Board::composite`). It cannot know the +/// guest X server's window ids, so only frames that say where their window is +/// are taken; the rest go back to the program to put up itself. +#[cfg(feature = "hostgl")] +pub struct ImpactScreen(pub Arc); + +#[cfg(feature = "hostgl")] +impl iris_hostcall::Display for ImpactScreen { + fn present(&self, _window: u32, _bgra: &[u8], _stride: usize, _width: usize, _height: usize) -> bool { + false + } + + fn present_at(&self, _window: u32, x: i32, y: i32, bgra: &[u8], stride: usize, width: usize, height: usize) -> bool { + self.0.composite(x, y, bgra, stride, width, height) + } +}