ホーム › Graphics.OpenGL › glRasterPos3s
glRasterPos3s
関数ラスタ位置を短整数の3次元座標で指定する。
シグネチャ
// OPENGL32.dll
#include <windows.h>
void glRasterPos3s(
SHORT x,
SHORT y,
SHORT z
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| x | SHORT | in |
| y | SHORT | in |
| z | SHORT | in |
戻り値の型: void
各言語での呼び出し定義
// OPENGL32.dll
#include <windows.h>
void glRasterPos3s(
SHORT x,
SHORT y,
SHORT z
);[DllImport("OPENGL32.dll", ExactSpelling = true)]
static extern void glRasterPos3s(
short x, // SHORT
short y, // SHORT
short z // SHORT
);<DllImport("OPENGL32.dll", ExactSpelling:=True)>
Public Shared Sub glRasterPos3s(
x As Short, ' SHORT
y As Short, ' SHORT
z As Short ' SHORT
)
End Sub' x : SHORT
' y : SHORT
' z : SHORT
Declare PtrSafe Sub glRasterPos3s Lib "opengl32" ( _
ByVal x As Integer, _
ByVal y As Integer, _
ByVal z As Integer)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
glRasterPos3s = ctypes.windll.opengl32.glRasterPos3s
glRasterPos3s.restype = None
glRasterPos3s.argtypes = [
ctypes.c_short, # x : SHORT
ctypes.c_short, # y : SHORT
ctypes.c_short, # z : SHORT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('OPENGL32.dll')
glRasterPos3s = Fiddle::Function.new(
lib['glRasterPos3s'],
[
Fiddle::TYPE_SHORT, # x : SHORT
Fiddle::TYPE_SHORT, # y : SHORT
Fiddle::TYPE_SHORT, # z : SHORT
],
Fiddle::TYPE_VOID)#[link(name = "opengl32")]
extern "system" {
fn glRasterPos3s(
x: i16, // SHORT
y: i16, // SHORT
z: i16 // SHORT
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("OPENGL32.dll")]
public static extern void glRasterPos3s(short x, short y, short z);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OPENGL32_glRasterPos3s' -Namespace Win32 -PassThru
# $api::glRasterPos3s(x, y, z)#uselib "OPENGL32.dll"
#func global glRasterPos3s "glRasterPos3s" sptr, sptr, sptr
; glRasterPos3s x, y, z
; x : SHORT -> "sptr"
; y : SHORT -> "sptr"
; z : SHORT -> "sptr"#uselib "OPENGL32.dll"
#func global glRasterPos3s "glRasterPos3s" int, int, int
; glRasterPos3s x, y, z
; x : SHORT -> "int"
; y : SHORT -> "int"
; z : SHORT -> "int"; void glRasterPos3s(SHORT x, SHORT y, SHORT z)
#uselib "OPENGL32.dll"
#func global glRasterPos3s "glRasterPos3s" int, int, int
; glRasterPos3s x, y, z
; x : SHORT -> "int"
; y : SHORT -> "int"
; z : SHORT -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
opengl32 = windows.NewLazySystemDLL("OPENGL32.dll")
procglRasterPos3s = opengl32.NewProc("glRasterPos3s")
)
// x (SHORT), y (SHORT), z (SHORT)
r1, _, err := procglRasterPos3s.Call(
uintptr(x),
uintptr(y),
uintptr(z),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure glRasterPos3s(
x: Smallint; // SHORT
y: Smallint; // SHORT
z: Smallint // SHORT
); stdcall;
external 'OPENGL32.dll' name 'glRasterPos3s';result := DllCall("OPENGL32\glRasterPos3s"
, "Short", x ; SHORT
, "Short", y ; SHORT
, "Short", z ; SHORT
, "Int") ; return: void●glRasterPos3s(x, y, z) = DLL("OPENGL32.dll", "int glRasterPos3s(int, int, int)")
# 呼び出し: glRasterPos3s(x, y, z)
# x : SHORT -> "int"
# y : SHORT -> "int"
# z : SHORT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。