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