Win32 API 日本語リファレンス
ホームGraphics.OpenGL › glTexCoord3s

glTexCoord3s

関数
現在のテクスチャ座標を短整数の3成分で設定する。
DLLOPENGL32.dll呼出規約winapi

シグネチャ

// OPENGL32.dll
#include <windows.h>

void glTexCoord3s(
    SHORT s,
    SHORT t,
    SHORT r
);

パラメーター

名前方向
sSHORTin
tSHORTin
rSHORTin

戻り値の型: void

各言語での呼び出し定義

// OPENGL32.dll
#include <windows.h>

void glTexCoord3s(
    SHORT s,
    SHORT t,
    SHORT r
);
[DllImport("OPENGL32.dll", ExactSpelling = true)]
static extern void glTexCoord3s(
    short s,   // SHORT
    short t,   // SHORT
    short r   // SHORT
);
<DllImport("OPENGL32.dll", ExactSpelling:=True)>
Public Shared Sub glTexCoord3s(
    s As Short,   ' SHORT
    t As Short,   ' SHORT
    r As Short   ' SHORT
)
End Sub
' s : SHORT
' t : SHORT
' r : SHORT
Declare PtrSafe Sub glTexCoord3s Lib "opengl32" ( _
    ByVal s As Integer, _
    ByVal t As Integer, _
    ByVal r As Integer)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

glTexCoord3s = ctypes.windll.opengl32.glTexCoord3s
glTexCoord3s.restype = None
glTexCoord3s.argtypes = [
    ctypes.c_short,  # s : SHORT
    ctypes.c_short,  # t : SHORT
    ctypes.c_short,  # r : SHORT
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('OPENGL32.dll')
glTexCoord3s = Fiddle::Function.new(
  lib['glTexCoord3s'],
  [
    Fiddle::TYPE_SHORT,  # s : SHORT
    Fiddle::TYPE_SHORT,  # t : SHORT
    Fiddle::TYPE_SHORT,  # r : SHORT
  ],
  Fiddle::TYPE_VOID)
#[link(name = "opengl32")]
extern "system" {
    fn glTexCoord3s(
        s: i16,  // SHORT
        t: i16,  // SHORT
        r: i16  // SHORT
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("OPENGL32.dll")]
public static extern void glTexCoord3s(short s, short t, short r);
"@
$api = Add-Type -MemberDefinition $sig -Name 'OPENGL32_glTexCoord3s' -Namespace Win32 -PassThru
# $api::glTexCoord3s(s, t, r)
#uselib "OPENGL32.dll"
#func global glTexCoord3s "glTexCoord3s" sptr, sptr, sptr
; glTexCoord3s s, t, r
; s : SHORT -> "sptr"
; t : SHORT -> "sptr"
; r : SHORT -> "sptr"
#uselib "OPENGL32.dll"
#func global glTexCoord3s "glTexCoord3s" int, int, int
; glTexCoord3s s, t, r
; s : SHORT -> "int"
; t : SHORT -> "int"
; r : SHORT -> "int"
; void glTexCoord3s(SHORT s, SHORT t, SHORT r)
#uselib "OPENGL32.dll"
#func global glTexCoord3s "glTexCoord3s" int, int, int
; glTexCoord3s s, t, r
; s : SHORT -> "int"
; t : SHORT -> "int"
; r : SHORT -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	opengl32 = windows.NewLazySystemDLL("OPENGL32.dll")
	procglTexCoord3s = opengl32.NewProc("glTexCoord3s")
)

// s (SHORT), t (SHORT), r (SHORT)
r1, _, err := procglTexCoord3s.Call(
	uintptr(s),
	uintptr(t),
	uintptr(r),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure glTexCoord3s(
  s: Smallint;   // SHORT
  t: Smallint;   // SHORT
  r: Smallint   // SHORT
); stdcall;
  external 'OPENGL32.dll' name 'glTexCoord3s';
result := DllCall("OPENGL32\glTexCoord3s"
    , "Short", s   ; SHORT
    , "Short", t   ; SHORT
    , "Short", r   ; SHORT
    , "Int")   ; return: void
●glTexCoord3s(s, t, r) = DLL("OPENGL32.dll", "int glTexCoord3s(int, int, int)")
# 呼び出し: glTexCoord3s(s, t, r)
# s : SHORT -> "int"
# t : SHORT -> "int"
# r : SHORT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。