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