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