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

glRasterPos3i

関数
ラスタ位置を整数の3次元座標で指定する。
DLLOPENGL32.dll呼出規約winapi

シグネチャ

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

void glRasterPos3i(
    INT x,
    INT y,
    INT z
);

パラメーター

名前方向
xINTin
yINTin
zINTin

戻り値の型: void

各言語での呼び出し定義

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

void glRasterPos3i(
    INT x,
    INT y,
    INT z
);
[DllImport("OPENGL32.dll", ExactSpelling = true)]
static extern void glRasterPos3i(
    int x,   // INT
    int y,   // INT
    int z   // INT
);
<DllImport("OPENGL32.dll", ExactSpelling:=True)>
Public Shared Sub glRasterPos3i(
    x As Integer,   ' INT
    y As Integer,   ' INT
    z As Integer   ' INT
)
End Sub
' x : INT
' y : INT
' z : INT
Declare PtrSafe Sub glRasterPos3i Lib "opengl32" ( _
    ByVal x As Long, _
    ByVal y As Long, _
    ByVal z As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

glRasterPos3i = ctypes.windll.opengl32.glRasterPos3i
glRasterPos3i.restype = None
glRasterPos3i.argtypes = [
    ctypes.c_int,  # x : INT
    ctypes.c_int,  # y : INT
    ctypes.c_int,  # z : INT
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('OPENGL32.dll')
glRasterPos3i = Fiddle::Function.new(
  lib['glRasterPos3i'],
  [
    Fiddle::TYPE_INT,  # x : INT
    Fiddle::TYPE_INT,  # y : INT
    Fiddle::TYPE_INT,  # z : INT
  ],
  Fiddle::TYPE_VOID)
#[link(name = "opengl32")]
extern "system" {
    fn glRasterPos3i(
        x: i32,  // INT
        y: i32,  // INT
        z: i32  // INT
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("OPENGL32.dll")]
public static extern void glRasterPos3i(int x, int y, int z);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OPENGL32_glRasterPos3i' -Namespace Win32 -PassThru
# $api::glRasterPos3i(x, y, z)
#uselib "OPENGL32.dll"
#func global glRasterPos3i "glRasterPos3i" sptr, sptr, sptr
; glRasterPos3i x, y, z
; x : INT -> "sptr"
; y : INT -> "sptr"
; z : INT -> "sptr"
#uselib "OPENGL32.dll"
#func global glRasterPos3i "glRasterPos3i" int, int, int
; glRasterPos3i x, y, z
; x : INT -> "int"
; y : INT -> "int"
; z : INT -> "int"
; void glRasterPos3i(INT x, INT y, INT z)
#uselib "OPENGL32.dll"
#func global glRasterPos3i "glRasterPos3i" int, int, int
; glRasterPos3i x, y, z
; x : INT -> "int"
; y : INT -> "int"
; z : INT -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	opengl32 = windows.NewLazySystemDLL("OPENGL32.dll")
	procglRasterPos3i = opengl32.NewProc("glRasterPos3i")
)

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