ホーム › Graphics.OpenGL › glIndexiv
glIndexiv
関数現在のカラーインデックスを整数配列で設定する。
シグネチャ
// OPENGL32.dll
#include <windows.h>
void glIndexiv(
const INT* c
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| c | INT* | in |
戻り値の型: void
各言語での呼び出し定義
// OPENGL32.dll
#include <windows.h>
void glIndexiv(
const INT* c
);[DllImport("OPENGL32.dll", ExactSpelling = true)]
static extern void glIndexiv(
ref int c // INT*
);<DllImport("OPENGL32.dll", ExactSpelling:=True)>
Public Shared Sub glIndexiv(
ByRef c As Integer ' INT*
)
End Sub' c : INT*
Declare PtrSafe Sub glIndexiv Lib "opengl32" ( _
ByRef c As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
glIndexiv = ctypes.windll.opengl32.glIndexiv
glIndexiv.restype = None
glIndexiv.argtypes = [
ctypes.POINTER(ctypes.c_int), # c : INT*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('OPENGL32.dll')
glIndexiv = Fiddle::Function.new(
lib['glIndexiv'],
[
Fiddle::TYPE_VOIDP, # c : INT*
],
Fiddle::TYPE_VOID)#[link(name = "opengl32")]
extern "system" {
fn glIndexiv(
c: *const i32 // INT*
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("OPENGL32.dll")]
public static extern void glIndexiv(ref int c);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OPENGL32_glIndexiv' -Namespace Win32 -PassThru
# $api::glIndexiv(c)#uselib "OPENGL32.dll"
#func global glIndexiv "glIndexiv" sptr
; glIndexiv varptr(c)
; c : INT* -> "sptr"出力引数:
#uselib "OPENGL32.dll" #func global glIndexiv "glIndexiv" var ; glIndexiv c ; c : INT* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "OPENGL32.dll" #func global glIndexiv "glIndexiv" sptr ; glIndexiv varptr(c) ; c : INT* -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; void glIndexiv(INT* c) #uselib "OPENGL32.dll" #func global glIndexiv "glIndexiv" var ; glIndexiv c ; c : INT* -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; void glIndexiv(INT* c) #uselib "OPENGL32.dll" #func global glIndexiv "glIndexiv" intptr ; glIndexiv varptr(c) ; c : INT* -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
opengl32 = windows.NewLazySystemDLL("OPENGL32.dll")
procglIndexiv = opengl32.NewProc("glIndexiv")
)
// c (INT*)
r1, _, err := procglIndexiv.Call(
uintptr(c),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure glIndexiv(
c: Pointer // INT*
); stdcall;
external 'OPENGL32.dll' name 'glIndexiv';result := DllCall("OPENGL32\glIndexiv"
, "Ptr", c ; INT*
, "Int") ; return: void●glIndexiv(c) = DLL("OPENGL32.dll", "int glIndexiv(void*)")
# 呼び出し: glIndexiv(c)
# c : INT* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。