ホーム › Graphics.OpenGL › glMapGrid1d
glMapGrid1d
関数1次元エバリュエータ用の倍精度グリッドを設定する。
シグネチャ
// OPENGL32.dll
#include <windows.h>
void glMapGrid1d(
INT un,
DOUBLE u1,
DOUBLE u2
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| un | INT | in |
| u1 | DOUBLE | in |
| u2 | DOUBLE | in |
戻り値の型: void
各言語での呼び出し定義
// OPENGL32.dll
#include <windows.h>
void glMapGrid1d(
INT un,
DOUBLE u1,
DOUBLE u2
);[DllImport("OPENGL32.dll", ExactSpelling = true)]
static extern void glMapGrid1d(
int un, // INT
double u1, // DOUBLE
double u2 // DOUBLE
);<DllImport("OPENGL32.dll", ExactSpelling:=True)>
Public Shared Sub glMapGrid1d(
un As Integer, ' INT
u1 As Double, ' DOUBLE
u2 As Double ' DOUBLE
)
End Sub' un : INT
' u1 : DOUBLE
' u2 : DOUBLE
Declare PtrSafe Sub glMapGrid1d Lib "opengl32" ( _
ByVal un As Long, _
ByVal u1 As Double, _
ByVal u2 As Double)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
glMapGrid1d = ctypes.windll.opengl32.glMapGrid1d
glMapGrid1d.restype = None
glMapGrid1d.argtypes = [
ctypes.c_int, # un : INT
ctypes.c_double, # u1 : DOUBLE
ctypes.c_double, # u2 : DOUBLE
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('OPENGL32.dll')
glMapGrid1d = Fiddle::Function.new(
lib['glMapGrid1d'],
[
Fiddle::TYPE_INT, # un : INT
Fiddle::TYPE_DOUBLE, # u1 : DOUBLE
Fiddle::TYPE_DOUBLE, # u2 : DOUBLE
],
Fiddle::TYPE_VOID)#[link(name = "opengl32")]
extern "system" {
fn glMapGrid1d(
un: i32, // INT
u1: f64, // DOUBLE
u2: f64 // DOUBLE
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("OPENGL32.dll")]
public static extern void glMapGrid1d(int un, double u1, double u2);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OPENGL32_glMapGrid1d' -Namespace Win32 -PassThru
# $api::glMapGrid1d(un, u1, u2)#uselib "OPENGL32.dll"
#func global glMapGrid1d "glMapGrid1d" sptr, double, double
; glMapGrid1d un, u1, u2
; un : INT -> "sptr"
; u1 : DOUBLE -> "double"
; u2 : DOUBLE -> "double"#uselib "OPENGL32.dll"
#func global glMapGrid1d "glMapGrid1d" int, double, double
; glMapGrid1d un, u1, u2
; un : INT -> "int"
; u1 : DOUBLE -> "double"
; u2 : DOUBLE -> "double"; void glMapGrid1d(INT un, DOUBLE u1, DOUBLE u2)
#uselib "OPENGL32.dll"
#func global glMapGrid1d "glMapGrid1d" int, double, double
; glMapGrid1d un, u1, u2
; un : INT -> "int"
; u1 : DOUBLE -> "double"
; u2 : DOUBLE -> "double"import (
"math"
"golang.org/x/sys/windows"
"unsafe"
)
var (
opengl32 = windows.NewLazySystemDLL("OPENGL32.dll")
procglMapGrid1d = opengl32.NewProc("glMapGrid1d")
)
// un (INT), u1 (DOUBLE), u2 (DOUBLE)
r1, _, err := procglMapGrid1d.Call(
uintptr(un),
uintptr(math.Float64bits(u1)),
uintptr(math.Float64bits(u2)),
)
_ = 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 glMapGrid1d(
un: Integer; // INT
u1: Double; // DOUBLE
u2: Double // DOUBLE
); stdcall;
external 'OPENGL32.dll' name 'glMapGrid1d';result := DllCall("OPENGL32\glMapGrid1d"
, "Int", un ; INT
, "Double", u1 ; DOUBLE
, "Double", u2 ; DOUBLE
, "Int") ; return: void●glMapGrid1d(un, u1, u2) = DLL("OPENGL32.dll", "int glMapGrid1d(int, double, double)")
# 呼び出し: glMapGrid1d(un, u1, u2)
# un : INT -> "int"
# u1 : DOUBLE -> "double"
# u2 : DOUBLE -> "double"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。