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