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

gluEndPolygon

関数
ポリゴン定義を終了しテッセレーションを実行する(旧API)。
DLLGLU32.dll呼出規約winapi

シグネチャ

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

void gluEndPolygon(
    GLUtesselator* tess
);

パラメーター

名前方向
tessGLUtesselator*inout

戻り値の型: void

各言語での呼び出し定義

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

void gluEndPolygon(
    GLUtesselator* tess
);
[DllImport("GLU32.dll", ExactSpelling = true)]
static extern void gluEndPolygon(
    ref IntPtr tess   // GLUtesselator* in/out
);
<DllImport("GLU32.dll", ExactSpelling:=True)>
Public Shared Sub gluEndPolygon(
    ByRef tess As IntPtr   ' GLUtesselator* in/out
)
End Sub
' tess : GLUtesselator* in/out
Declare PtrSafe Sub gluEndPolygon Lib "glu32" ( _
    ByRef tess As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

gluEndPolygon = ctypes.windll.glu32.gluEndPolygon
gluEndPolygon.restype = None
gluEndPolygon.argtypes = [
    ctypes.c_void_p,  # tess : GLUtesselator* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('GLU32.dll')
gluEndPolygon = Fiddle::Function.new(
  lib['gluEndPolygon'],
  [
    Fiddle::TYPE_VOIDP,  # tess : GLUtesselator* in/out
  ],
  Fiddle::TYPE_VOID)
#[link(name = "glu32")]
extern "system" {
    fn gluEndPolygon(
        tess: *mut isize  // GLUtesselator* in/out
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("GLU32.dll")]
public static extern void gluEndPolygon(ref IntPtr tess);
"@
$api = Add-Type -MemberDefinition $sig -Name 'GLU32_gluEndPolygon' -Namespace Win32 -PassThru
# $api::gluEndPolygon(tess)
#uselib "GLU32.dll"
#func global gluEndPolygon "gluEndPolygon" sptr
; gluEndPolygon tess
; tess : GLUtesselator* in/out -> "sptr"
#uselib "GLU32.dll"
#func global gluEndPolygon "gluEndPolygon" int
; gluEndPolygon tess
; tess : GLUtesselator* in/out -> "int"
; void gluEndPolygon(GLUtesselator* tess)
#uselib "GLU32.dll"
#func global gluEndPolygon "gluEndPolygon" int
; gluEndPolygon tess
; tess : GLUtesselator* in/out -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	glu32 = windows.NewLazySystemDLL("GLU32.dll")
	procgluEndPolygon = glu32.NewProc("gluEndPolygon")
)

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