Win32 API 日本語リファレンス
ホームGraphics.OpenGL › glGetClipPlane

glGetClipPlane

関数
指定したクリップ面の係数方程式を取得する。
DLLOPENGL32.dll呼出規約winapi

シグネチャ

// OPENGL32.dll
#include <windows.h>

void glGetClipPlane(
    DWORD plane,
    DOUBLE* equation
);

パラメーター

名前方向
planeDWORDin
equationDOUBLE*inout

戻り値の型: void

各言語での呼び出し定義

// OPENGL32.dll
#include <windows.h>

void glGetClipPlane(
    DWORD plane,
    DOUBLE* equation
);
[DllImport("OPENGL32.dll", ExactSpelling = true)]
static extern void glGetClipPlane(
    uint plane,   // DWORD
    ref double equation   // DOUBLE* in/out
);
<DllImport("OPENGL32.dll", ExactSpelling:=True)>
Public Shared Sub glGetClipPlane(
    plane As UInteger,   ' DWORD
    ByRef equation As Double   ' DOUBLE* in/out
)
End Sub
' plane : DWORD
' equation : DOUBLE* in/out
Declare PtrSafe Sub glGetClipPlane Lib "opengl32" ( _
    ByVal plane As Long, _
    ByRef equation As Double)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

glGetClipPlane = ctypes.windll.opengl32.glGetClipPlane
glGetClipPlane.restype = None
glGetClipPlane.argtypes = [
    wintypes.DWORD,  # plane : DWORD
    ctypes.POINTER(ctypes.c_double),  # equation : DOUBLE* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('OPENGL32.dll')
glGetClipPlane = Fiddle::Function.new(
  lib['glGetClipPlane'],
  [
    -Fiddle::TYPE_INT,  # plane : DWORD
    Fiddle::TYPE_VOIDP,  # equation : DOUBLE* in/out
  ],
  Fiddle::TYPE_VOID)
#[link(name = "opengl32")]
extern "system" {
    fn glGetClipPlane(
        plane: u32,  // DWORD
        equation: *mut f64  // DOUBLE* in/out
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("OPENGL32.dll")]
public static extern void glGetClipPlane(uint plane, ref double equation);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OPENGL32_glGetClipPlane' -Namespace Win32 -PassThru
# $api::glGetClipPlane(plane, equation)
#uselib "OPENGL32.dll"
#func global glGetClipPlane "glGetClipPlane" sptr, sptr
; glGetClipPlane plane, varptr(equation)
; plane : DWORD -> "sptr"
; equation : DOUBLE* in/out -> "sptr"
出力引数:
#uselib "OPENGL32.dll"
#func global glGetClipPlane "glGetClipPlane" int, var
; glGetClipPlane plane, equation
; plane : DWORD -> "int"
; equation : DOUBLE* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; void glGetClipPlane(DWORD plane, DOUBLE* equation)
#uselib "OPENGL32.dll"
#func global glGetClipPlane "glGetClipPlane" int, var
; glGetClipPlane plane, equation
; plane : DWORD -> "int"
; equation : DOUBLE* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	opengl32 = windows.NewLazySystemDLL("OPENGL32.dll")
	procglGetClipPlane = opengl32.NewProc("glGetClipPlane")
)

// plane (DWORD), equation (DOUBLE* in/out)
r1, _, err := procglGetClipPlane.Call(
	uintptr(plane),
	uintptr(equation),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure glGetClipPlane(
  plane: DWORD;   // DWORD
  equation: Pointer   // DOUBLE* in/out
); stdcall;
  external 'OPENGL32.dll' name 'glGetClipPlane';
result := DllCall("OPENGL32\glGetClipPlane"
    , "UInt", plane   ; DWORD
    , "Ptr", equation   ; DOUBLE* in/out
    , "Int")   ; return: void
●glGetClipPlane(plane, equation) = DLL("OPENGL32.dll", "int glGetClipPlane(dword, void*)")
# 呼び出し: glGetClipPlane(plane, equation)
# plane : DWORD -> "dword"
# equation : DOUBLE* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。