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