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