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