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