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