ホーム › Graphics.OpenGL › glCallLists
glCallLists
関数複数の表示リストをまとめて実行する。
シグネチャ
// OPENGL32.dll
#include <windows.h>
void glCallLists(
INT n,
DWORD type,
const void* lists
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| n | INT | in |
| type | DWORD | in |
| lists | void* | in |
戻り値の型: void
各言語での呼び出し定義
// OPENGL32.dll
#include <windows.h>
void glCallLists(
INT n,
DWORD type,
const void* lists
);[DllImport("OPENGL32.dll", ExactSpelling = true)]
static extern void glCallLists(
int n, // INT
uint type, // DWORD
IntPtr lists // void*
);<DllImport("OPENGL32.dll", ExactSpelling:=True)>
Public Shared Sub glCallLists(
n As Integer, ' INT
type As UInteger, ' DWORD
lists As IntPtr ' void*
)
End Sub' n : INT
' type : DWORD
' lists : void*
Declare PtrSafe Sub glCallLists Lib "opengl32" ( _
ByVal n As Long, _
ByVal type As Long, _
ByVal lists As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
glCallLists = ctypes.windll.opengl32.glCallLists
glCallLists.restype = None
glCallLists.argtypes = [
ctypes.c_int, # n : INT
wintypes.DWORD, # type : DWORD
ctypes.POINTER(None), # lists : void*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('OPENGL32.dll')
glCallLists = Fiddle::Function.new(
lib['glCallLists'],
[
Fiddle::TYPE_INT, # n : INT
-Fiddle::TYPE_INT, # type : DWORD
Fiddle::TYPE_VOIDP, # lists : void*
],
Fiddle::TYPE_VOID)#[link(name = "opengl32")]
extern "system" {
fn glCallLists(
n: i32, // INT
type: u32, // DWORD
lists: *const () // void*
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("OPENGL32.dll")]
public static extern void glCallLists(int n, uint type, IntPtr lists);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OPENGL32_glCallLists' -Namespace Win32 -PassThru
# $api::glCallLists(n, type, lists)#uselib "OPENGL32.dll"
#func global glCallLists "glCallLists" sptr, sptr, sptr
; glCallLists n, type, lists
; n : INT -> "sptr"
; type : DWORD -> "sptr"
; lists : void* -> "sptr"#uselib "OPENGL32.dll"
#func global glCallLists "glCallLists" int, int, sptr
; glCallLists n, type, lists
; n : INT -> "int"
; type : DWORD -> "int"
; lists : void* -> "sptr"; void glCallLists(INT n, DWORD type, void* lists)
#uselib "OPENGL32.dll"
#func global glCallLists "glCallLists" int, int, intptr
; glCallLists n, type, lists
; n : INT -> "int"
; type : DWORD -> "int"
; lists : void* -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
opengl32 = windows.NewLazySystemDLL("OPENGL32.dll")
procglCallLists = opengl32.NewProc("glCallLists")
)
// n (INT), type (DWORD), lists (void*)
r1, _, err := procglCallLists.Call(
uintptr(n),
uintptr(type),
uintptr(lists),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure glCallLists(
n: Integer; // INT
type: DWORD; // DWORD
lists: Pointer // void*
); stdcall;
external 'OPENGL32.dll' name 'glCallLists';result := DllCall("OPENGL32\glCallLists"
, "Int", n ; INT
, "UInt", type ; DWORD
, "Ptr", lists ; void*
, "Int") ; return: void●glCallLists(n, type, lists) = DLL("OPENGL32.dll", "int glCallLists(int, dword, void*)")
# 呼び出し: glCallLists(n, type, lists)
# n : INT -> "int"
# type : DWORD -> "dword"
# lists : void* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。