ホーム › Graphics.OpenGL › wglShareLists
wglShareLists
関数2つのOpenGLコンテキスト間で表示リストを共有する。
シグネチャ
// OPENGL32.dll
#include <windows.h>
BOOL wglShareLists(
HGLRC param0,
HGLRC param1
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| param0 | HGLRC | in |
| param1 | HGLRC | in |
戻り値の型: BOOL
各言語での呼び出し定義
// OPENGL32.dll
#include <windows.h>
BOOL wglShareLists(
HGLRC param0,
HGLRC param1
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("OPENGL32.dll", SetLastError = true, ExactSpelling = true)]
static extern bool wglShareLists(
IntPtr param0, // HGLRC
IntPtr param1 // HGLRC
);<DllImport("OPENGL32.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function wglShareLists(
param0 As IntPtr, ' HGLRC
param1 As IntPtr ' HGLRC
) As Boolean
End Function' param0 : HGLRC
' param1 : HGLRC
Declare PtrSafe Function wglShareLists Lib "opengl32" ( _
ByVal param0 As LongPtr, _
ByVal param1 As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
wglShareLists = ctypes.windll.opengl32.wglShareLists
wglShareLists.restype = wintypes.BOOL
wglShareLists.argtypes = [
wintypes.HANDLE, # param0 : HGLRC
wintypes.HANDLE, # param1 : HGLRC
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('OPENGL32.dll')
wglShareLists = Fiddle::Function.new(
lib['wglShareLists'],
[
Fiddle::TYPE_VOIDP, # param0 : HGLRC
Fiddle::TYPE_VOIDP, # param1 : HGLRC
],
Fiddle::TYPE_INT)#[link(name = "opengl32")]
extern "system" {
fn wglShareLists(
param0: *mut core::ffi::c_void, // HGLRC
param1: *mut core::ffi::c_void // HGLRC
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("OPENGL32.dll", SetLastError = true)]
public static extern bool wglShareLists(IntPtr param0, IntPtr param1);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OPENGL32_wglShareLists' -Namespace Win32 -PassThru
# $api::wglShareLists(param0, param1)#uselib "OPENGL32.dll"
#func global wglShareLists "wglShareLists" sptr, sptr
; wglShareLists param0, param1 ; 戻り値は stat
; param0 : HGLRC -> "sptr"
; param1 : HGLRC -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "OPENGL32.dll"
#cfunc global wglShareLists "wglShareLists" sptr, sptr
; res = wglShareLists(param0, param1)
; param0 : HGLRC -> "sptr"
; param1 : HGLRC -> "sptr"; BOOL wglShareLists(HGLRC param0, HGLRC param1)
#uselib "OPENGL32.dll"
#cfunc global wglShareLists "wglShareLists" intptr, intptr
; res = wglShareLists(param0, param1)
; param0 : HGLRC -> "intptr"
; param1 : HGLRC -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
opengl32 = windows.NewLazySystemDLL("OPENGL32.dll")
procwglShareLists = opengl32.NewProc("wglShareLists")
)
// param0 (HGLRC), param1 (HGLRC)
r1, _, err := procwglShareLists.Call(
uintptr(param0),
uintptr(param1),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction wglShareLists(
param0: THandle; // HGLRC
param1: THandle // HGLRC
): BOOL; stdcall;
external 'OPENGL32.dll' name 'wglShareLists';result := DllCall("OPENGL32\wglShareLists"
, "Ptr", param0 ; HGLRC
, "Ptr", param1 ; HGLRC
, "Int") ; return: BOOL●wglShareLists(param0, param1) = DLL("OPENGL32.dll", "bool wglShareLists(void*, void*)")
# 呼び出し: wglShareLists(param0, param1)
# param0 : HGLRC -> "void*"
# param1 : HGLRC -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。