ホーム › Graphics.OpenGL › glGenLists
glGenLists
関数連続する空のディスプレイリスト識別子を生成する。
シグネチャ
// OPENGL32.dll
#include <windows.h>
DWORD glGenLists(
INT range
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| range | INT | in |
戻り値の型: DWORD
各言語での呼び出し定義
// OPENGL32.dll
#include <windows.h>
DWORD glGenLists(
INT range
);[DllImport("OPENGL32.dll", ExactSpelling = true)]
static extern uint glGenLists(
int range // INT
);<DllImport("OPENGL32.dll", ExactSpelling:=True)>
Public Shared Function glGenLists(
range As Integer ' INT
) As UInteger
End Function' range : INT
Declare PtrSafe Function glGenLists Lib "opengl32" ( _
ByVal range As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
glGenLists = ctypes.windll.opengl32.glGenLists
glGenLists.restype = wintypes.DWORD
glGenLists.argtypes = [
ctypes.c_int, # range : INT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('OPENGL32.dll')
glGenLists = Fiddle::Function.new(
lib['glGenLists'],
[
Fiddle::TYPE_INT, # range : INT
],
-Fiddle::TYPE_INT)#[link(name = "opengl32")]
extern "system" {
fn glGenLists(
range: i32 // INT
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("OPENGL32.dll")]
public static extern uint glGenLists(int range);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OPENGL32_glGenLists' -Namespace Win32 -PassThru
# $api::glGenLists(range)#uselib "OPENGL32.dll"
#func global glGenLists "glGenLists" sptr
; glGenLists range ; 戻り値は stat
; range : INT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "OPENGL32.dll"
#cfunc global glGenLists "glGenLists" int
; res = glGenLists(range)
; range : INT -> "int"; DWORD glGenLists(INT range)
#uselib "OPENGL32.dll"
#cfunc global glGenLists "glGenLists" int
; res = glGenLists(range)
; range : INT -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
opengl32 = windows.NewLazySystemDLL("OPENGL32.dll")
procglGenLists = opengl32.NewProc("glGenLists")
)
// range (INT)
r1, _, err := procglGenLists.Call(
uintptr(range),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction glGenLists(
range: Integer // INT
): DWORD; stdcall;
external 'OPENGL32.dll' name 'glGenLists';result := DllCall("OPENGL32\glGenLists"
, "Int", range ; INT
, "UInt") ; return: DWORD●glGenLists(range) = DLL("OPENGL32.dll", "dword glGenLists(int)")
# 呼び出し: glGenLists(range)
# range : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。