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