Add initial prototype.
This commit is contained in:
583
3-mid/opengl/private/gl/source/cgl/gl-cgl.ads
Normal file
583
3-mid/opengl/private/gl/source/cgl/gl-cgl.ads
Normal file
@@ -0,0 +1,583 @@
|
||||
-- Copyright (c) 2011, Felix Krause <flyx@isobeef.org>
|
||||
--
|
||||
-- Permission to use, copy, modify, and/or distribute this software for any
|
||||
-- purpose with or without fee is hereby granted, provided that the above
|
||||
-- copyright notice and this permission notice appear in all copies.
|
||||
--
|
||||
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
with System;
|
||||
with Interfaces.C.Pointers;
|
||||
with Interfaces.C.Extensions;
|
||||
with Interfaces.C.Strings;
|
||||
|
||||
package GL.CGL is
|
||||
|
||||
-- CGL types and constants
|
||||
|
||||
subtype CGLContextObject is System.Address;
|
||||
subtype CGLPixelFormatObject is System.Address;
|
||||
subtype CGLRendererInfoObject is System.Address;
|
||||
subtype CGLPBufferObject is System.Address;
|
||||
|
||||
type CGLPixelFormatAttribute is (Terminator ,
|
||||
kCGLPFAAllRenderers ,
|
||||
kCGLPFATripleBuffer ,
|
||||
kCGLPFADoubleBuffer ,
|
||||
kCGLPFAStereo ,
|
||||
kCGLPFAAuxBuffers ,
|
||||
kCGLPFAColorSize ,
|
||||
kCGLPFAAlphaSize ,
|
||||
kCGLPFADepthSize ,
|
||||
kCGLPFAStencilSize ,
|
||||
kCGLPFAAccumSize ,
|
||||
kCGLPFAMinimumPolicy ,
|
||||
kCGLPFAMaximumPolicy ,
|
||||
kCGLPFAOffScreen ,
|
||||
kCGLPFAFullScreen ,
|
||||
kCGLPFASampleBuffers ,
|
||||
kCGLPFASamples ,
|
||||
kCGLPFAAuxDepthStencil ,
|
||||
kCGLPFAColorFloat ,
|
||||
kCGLPFAMultisample ,
|
||||
kCGLPFASupersample ,
|
||||
kCGLPFASampleAlpha ,
|
||||
|
||||
kCGLPFARendererID ,
|
||||
kCGLPFASingleRenderer ,
|
||||
kCGLPFANoRecovery ,
|
||||
kCGLPFAAccelerated ,
|
||||
kCGLPFAClosestPolicy ,
|
||||
kCGLPFARobust ,
|
||||
kCGLPFABackingStore ,
|
||||
kCGLPFAMPSafe ,
|
||||
kCGLPFAWindow ,
|
||||
kCGLPFAMultiScreen ,
|
||||
kCGLPFACompliant ,
|
||||
kCGLPFADisplayMask ,
|
||||
kCGLPFAPBuffer ,
|
||||
kCGLPFARemotePBuffer ,
|
||||
kCGLPFAAllowOfflineRenderers,
|
||||
kCGLPFAAcceleratedCompute,
|
||||
kCGLPFAOpenGLProfile ,
|
||||
kCGLPFAVirtualScreenCount
|
||||
);
|
||||
|
||||
type CGLRendererProperty is (kCGLRPOffScreen ,
|
||||
kCGLRPFullScreen ,
|
||||
kCGLRPRendererID ,
|
||||
kCGLRPAccelerated ,
|
||||
kCGLRPRobust ,
|
||||
kCGLRPBackingStore ,
|
||||
kCGLRPMPSafe ,
|
||||
kCGLRPWindow ,
|
||||
kCGLRPMultiScreen ,
|
||||
kCGLRPCompliant ,
|
||||
kCGLRPDisplayMask ,
|
||||
kCGLRPBufferModes ,
|
||||
kCGLRPColorModes ,
|
||||
kCGLRPAccumModes ,
|
||||
kCGLRPDepthModes ,
|
||||
kCGLRPStencilModes ,
|
||||
kCGLRPMaxAuxBuffers ,
|
||||
kCGLRPMaxSampleBuffers ,
|
||||
kCGLRPMaxSamples ,
|
||||
kCGLRPSampleModes ,
|
||||
kCGLRPSampleAlpha ,
|
||||
kCGLRPVideoMemory ,
|
||||
kCGLRPTextureMemory ,
|
||||
kCGLRPGPUVertProcCapable ,
|
||||
kCGLRPGPUFragProcCapable ,
|
||||
kCGLRPRendererCount ,
|
||||
kCGLRPOnline ,
|
||||
kCGLRPAcceleratedCompute ,
|
||||
kCGLRPVideoMemoryMegabytes ,
|
||||
kCGLRPTextureMemoryMegabytes
|
||||
);
|
||||
|
||||
type CGLContextEnable is (kCGLCESwapRectangle ,
|
||||
kCGLCESwapLimit ,
|
||||
kCGLCERasterization ,
|
||||
kCGLCEStateValidation,
|
||||
kCGLCESurfaceBackingSize,
|
||||
kCGLCEDisplayListOptimization,
|
||||
kCGLCEMPEngine ,
|
||||
kCGLCECrashOnRemovedFunctions
|
||||
);
|
||||
|
||||
type CGLContextParameter is (kCGLCPSwapRectangle ,
|
||||
kCGLCPSwapInterval ,
|
||||
kCGLCPDispatchTableSize ,
|
||||
kCGLCPClientStorage ,
|
||||
kCGLCPSurfaceTexture ,
|
||||
kCGLCPSurfaceOrder ,
|
||||
kCGLCPSurfaceOpacity ,
|
||||
kCGLCPSurfaceBackingSize ,
|
||||
kCGLCPSurfaceSurfaceVolatile,
|
||||
kCGLCPReclaimResources ,
|
||||
kCGLCPCurrentRendererID ,
|
||||
kCGLCPGPUVertexProcessing ,
|
||||
kCGLCPGPUFragmentProcessing ,
|
||||
kCGLCPHasDrawable ,
|
||||
kCGLCPMPSwapsInFlight
|
||||
);
|
||||
|
||||
type CGLGlobalOption is (kCGLGOFormatCacheSize ,
|
||||
kCGLGOClearFormatCache,
|
||||
kCGLGORetainRenderers ,
|
||||
kCGLGOResetLibrary ,
|
||||
kCGLGOUseErrorHandler ,
|
||||
kCGLGOUseBuildCache
|
||||
);
|
||||
|
||||
type CGLOpenGLProfile is (kCGLOGLPVersion_Legacy ,
|
||||
kCGLOGLPVersion_3_2_Core
|
||||
);
|
||||
|
||||
type CGLError is (kCGLNoError ,
|
||||
kCGLBadAttribute ,
|
||||
kCGLBadProperty ,
|
||||
kCGLBadPixelFormat ,
|
||||
kCGLBadRendererInfo ,
|
||||
kCGLBadContext ,
|
||||
kCGLBadDrawable ,
|
||||
kCGLBadDisplay ,
|
||||
kCGLBadState ,
|
||||
kCGLBadValue ,
|
||||
kCGLBadMatch ,
|
||||
kCGLBadEnumeration ,
|
||||
kCGLBadOffScreen ,
|
||||
kCGLBadFullScreen ,
|
||||
kCGLBadWindow ,
|
||||
kCGLBadAddress ,
|
||||
kCGLBadCodeModule ,
|
||||
kCGLBadAlloc ,
|
||||
kCGLBadConnection
|
||||
);
|
||||
|
||||
kCGLMonoscopicBit : constant := 16#00000001#;
|
||||
kCGLStereoscopicBit: constant := 16#00000002#;
|
||||
kCGLSingleBufferBit: constant := 16#00000004#;
|
||||
kCGLDoubleBufferBit: constant := 16#00000008#;
|
||||
kCGLTripleBufferBit: constant := 16#00000010#;
|
||||
kCGL0Bit : constant := 16#00000001#;
|
||||
kCGL1Bit : constant := 16#00000002#;
|
||||
kCGL2Bit : constant := 16#00000004#;
|
||||
kCGL3Bit : constant := 16#00000008#;
|
||||
kCGL4Bit : constant := 16#00000010#;
|
||||
kCGL5Bit : constant := 16#00000020#;
|
||||
kCGL6Bit : constant := 16#00000040#;
|
||||
kCGL8Bit : constant := 16#00000080#;
|
||||
kCGL10Bit : constant := 16#00000100#;
|
||||
kCGL12Bit : constant := 16#00000200#;
|
||||
kCGL16Bit : constant := 16#00000400#;
|
||||
kCGL24Bit : constant := 16#00000800#;
|
||||
kCGL32Bit : constant := 16#00001000#;
|
||||
kCGL48Bit : constant := 16#00002000#;
|
||||
kCGL64Bit : constant := 16#00004000#;
|
||||
kCGL96Bit : constant := 16#00008000#;
|
||||
kCGL128Bit : constant := 16#00010000#;
|
||||
kCGLRGB444Bit : constant := 16#00000040#;
|
||||
kCGLARGB4444Bit : constant := 16#00000080#;
|
||||
kCGLRGB444A8Bit : constant := 16#00000100#;
|
||||
kCGLRGB555Bit : constant := 16#00000200#;
|
||||
kCGLARGB1555Bit : constant := 16#00000400#;
|
||||
kCGLRGB555A8Bit : constant := 16#00000800#;
|
||||
kCGLRGB565Bit : constant := 16#00001000#;
|
||||
kCGLRGB565A8Bit : constant := 16#00002000#;
|
||||
kCGLRGB888Bit : constant := 16#00004000#;
|
||||
kCGLARGB8888Bit : constant := 16#00008000#;
|
||||
kCGLRGB888A8Bit : constant := 16#00010000#;
|
||||
kCGLRGB101010Bit : constant := 16#00020000#;
|
||||
kCGLARGB2101010Bit : constant := 16#00040000#;
|
||||
kCGLRGB101010_A8Bit: constant := 16#00080000#;
|
||||
kCGLRGB121212Bit : constant := 16#00100000#;
|
||||
kCGLARGB12121212Bit: constant := 16#00200000#;
|
||||
kCGLRGB161616Bit : constant := 16#00400000#;
|
||||
kCGLRGBA16161616Bit: constant := 16#00800000#;
|
||||
kCGLRGBFloat64Bit : constant := 16#01000000#;
|
||||
kCGLRGBAFloat64Bit : constant := 16#02000000#;
|
||||
kCGLRGBFloat128Bit : constant := 16#04000000#;
|
||||
kCGLRGBAFloat128Bit: constant := 16#08000000#;
|
||||
kCGLRGBFloat256Bit : constant := 16#10000000#;
|
||||
kCGLRGBAFloat256Bit: constant := 16#20000000#;
|
||||
|
||||
kCGLSupersampleBit : constant := 16#00000001#;
|
||||
kCGLMultisampleBit : constant := 16#00000002#;
|
||||
|
||||
type CGLPixelFormatAttribute_Array is array (Positive range <>) of
|
||||
aliased CGLPixelFormatAttribute;
|
||||
|
||||
|
||||
-- Pixel format functions
|
||||
|
||||
function CGLChoosePixelFormat (attribs : access CGLPixelFormatAttribute;
|
||||
pix : access CGLPixelFormatObject;
|
||||
npix : access GLint) return CGLError;
|
||||
|
||||
function CGLDestroyPixelFormat (pix : CGLPixelFormatObject) return CGLError;
|
||||
|
||||
function CGLDescribePixelFormat (pix : CGLPixelFormatObject; pix_num : GLint;
|
||||
attrib : CGLPixelFormatAttribute;
|
||||
value : access GLint) return CGLError;
|
||||
|
||||
procedure CGLReleasePixelFormat (pix : in CGLPixelFormatObject);
|
||||
|
||||
function CGLRetainPixelFormat (pix : CGLPixelFormatObject)
|
||||
return CGLPixelFormatObject;
|
||||
|
||||
function CGLGetPixelFormatRetainCount (pix : CGLPixelFormatObject)
|
||||
return GLuint;
|
||||
|
||||
function CGLQueryRendererInfo (display_mask : GLuint;
|
||||
rend : access CGLRendererInfoObject;
|
||||
nrend : access GLint) return CGLError;
|
||||
|
||||
function CGLDestroyRendererInfo (rend : CGLRendererInfoObject)
|
||||
return CGLError;
|
||||
|
||||
function CGLDescribeRenderer (rend : CGLRendererInfoObject; rend_num : GLint;
|
||||
prop : CGLRendererProperty;
|
||||
value : access GLint) return CGLError;
|
||||
|
||||
function CGLCreateContext (pix : CGLPixelFormatObject;
|
||||
share : CGLContextObject;
|
||||
ctx : access CGLContextObject) return CGLError;
|
||||
|
||||
function CGLDestroyContext (ctx : CGLContextObject) return CGLError;
|
||||
|
||||
function CGLCopyContext (src, dst : CGLContextObject;
|
||||
mask : GLbitfield) return CGLError;
|
||||
|
||||
function CGLRetainContext (ctx : CGLContextObject) return CGLContextObject;
|
||||
|
||||
procedure CGLReleaseContext (ctx : in CGLContextObject);
|
||||
|
||||
function CGLGetContextRetainCount (ctx : CGLContextObject) return GLuint;
|
||||
|
||||
function CGLGetPixelFormat (ctx : CGLContextObject) return CGLPixelFormatObject;
|
||||
|
||||
function CGLCreatePBuffer (width, height : GLsizei;
|
||||
target, internalFormat : GLenum;
|
||||
max_level : GLint;
|
||||
pbuffer : access CGLPBufferObject)
|
||||
return CGLError;
|
||||
|
||||
function CGLDestroyPBuffer (pbuffer : CGLPBufferObject) return CGLError;
|
||||
|
||||
function CGLDescribePBuffer (obj : CGLPBufferObject;
|
||||
width, height : access GLsizei;
|
||||
target, internalFormat : access GLenum;
|
||||
mipmap : access GLint) return CGLError;
|
||||
|
||||
function CGLTexImagePBuffer (ctx : CGLContextObject;
|
||||
pbuffer : CGLPBufferObject;
|
||||
source : GLenum) return CGLError;
|
||||
|
||||
function CGLRetainPBuffer (pbuffer : CGLPBufferObject)
|
||||
return CGLPBufferObject;
|
||||
|
||||
procedure CGLReleasePBuffer (pbuffer : in CGLPBufferObject);
|
||||
|
||||
function CGLGetPBufferRetainCount (pbuffer : CGLPBufferObject) return GLuint;
|
||||
|
||||
function CGLSetOffScreen (ctx : CGLContextObject;
|
||||
width, height : GLsizei;
|
||||
rowbytes : GLint;
|
||||
baseaddr : Interfaces.C.Extensions.void_ptr)
|
||||
return CGLError;
|
||||
|
||||
function CGLGetOffScreen (ctx : CGLContextObject;
|
||||
width, height : access GLsizei;
|
||||
rowbytes : access GLint;
|
||||
baseaddr : access Interfaces.C.Extensions.void_ptr)
|
||||
return CGLError;
|
||||
|
||||
function CGLSetFullScreen (ctx : CGLContextObject) return CGLError;
|
||||
|
||||
function CGLSetFullScreenOnDisplay (ctx : CGLContextObject;
|
||||
display_mask : GLuint) return CGLError;
|
||||
|
||||
function CGLSetPBuffer (ctx : CGLContextObject;
|
||||
pbuffer : CGLPBufferObject;
|
||||
face : GLenum;
|
||||
level, screen : GLint) return CGLError;
|
||||
|
||||
function CGLGetPBuffer (ctx : CGLContextObject;
|
||||
pbuffer : access CGLPBufferObject;
|
||||
face : access GLenum;
|
||||
level, screen : access GLint) return CGLError;
|
||||
|
||||
function CGLClearDrawable (ctx : CGLContextObject) return CGLError;
|
||||
|
||||
function CGLFlushDrawable (ctx : CGLContextObject) return CGLError;
|
||||
|
||||
function CGLEnable (ctx : CGLContextObject; pname : CGLContextEnable)
|
||||
return CGLError;
|
||||
|
||||
function CGLDisable (ctx : CGLContextObject; pname : CGLContextEnable)
|
||||
return CGLError;
|
||||
|
||||
function CGLIsEnabled (ctx : CGLContextObject; pname : CGLContextEnable;
|
||||
enable : access GLint) return CGLError;
|
||||
|
||||
function CGLSetParameter (ctx : CGLContextObject;
|
||||
pname : CGLContextParameter;
|
||||
params : access constant GLint) return CGLError;
|
||||
|
||||
function CGLGetParameter (ctx : CGLContextObject;
|
||||
pname : CGLContextParameter;
|
||||
params : access GLint) return CGLError;
|
||||
|
||||
function CGLSetVirtualScreen (ctx : CGLContextObject; screen : GLint)
|
||||
return CGLError;
|
||||
|
||||
function CGLGetVirtualScreen (ctx : CGLContextObject; screen : access GLint)
|
||||
return CGLError;
|
||||
|
||||
function CGLUpdateContext (ctx : CGLContextObject) return CGLError;
|
||||
|
||||
function CGLSetGlobalOption (pname : CGLGlobalOption;
|
||||
params : access constant GLint) return CGLError;
|
||||
|
||||
function CGLGetGlobalOption (pname : CGLGlobalOption;
|
||||
params : access GLint) return CGLError;
|
||||
|
||||
function CGLSetOption (pname : CGLGlobalOption; param : GLint)
|
||||
return CGLError;
|
||||
|
||||
function CGLGetOption (pname : CGLGlobalOption;
|
||||
param : access GLint) return CGLError;
|
||||
|
||||
function CGLLockContext (ctx : CGLContextObject) return CGLError;
|
||||
|
||||
function CGLUnlockContext (ctx : CGLContextObject) return CGLError;
|
||||
|
||||
procedure CGLGetVersion (majorvers, minorvers : out GLint);
|
||||
|
||||
function CGLErrorString (error : CGLError)
|
||||
return Interfaces.C.Strings.chars_ptr;
|
||||
|
||||
function CGLSetCurrentContext (ctx : CGLContextObject) return CGLError;
|
||||
|
||||
function CGLGetCurrentContext return CGLContextObject;
|
||||
|
||||
private
|
||||
C_Enum_Size : constant := 32;
|
||||
|
||||
for CGLPixelFormatAttribute use (Terminator => 0,
|
||||
kCGLPFAAllRenderers => 1,
|
||||
kCGLPFATripleBuffer => 3,
|
||||
kCGLPFADoubleBuffer => 5,
|
||||
kCGLPFAStereo => 6,
|
||||
kCGLPFAAuxBuffers => 7,
|
||||
kCGLPFAColorSize => 8,
|
||||
kCGLPFAAlphaSize => 11,
|
||||
kCGLPFADepthSize => 12,
|
||||
kCGLPFAStencilSize => 13,
|
||||
kCGLPFAAccumSize => 14,
|
||||
kCGLPFAMinimumPolicy => 51,
|
||||
kCGLPFAMaximumPolicy => 52,
|
||||
kCGLPFAOffScreen => 53,
|
||||
kCGLPFAFullScreen => 54,
|
||||
kCGLPFASampleBuffers => 55,
|
||||
kCGLPFASamples => 56,
|
||||
kCGLPFAAuxDepthStencil => 57,
|
||||
kCGLPFAColorFloat => 58,
|
||||
kCGLPFAMultisample => 59,
|
||||
kCGLPFASupersample => 60,
|
||||
kCGLPFASampleAlpha => 61,
|
||||
|
||||
kCGLPFARendererID => 70,
|
||||
kCGLPFASingleRenderer => 71,
|
||||
kCGLPFANoRecovery => 72,
|
||||
kCGLPFAAccelerated => 73,
|
||||
kCGLPFAClosestPolicy => 74,
|
||||
kCGLPFARobust => 75,
|
||||
kCGLPFABackingStore => 76,
|
||||
kCGLPFAMPSafe => 78,
|
||||
kCGLPFAWindow => 80,
|
||||
kCGLPFAMultiScreen => 81,
|
||||
kCGLPFACompliant => 83,
|
||||
kCGLPFADisplayMask => 84,
|
||||
kCGLPFAPBuffer => 90,
|
||||
kCGLPFARemotePBuffer => 91,
|
||||
kCGLPFAAllowOfflineRenderers => 96,
|
||||
kCGLPFAAcceleratedCompute => 97,
|
||||
kCGLPFAOpenGLProfile => 99,
|
||||
kCGLPFAVirtualScreenCount => 128
|
||||
);
|
||||
for CGLPixelFormatAttribute'Size use C_Enum_Size;
|
||||
pragma Convention (C, CGLPixelFormatAttribute);
|
||||
|
||||
for CGLRendererProperty use (kCGLRPOffScreen => 53,
|
||||
kCGLRPFullScreen => 54,
|
||||
kCGLRPRendererID => 70,
|
||||
kCGLRPAccelerated => 73,
|
||||
kCGLRPRobust => 75,
|
||||
kCGLRPBackingStore => 76,
|
||||
kCGLRPMPSafe => 78,
|
||||
kCGLRPWindow => 80,
|
||||
kCGLRPMultiScreen => 81,
|
||||
kCGLRPCompliant => 83,
|
||||
kCGLRPDisplayMask => 84,
|
||||
kCGLRPBufferModes => 100,
|
||||
kCGLRPColorModes => 103,
|
||||
kCGLRPAccumModes => 104,
|
||||
kCGLRPDepthModes => 105,
|
||||
kCGLRPStencilModes => 106,
|
||||
kCGLRPMaxAuxBuffers => 107,
|
||||
kCGLRPMaxSampleBuffers => 108,
|
||||
kCGLRPMaxSamples => 109,
|
||||
kCGLRPSampleModes => 110,
|
||||
kCGLRPSampleAlpha => 111,
|
||||
kCGLRPVideoMemory => 120,
|
||||
kCGLRPTextureMemory => 121,
|
||||
kCGLRPGPUVertProcCapable => 122,
|
||||
kCGLRPGPUFragProcCapable => 123,
|
||||
kCGLRPRendererCount => 128,
|
||||
kCGLRPOnline => 129,
|
||||
kCGLRPAcceleratedCompute => 130,
|
||||
kCGLRPVideoMemoryMegabytes => 131,
|
||||
kCGLRPTextureMemoryMegabytes => 132
|
||||
);
|
||||
for CGLRendererProperty'Size use C_Enum_Size;
|
||||
pragma Convention (C, CGLRendererProperty);
|
||||
|
||||
for CGLContextEnable use (kCGLCESwapRectangle => 201,
|
||||
kCGLCESwapLimit => 203,
|
||||
kCGLCERasterization => 221,
|
||||
kCGLCEStateValidation => 301,
|
||||
kCGLCESurfaceBackingSize => 305,
|
||||
kCGLCEDisplayListOptimization => 307,
|
||||
kCGLCEMPEngine => 313,
|
||||
kCGLCECrashOnRemovedFunctions => 316
|
||||
);
|
||||
for CGLContextEnable'Size use C_Enum_Size;
|
||||
pragma Convention (C, CGLContextEnable);
|
||||
|
||||
for CGLContextParameter use (kCGLCPSwapRectangle => 200,
|
||||
kCGLCPSwapInterval => 222,
|
||||
kCGLCPDispatchTableSize => 224,
|
||||
kCGLCPClientStorage => 226,
|
||||
kCGLCPSurfaceTexture => 228,
|
||||
kCGLCPSurfaceOrder => 235,
|
||||
kCGLCPSurfaceOpacity => 236,
|
||||
kCGLCPSurfaceBackingSize => 304,
|
||||
kCGLCPSurfaceSurfaceVolatile => 306,
|
||||
kCGLCPReclaimResources => 308,
|
||||
kCGLCPCurrentRendererID => 309,
|
||||
kCGLCPGPUVertexProcessing => 310,
|
||||
kCGLCPGPUFragmentProcessing => 311,
|
||||
kCGLCPHasDrawable => 314,
|
||||
kCGLCPMPSwapsInFlight => 315
|
||||
);
|
||||
for CGLContextParameter'Size use C_Enum_Size;
|
||||
pragma Convention (C, CGLContextParameter);
|
||||
|
||||
for CGLGlobalOption use (kCGLGOFormatCacheSize => 501,
|
||||
kCGLGOClearFormatCache => 502,
|
||||
kCGLGORetainRenderers => 503,
|
||||
kCGLGOResetLibrary => 504,
|
||||
kCGLGOUseErrorHandler => 505,
|
||||
kCGLGOUseBuildCache => 506
|
||||
);
|
||||
for CGLGlobalOption'Size use C_Enum_Size;
|
||||
pragma Convention (C, CGLGlobalOption);
|
||||
|
||||
for CGLOpenGLProfile use (kCGLOGLPVersion_Legacy => 16#1000#,
|
||||
kCGLOGLPVersion_3_2_Core => 16#3200#
|
||||
);
|
||||
for CGLOpenGLProfile'Size use C_Enum_Size;
|
||||
pragma Convention (C, CGLOpenGLProfile);
|
||||
|
||||
for CGLError use (kCGLNoError => 0,
|
||||
kCGLBadAttribute => 10000,
|
||||
kCGLBadProperty => 10001,
|
||||
kCGLBadPixelFormat => 10002,
|
||||
kCGLBadRendererInfo => 10003,
|
||||
kCGLBadContext => 10004,
|
||||
kCGLBadDrawable => 10005,
|
||||
kCGLBadDisplay => 10006,
|
||||
kCGLBadState => 10007,
|
||||
kCGLBadValue => 10008,
|
||||
kCGLBadMatch => 10009,
|
||||
kCGLBadEnumeration => 10010,
|
||||
kCGLBadOffScreen => 10011,
|
||||
kCGLBadFullScreen => 10012,
|
||||
kCGLBadWindow => 10013,
|
||||
kCGLBadAddress => 10014,
|
||||
kCGLBadCodeModule => 10015,
|
||||
kCGLBadAlloc => 10016,
|
||||
kCGLBadConnection => 10017
|
||||
);
|
||||
for CGLError'Size use C_Enum_Size;
|
||||
pragma Convention (C, CGLError);
|
||||
|
||||
pragma Import (C, CGLChoosePixelFormat, "CGLChoosePixelFormat");
|
||||
pragma Import (C, CGLDestroyPixelFormat, "CGLDestroyPixelFormat");
|
||||
pragma Import (C, CGLDescribePixelFormat, "CGLDescribePixelFormat");
|
||||
pragma Import (C, CGLReleasePixelFormat, "CGLReleasePixelFormat");
|
||||
pragma Import (C, CGLRetainPixelFormat, "CGLRetainPixelFormat");
|
||||
pragma Import (C, CGLGetPixelFormatRetainCount, "CGLGetPixelFormatRetainCount");
|
||||
|
||||
pragma Import (C, CGLQueryRendererInfo, "CGLQueryRendererInfo");
|
||||
pragma Import (C, CGLDestroyRendererInfo, "CGLDestroyRendererInfo");
|
||||
pragma Import (C, CGLDescribeRenderer, "CGLDescribeRenderer");
|
||||
|
||||
pragma Import (C, CGLCreateContext, "CGLCreateContext");
|
||||
pragma Import (C, CGLDestroyContext, "CGLDestroyContext");
|
||||
pragma Import (C, CGLCopyContext, "CGLCopyContext");
|
||||
pragma Import (C, CGLRetainContext, "CGLRetainContext");
|
||||
pragma Import (C, CGLReleaseContext, "CGLReleaseContext");
|
||||
pragma Import (C, CGLGetContextRetainCount, "CGLGetContextRetainCount");
|
||||
pragma Import (C, CGLGetPixelFormat, "CGLGetPixelFormat");
|
||||
|
||||
pragma Import (C, CGLCreatePBuffer, "CGLCreatePBuffer");
|
||||
pragma Import (C, CGLDestroyPBuffer, "CGLDestroyPBuffer");
|
||||
pragma Import (C, CGLDescribePBuffer, "CGLDescribePBuffer");
|
||||
pragma Import (C, CGLTexImagePBuffer, "CGLTexImagePBuffer");
|
||||
pragma Import (C, CGLRetainPBuffer, "CGLRetainPBuffer");
|
||||
pragma Import (C, CGLReleasePBuffer, "CGLReleasePBuffer");
|
||||
pragma Import (C, CGLGetPBufferRetainCount, "CGLGetPBufferRetainCount");
|
||||
|
||||
pragma Import (C, CGLSetOffScreen, "CGLSetOffScreen");
|
||||
pragma Import (C, CGLGetOffScreen, "CGLGetOffScreen");
|
||||
pragma Import (C, CGLSetFullScreen, "CGLSetFullScreen");
|
||||
pragma Import (C, CGLSetFullScreenOnDisplay, "CGLSetFullScreenOnDisplay");
|
||||
pragma Import (C, CGLSetPBuffer, "CGLSetPBuffer");
|
||||
pragma Import (C, CGLGetPBuffer, "CGLGetPBuffer");
|
||||
pragma Import (C, CGLClearDrawable, "CGLClearDrawable");
|
||||
pragma Import (C, CGLFlushDrawable, "CGLFlushDrawable");
|
||||
|
||||
pragma Import (C, CGLEnable, "CGLEnable");
|
||||
pragma Import (C, CGLDisable, "CGLDisable");
|
||||
pragma Import (C, CGLIsEnabled, "CGLIsEnabled");
|
||||
pragma Import (C, CGLSetParameter, "CGLSetParameter");
|
||||
pragma Import (C, CGLGetParameter, "CGLGetParameter");
|
||||
|
||||
pragma Import (C, CGLSetVirtualScreen, "CGLSetVirtualScreen");
|
||||
pragma Import (C, CGLGetVirtualScreen, "CGLGetVirtualScreen");
|
||||
pragma Import (C, CGLUpdateContext, "CGLUpdateContext");
|
||||
|
||||
pragma Import (C, CGLSetGlobalOption, "CGLSetGlobalOption");
|
||||
pragma Import (C, CGLGetGlobalOption, "CGLGetGlobalOption");
|
||||
pragma Import (C, CGLSetOption, "CGLSetOption");
|
||||
pragma Import (C, CGLGetOption, "CGLGetOption");
|
||||
|
||||
pragma Import (C, CGLLockContext, "CGLLockContext");
|
||||
pragma Import (C, CGLUnlockContext, "CGLUnlockContext");
|
||||
|
||||
|
||||
pragma Import (C, CGLGetVersion, "CGLGetVersion");
|
||||
pragma Import (C, CGLErrorString, "CGLErrorString");
|
||||
|
||||
pragma Import (C, CGLSetCurrentContext, "CGLSetCurrentContext");
|
||||
pragma Import (C, CGLGetCurrentContext, "CGLGetCurrentContext");
|
||||
end GL.CGL;
|
||||
151
3-mid/opengl/private/gl/source/gl-binding.ads
Normal file
151
3-mid/opengl/private/gl/source/gl-binding.ads
Normal file
@@ -0,0 +1,151 @@
|
||||
package gl.Binding
|
||||
--
|
||||
-- Provides functions common to all openGL profiles.
|
||||
--
|
||||
is
|
||||
|
||||
procedure glActiveTexture (Texture : in GLenum);
|
||||
procedure glBindTexture (Target : in GLenum;
|
||||
Texture : in GLuint);
|
||||
procedure glBlendFunc (sFactor : in GLenum;
|
||||
dFactor : in GLenum);
|
||||
procedure glClear (Mask : in GLbitfield);
|
||||
procedure glClearColor (Red : in GLclampf;
|
||||
Green : in GLclampf;
|
||||
Blue : in GLclampf;
|
||||
Alpha : in GLclampf);
|
||||
procedure glClearDepthf (Depth : in GLclampf);
|
||||
procedure glClearStencil (S : in GLint);
|
||||
procedure glColorMask (Red : in GLboolean;
|
||||
Green : in GLboolean;
|
||||
Blue : in GLboolean;
|
||||
Alpha : in GLboolean);
|
||||
procedure glCullFace (Mode : in GLenum);
|
||||
procedure glDepthFunc (Func : in GLenum);
|
||||
procedure glDepthMask (Flag : in GLboolean);
|
||||
procedure glDepthRangef (zNear : in GLclampf;
|
||||
zFar : in GLclampf);
|
||||
procedure glDisable (Cap : in GLenum);
|
||||
procedure glDrawArrays (Mode : in GLenum;
|
||||
First : in GLint;
|
||||
Count : in GLsizei);
|
||||
procedure glDrawElements (Mode : in GLenum;
|
||||
Count : in GLsizei;
|
||||
the_Type : in GLenum;
|
||||
Indices : access GLvoid);
|
||||
procedure glEnable (Cap : in GLenum);
|
||||
procedure glFinish;
|
||||
procedure glFlush;
|
||||
procedure glFrontFace (Mode : in GLenum);
|
||||
procedure glGenTextures (N : in GLsizei;
|
||||
Textures : access GLuint);
|
||||
function glGetError return GLenum;
|
||||
procedure glGetBooleanv (pName : in GLenum;
|
||||
Params : access GLboolean);
|
||||
procedure glGetFloatv (pName : in GLenum;
|
||||
Params : access GLfloat);
|
||||
procedure glGetIntegerv (pName : in GLenum;
|
||||
Params : access GLint);
|
||||
function glGetString (Name : in GLenum) return access GLubyte;
|
||||
procedure glGetTexParameteriv
|
||||
(Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : access GLint);
|
||||
procedure glHint (Target : in GLenum;
|
||||
Mode : in GLenum);
|
||||
function glIsEnabled (Cap : in GLenum) return GLboolean;
|
||||
procedure glLineWidth (Width : in GLfloat);
|
||||
procedure glPixelStorei (pName : in GLenum;
|
||||
Param : in GLint);
|
||||
procedure glPolygonOffset (Factor : in GLfloat;
|
||||
Units : in GLfloat);
|
||||
procedure glReadPixels (X : in GLint;
|
||||
Y : in GLint;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei;
|
||||
Format : in GLenum;
|
||||
the_Type : in GLenum;
|
||||
Pixels : access GLvoid);
|
||||
procedure glScissor (X : in GLint;
|
||||
Y : in GLint;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei);
|
||||
procedure glStencilFunc (Func : in GLenum;
|
||||
Ref : in GLint;
|
||||
Mask : in GLuint);
|
||||
procedure glStencilMask (Mask : in GLuint);
|
||||
procedure glStencilOp (Fail : in GLenum;
|
||||
zFail : in GLenum;
|
||||
zPass : in GLenum);
|
||||
procedure glTexImage2D (Target : in GLenum;
|
||||
Level : in GLint;
|
||||
internalFormat
|
||||
: in GLenum;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei;
|
||||
Border : in GLint;
|
||||
Format : in GLenum;
|
||||
the_Type : in GLenum;
|
||||
Pixels : access GLvoid);
|
||||
procedure glTexSubImage2D (Target : in GLenum;
|
||||
Level : in GLint;
|
||||
xOffset : in GLint;
|
||||
yOffset : in GLint;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei;
|
||||
Format : in GLenum;
|
||||
the_Type : in GLenum;
|
||||
Pixels : access GLvoid);
|
||||
procedure glTexParameteri (Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Param : in GLint);
|
||||
procedure glViewport (X : in GLint;
|
||||
Y : in GLint;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei);
|
||||
|
||||
|
||||
private
|
||||
|
||||
pragma Import (StdCall, glActiveTexture, "glActiveTexture");
|
||||
pragma Import (Stdcall, glBindTexture, "glBindTexture");
|
||||
pragma Import (Stdcall, glBlendFunc, "glBlendFunc");
|
||||
pragma Import (Stdcall, glClear, "glClear");
|
||||
pragma Import (Stdcall, glClearColor, "glClearColor");
|
||||
pragma Import (Stdcall, glClearDepthf, "glClearDepthf");
|
||||
pragma Import (Stdcall, glClearStencil, "glClearStencil");
|
||||
pragma Import (Stdcall, glColorMask, "glColorMask");
|
||||
pragma Import (Stdcall, glCullFace, "glCullFace");
|
||||
pragma Import (Stdcall, glDepthFunc, "glDepthFunc");
|
||||
pragma Import (Stdcall, glDepthMask, "glDepthMask");
|
||||
pragma Import (Stdcall, glDepthRangef, "glDepthRangef");
|
||||
pragma Import (Stdcall, glDisable, "glDisable");
|
||||
pragma Import (Stdcall, glDrawArrays, "glDrawArrays");
|
||||
pragma Import (Stdcall, glDrawElements, "glDrawElements");
|
||||
pragma Import (Stdcall, glEnable, "glEnable");
|
||||
pragma Import (Stdcall, glFinish, "glFinish");
|
||||
pragma Import (Stdcall, glFlush, "glFlush");
|
||||
pragma Import (Stdcall, glFrontFace, "glFrontFace");
|
||||
pragma Import (Stdcall, glGenTextures, "glGenTextures");
|
||||
pragma Import (Stdcall, glGetError, "glGetError");
|
||||
pragma Import (StdCall, glGetBooleanv, "glGetBooleanv");
|
||||
pragma Import (StdCall, glGetFloatv, "glGetFloatv");
|
||||
pragma Import (StdCall, glGetIntegerv, "glGetIntegerv");
|
||||
pragma Import (StdCall, glGetString, "glGetString");
|
||||
pragma Import (StdCall, glGetTexParameteriv, "glGetTexParameteriv");
|
||||
pragma Import (Stdcall, glHint, "glHint");
|
||||
pragma Import (Stdcall, glIsEnabled, "glIsEnabled");
|
||||
pragma Import (Stdcall, glLineWidth, "glLineWidth");
|
||||
pragma Import (Stdcall, glPixelStorei, "glPixelStorei");
|
||||
pragma Import (Stdcall, glPolygonOffset, "glPolygonOffset");
|
||||
pragma Import (StdCall, glReadPixels, "glReadPixels");
|
||||
pragma Import (Stdcall, glScissor, "glScissor");
|
||||
pragma Import (Stdcall, glStencilFunc, "glStencilFunc");
|
||||
pragma Import (Stdcall, glStencilMask, "glStencilMask");
|
||||
pragma Import (Stdcall, glStencilOp, "glStencilOp");
|
||||
pragma Import (StdCall, glTexImage2D, "glTexImage2D");
|
||||
pragma Import (StdCall, glTexSubImage2D, "glTexSubImage2D");
|
||||
pragma Import (Stdcall, glTexParameteri, "glTexParameteri");
|
||||
pragma Import (Stdcall, glViewport, "glViewport");
|
||||
|
||||
end gl.Binding;
|
||||
2030
3-mid/opengl/private/gl/source/gl-desk.ads
Normal file
2030
3-mid/opengl/private/gl/source/gl-desk.ads
Normal file
File diff suppressed because it is too large
Load Diff
626
3-mid/opengl/private/gl/source/gl-lean.ads
Normal file
626
3-mid/opengl/private/gl/source/gl-lean.ads
Normal file
@@ -0,0 +1,626 @@
|
||||
with
|
||||
Interfaces.C.Pointers,
|
||||
System;
|
||||
|
||||
package GL.lean
|
||||
--
|
||||
-- Provides types, constants and functions specific to the openGL 'Embedded' profile.
|
||||
--
|
||||
is
|
||||
---------
|
||||
-- Types
|
||||
--
|
||||
|
||||
subtype GLchar is GL_Types.GLchar;
|
||||
subtype GLfixed is GL_Types.GLfixed;
|
||||
|
||||
type GLintptr is new Integer;
|
||||
type GLsizeiptr is new Integer;
|
||||
|
||||
|
||||
-- GLchar_Pointer
|
||||
--
|
||||
type GLchar_array is array (C.size_t range <>) of aliased GLchar;
|
||||
package GLchar_Pointers is new C.Pointers (Index => C.size_t,
|
||||
Element => GLchar,
|
||||
Element_Array => GLchar_array,
|
||||
Default_Terminator => C.nul);
|
||||
subtype GLchar_Pointer is GLchar_Pointers.Pointer;
|
||||
|
||||
subtype GLfloat_Address is system.Address;
|
||||
|
||||
|
||||
-------------
|
||||
-- Constants
|
||||
--
|
||||
|
||||
GL_ACTIVE_ATTRIBUTES : constant := 16#8B89#;
|
||||
GL_ACTIVE_ATTRIBUTE_MAX_LENGTH : constant := 16#8B8A#;
|
||||
GL_ACTIVE_UNIFORMS : constant := 16#8B86#;
|
||||
GL_ACTIVE_UNIFORM_MAX_LENGTH : constant := 16#8B87#;
|
||||
GL_ARRAY_BUFFER : constant := 16#8892#;
|
||||
GL_ARRAY_BUFFER_BINDING : constant := 16#8894#;
|
||||
GL_ATTACHED_SHADERS : constant := 16#8B85#;
|
||||
GL_BLEND_COLOR : constant := 16#8005#;
|
||||
GL_BLEND_DST_ALPHA : constant := 16#80CA#;
|
||||
GL_BLEND_DST_RGB : constant := 16#80C8#;
|
||||
GL_BLEND_EQUATION : constant := 16#8009#;
|
||||
GL_BLEND_EQUATION_ALPHA : constant := 16#883D#;
|
||||
GL_BLEND_EQUATION_RGB : constant := 16#8009#; -- Same as BLEND_EQUATION.
|
||||
GL_BLEND_SRC_ALPHA : constant := 16#80CB#;
|
||||
GL_BLEND_SRC_RGB : constant := 16#80C9#;
|
||||
GL_BOOL : constant := 16#8B56#;
|
||||
GL_BOOL_VEC2 : constant := 16#8B57#;
|
||||
GL_BOOL_VEC3 : constant := 16#8B58#;
|
||||
GL_BOOL_VEC4 : constant := 16#8B59#;
|
||||
GL_BUFFER_SIZE : constant := 16#8764#;
|
||||
GL_BUFFER_USAGE : constant := 16#8765#;
|
||||
GL_COLOR_ATTACHMENT0 : constant := 16#8CE0#;
|
||||
GL_COMPILE_STATUS : constant := 16#8B81#;
|
||||
GL_COMPRESSED_TEXTURE_FORMATS : constant := 16#86A3#;
|
||||
GL_CONSTANT_ALPHA : constant := 16#8003#;
|
||||
GL_CONSTANT_COLOR : constant := 16#8001#;
|
||||
GL_CURRENT_PROGRAM : constant := 16#8B8D#;
|
||||
GL_CURRENT_VERTEX_ATTRIB : constant := 16#8626#;
|
||||
GL_DECR_WRAP : constant := 16#8508#;
|
||||
GL_DELETE_STATUS : constant := 16#8B80#;
|
||||
GL_DEPTH_ATTACHMENT : constant := 16#8D00#;
|
||||
GL_DEPTH_COMPONENT : constant := 16#1902#;
|
||||
GL_DEPTH_COMPONENT16 : constant := 16#81A5#;
|
||||
GL_DITHER : constant := 16#0BD0#;
|
||||
GL_DST_ALPHA : constant := 16#0304#;
|
||||
GL_DST_COLOR : constant := 16#0306#;
|
||||
GL_DYNAMIC_DRAW : constant := 16#88E8#;
|
||||
GL_ELEMENT_ARRAY_BUFFER : constant := 16#8893#;
|
||||
GL_ELEMENT_ARRAY_BUFFER_BINDING : constant := 16#8895#;
|
||||
GL_ES_VERSION_2_0 : constant := 1;
|
||||
GL_FIXED : constant := 16#140C#;
|
||||
GL_FLOAT_MAT2 : constant := 16#8B5A#;
|
||||
GL_FLOAT_MAT3 : constant := 16#8B5B#;
|
||||
GL_FLOAT_MAT4 : constant := 16#8B5C#;
|
||||
GL_FLOAT_VEC2 : constant := 16#8B50#;
|
||||
GL_FLOAT_VEC3 : constant := 16#8B51#;
|
||||
GL_FLOAT_VEC4 : constant := 16#8B52#;
|
||||
GL_FRAGMENT_SHADER : constant := 16#8B30#;
|
||||
GL_FRAMEBUFFER : constant := 16#8D40#;
|
||||
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : constant := 16#8CD1#;
|
||||
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : constant := 16#8CD0#;
|
||||
GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
|
||||
: constant := 16#8CD3#;
|
||||
GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
|
||||
: constant := 16#8CD2#;
|
||||
GL_FRAMEBUFFER_BINDING : constant := 16#8CA6#;
|
||||
GL_FRAMEBUFFER_COMPLETE : constant := 16#8CD5#;
|
||||
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT : constant := 16#8CD6#;
|
||||
GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS : constant := 16#8CD9#;
|
||||
GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
|
||||
: constant := 16#8CD7#;
|
||||
GL_FRAMEBUFFER_UNSUPPORTED : constant := 16#8CDD#;
|
||||
GL_FUNC_ADD : constant := 16#8006#;
|
||||
GL_FUNC_REVERSE_SUBTRACT : constant := 16#800B#;
|
||||
GL_FUNC_SUBTRACT : constant := 16#800A#;
|
||||
GL_GENERATE_MIPMAP_HINT : constant := 16#8192#;
|
||||
GL_HIGH_FLOAT : constant := 16#8DF2#;
|
||||
GL_HIGH_INT : constant := 16#8DF5#;
|
||||
GL_IMPLEMENTATION_COLOR_READ_FORMAT : constant := 16#8B9B#;
|
||||
GL_IMPLEMENTATION_COLOR_READ_TYPE : constant := 16#8B9A#;
|
||||
GL_INCR_WRAP : constant := 16#8507#;
|
||||
GL_INFO_LOG_LENGTH : constant := 16#8B84#;
|
||||
GL_INT_VEC2 : constant := 16#8B53#;
|
||||
GL_INT_VEC3 : constant := 16#8B54#;
|
||||
GL_INT_VEC4 : constant := 16#8B55#;
|
||||
GL_INVALID_FRAMEBUFFER_OPERATION : constant := 16#0506#;
|
||||
GL_LINK_STATUS : constant := 16#8B82#;
|
||||
GL_LOW_FLOAT : constant := 16#8DF0#;
|
||||
GL_LOW_INT : constant := 16#8DF3#;
|
||||
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS : constant := 16#8B4D#;
|
||||
GL_MAX_CUBE_MAP_TEXTURE_SIZE : constant := 16#851C#;
|
||||
GL_MAX_FRAGMENT_UNIFORM_VECTORS : constant := 16#8DFD#;
|
||||
GL_MAX_RENDERBUFFER_SIZE : constant := 16#84E8#;
|
||||
GL_MAX_TEXTURE_IMAGE_UNITS : constant := 16#8872#;
|
||||
GL_MAX_VARYING_VECTORS : constant := 16#8DFC#;
|
||||
GL_MAX_VERTEX_ATTRIBS : constant := 16#8869#;
|
||||
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS : constant := 16#8B4C#;
|
||||
GL_MAX_VERTEX_UNIFORM_VECTORS : constant := 16#8DFB#;
|
||||
GL_MEDIUM_FLOAT : constant := 16#8DF1#;
|
||||
GL_MEDIUM_INT : constant := 16#8DF4#;
|
||||
GL_MIRRORED_REPEAT : constant := 16#8370#;
|
||||
GL_NONE : constant := 0;
|
||||
GL_NUM_COMPRESSED_TEXTURE_FORMATS : constant := 16#86A2#;
|
||||
GL_NUM_SHADER_BINARY_FORMATS : constant := 16#8DF9#;
|
||||
GL_ONE_MINUS_CONSTANT_ALPHA : constant := 16#8004#;
|
||||
GL_ONE_MINUS_CONSTANT_COLOR : constant := 16#8002#;
|
||||
GL_ONE_MINUS_DST_ALPHA : constant := 16#0305#;
|
||||
GL_ONE_MINUS_DST_COLOR : constant := 16#0307#;
|
||||
GL_ONE_MINUS_SRC_COLOR : constant := 16#0301#;
|
||||
GL_RENDERBUFFER : constant := 16#8D41#;
|
||||
GL_RENDERBUFFER_ALPHA_SIZE : constant := 16#8D53#;
|
||||
GL_RENDERBUFFER_BINDING : constant := 16#8CA7#;
|
||||
GL_RENDERBUFFER_BLUE_SIZE : constant := 16#8D52#;
|
||||
GL_RENDERBUFFER_DEPTH_SIZE : constant := 16#8D54#;
|
||||
GL_RENDERBUFFER_GREEN_SIZE : constant := 16#8D51#;
|
||||
GL_RENDERBUFFER_HEIGHT : constant := 16#8D43#;
|
||||
GL_RENDERBUFFER_INTERNAL_FORMAT : constant := 16#8D44#;
|
||||
GL_RENDERBUFFER_RED_SIZE : constant := 16#8D50#;
|
||||
GL_RENDERBUFFER_STENCIL_SIZE : constant := 16#8D55#;
|
||||
GL_RENDERBUFFER_WIDTH : constant := 16#8D42#;
|
||||
GL_RGB565 : constant := 16#8D62#;
|
||||
GL_RGB5_A1 : constant := 16#8057#;
|
||||
GL_RGBA4 : constant := 16#8056#;
|
||||
GL_SAMPLER_2D : constant := 16#8B5E#;
|
||||
GL_SAMPLER_CUBE : constant := 16#8B60#;
|
||||
GL_SAMPLES : constant := 16#80A9#;
|
||||
GL_SAMPLE_ALPHA_TO_COVERAGE : constant := 16#809E#;
|
||||
GL_SAMPLE_BUFFERS : constant := 16#80A8#;
|
||||
GL_SAMPLE_COVERAGE : constant := 16#80A0#;
|
||||
GL_SAMPLE_COVERAGE_INVERT : constant := 16#80AB#;
|
||||
GL_SAMPLE_COVERAGE_VALUE : constant := 16#80AA#;
|
||||
GL_SHADER_BINARY_FORMATS : constant := 16#8DF8#;
|
||||
GL_SHADER_COMPILER : constant := 16#8DFA#;
|
||||
GL_SHADER_SOURCE_LENGTH : constant := 16#8B88#;
|
||||
GL_SHADER_TYPE : constant := 16#8B4F#;
|
||||
GL_SHADING_LANGUAGE_VERSION : constant := 16#8B8C#;
|
||||
GL_SHORT : constant := 16#1402#;
|
||||
GL_SRC_COLOR : constant := 16#0300#;
|
||||
GL_STATIC_DRAW : constant := 16#88E4#;
|
||||
GL_STENCIL_ATTACHMENT : constant := 16#8D20#;
|
||||
GL_STENCIL_BACK_FAIL : constant := 16#8801#;
|
||||
GL_STENCIL_BACK_FUNC : constant := 16#8800#;
|
||||
GL_STENCIL_BACK_PASS_DEPTH_FAIL : constant := 16#8802#;
|
||||
GL_STENCIL_BACK_PASS_DEPTH_PASS : constant := 16#8803#;
|
||||
GL_STENCIL_BACK_REF : constant := 16#8CA3#;
|
||||
GL_STENCIL_BACK_VALUE_MASK : constant := 16#8CA4#;
|
||||
GL_STENCIL_BACK_WRITEMASK : constant := 16#8CA5#;
|
||||
GL_STENCIL_INDEX8 : constant := 16#8D48#;
|
||||
GL_STREAM_DRAW : constant := 16#88E0#;
|
||||
GL_TEXTURE : constant := 16#1702#;
|
||||
GL_TEXTURE_BINDING_CUBE_MAP : constant := 16#8514#;
|
||||
GL_TEXTURE_CUBE_MAP : constant := 16#8513#;
|
||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_X : constant := 16#8516#;
|
||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_Y : constant := 16#8518#;
|
||||
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z : constant := 16#851A#;
|
||||
GL_TEXTURE_CUBE_MAP_POSITIVE_X : constant := 16#8515#;
|
||||
GL_TEXTURE_CUBE_MAP_POSITIVE_Y : constant := 16#8517#;
|
||||
GL_TEXTURE_CUBE_MAP_POSITIVE_Z : constant := 16#8519#;
|
||||
GL_UNSIGNED_SHORT : constant := 16#1403#;
|
||||
GL_UNSIGNED_SHORT_4_4_4_4 : constant := 16#8033#;
|
||||
GL_UNSIGNED_SHORT_5_5_5_1 : constant := 16#8034#;
|
||||
GL_UNSIGNED_SHORT_5_6_5 : constant := 16#8363#;
|
||||
GL_VALIDATE_STATUS : constant := 16#8B83#;
|
||||
GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : constant := 16#889F#;
|
||||
GL_VERTEX_ATTRIB_ARRAY_ENABLED : constant := 16#8622#;
|
||||
GL_VERTEX_ATTRIB_ARRAY_NORMALIZED : constant := 16#886A#;
|
||||
GL_VERTEX_ATTRIB_ARRAY_Pointer : constant := 16#8645#;
|
||||
GL_VERTEX_ATTRIB_ARRAY_Size : constant := 16#8623#;
|
||||
GL_VERTEX_ATTRIB_ARRAY_STRIDE : constant := 16#8624#;
|
||||
GL_VERTEX_ATTRIB_ARRAY_TYPE : constant := 16#8625#;
|
||||
GL_VERTEX_SHADER : constant := 16#8B31#;
|
||||
|
||||
|
||||
-------------
|
||||
-- Functions
|
||||
--
|
||||
|
||||
procedure glAttachShader (Program : in GLuint;
|
||||
Shader : in GLuint);
|
||||
procedure glBindAttribLocation (Program : in GLuint;
|
||||
Index : in GLuint;
|
||||
Name : access GLchar);
|
||||
procedure glBindBuffer (Target : in GLenum;
|
||||
Buffer : in GLuint);
|
||||
procedure glBindFramebuffer (Target : in GLenum;
|
||||
FrameBuffer : in GLuint);
|
||||
procedure glBindRenderbuffer (Target : in GLenum;
|
||||
RenderBuffer : in GLuint);
|
||||
procedure glBlendColor (Red : in GLclampf;
|
||||
Green : in GLclampf;
|
||||
Blue : in GLclampf;
|
||||
Alpha : in GLclampf);
|
||||
procedure glBlendEquation (Mode : in GLenum);
|
||||
procedure glBlendEquationSeparate (modeRGB : in GLenum;
|
||||
modeAlpha : in GLenum);
|
||||
procedure glBlendFuncSeparate (srcRGB : in GLenum;
|
||||
dstRGB : in GLenum;
|
||||
srcAlpha : in GLenum;
|
||||
dstAlpha : in GLenum);
|
||||
procedure glBufferData (Target : in GLenum;
|
||||
Size : in GLsizeiptr;
|
||||
Data : access GLvoid;
|
||||
Usage : in GLenum);
|
||||
procedure glBufferSubData (Target : in GLenum;
|
||||
Offset : in GLintptr;
|
||||
Size : in GLsizeiptr;
|
||||
Data : access GLvoid);
|
||||
function glCheckFramebufferStatus (Target : in GLenum) return GLenum;
|
||||
procedure glCompileShader (Shader : in GLuint);
|
||||
procedure glCompressedTexImage2D (Target : in GLenum;
|
||||
Level : in GLint;
|
||||
internalFormat : in GLenum;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei;
|
||||
Border : in GLint;
|
||||
imageSize : in GLsizei;
|
||||
Data : access GLvoid);
|
||||
procedure glCompressedTexSubImage2D (Target : in GLenum;
|
||||
Level : in GLint;
|
||||
xOffset : in GLint;
|
||||
yOffset : in GLint;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei;
|
||||
format : in GLenum;
|
||||
imageSize : in GLsizei;
|
||||
Data : access GLvoid);
|
||||
procedure glCopyTexImage2D (Target : in GLenum;
|
||||
Level : in GLint;
|
||||
internalFormat : in GLenum;
|
||||
X : in GLint;
|
||||
Y : in GLint;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei;
|
||||
Border : in GLint);
|
||||
procedure glCopyTexSubImage2D (Target : in GLenum;
|
||||
Level : in GLint;
|
||||
xOffset : in GLint;
|
||||
yOffset : in GLint;
|
||||
X : in GLint;
|
||||
Y : in GLint;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei);
|
||||
function glCreateProgram return GLuint;
|
||||
function glCreateShader (the_Type : in GLenum) return GLuint;
|
||||
procedure glDeleteBuffers (N : in GLsizei;
|
||||
Buffers : access GLuint);
|
||||
procedure glDeleteFramebuffers (N : in GLsizei;
|
||||
FrameBuffers : access GLuint);
|
||||
procedure glDeleteProgram (Program : in GLuint);
|
||||
procedure glDeleteRenderbuffers (N : in GLsizei;
|
||||
RenderBuffers : access GLuint);
|
||||
procedure glDeleteShader (Shader : in GLuint);
|
||||
procedure glDeleteTextures (N : in GLsizei;
|
||||
Textures : access GLuint);
|
||||
procedure glDetachShader (Program : in GLuint;
|
||||
Shader : in GLuint);
|
||||
procedure glDisableVertexAttribArray (Index : in GLuint);
|
||||
procedure glEnableVertexAttribArray (Index : in GLuint);
|
||||
procedure glFramebufferRenderbuffer (Target : in GLenum;
|
||||
Attachment : in GLenum;
|
||||
RenderBufferTarget
|
||||
: in GLenum;
|
||||
RenderBuffer : in GLuint);
|
||||
procedure glFramebufferTexture2D (Target : in GLenum;
|
||||
Attachment : in GLenum;
|
||||
TexTarget : in GLenum;
|
||||
Texture : in GLuint;
|
||||
Level : in GLint);
|
||||
procedure glGenBuffers (N : in GLsizei;
|
||||
Buffers : access GLuint);
|
||||
procedure glGenFramebuffers (N : in GLsizei;
|
||||
FrameBuffers : access GLuint);
|
||||
procedure glGenRenderbuffers (N : in GLsizei;
|
||||
RenderBuffers : access GLuint);
|
||||
procedure glGenerateMipmap (Target : in GLenum);
|
||||
procedure glGetActiveAttrib (Program : in GLuint;
|
||||
Index : in GLuint;
|
||||
BufSize : in GLsizei;
|
||||
Length : access GLsizei;
|
||||
Size : access GLint;
|
||||
the_Type : access GLenum;
|
||||
Name : access GLchar);
|
||||
procedure glGetActiveUniform (Program : in GLuint;
|
||||
Index : in GLuint;
|
||||
BufSize : in GLsizei;
|
||||
Length : access GLsizei;
|
||||
Size : access GLint;
|
||||
the_Type : access GLenum;
|
||||
Name : access GLchar);
|
||||
procedure glGetAttachedShaders (Program : in GLuint;
|
||||
maxCount : in GLsizei;
|
||||
Count : access GLsizei;
|
||||
Shaders : access GLuint);
|
||||
function glGetAttribLocation (Program : in GLuint;
|
||||
Name : access GLchar) return Interfaces.C.int;
|
||||
procedure glGetBufferParameteriv (Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : access GLint);
|
||||
procedure glGetFramebufferAttachmentParameteriv
|
||||
(Target : in GLenum;
|
||||
Attachment : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : access GLint);
|
||||
procedure glGetProgramiv (Program : in GLuint;
|
||||
pName : in GLenum;
|
||||
Params : access GLint);
|
||||
procedure glGetProgramInfoLog (Program : in GLuint;
|
||||
BufSize : in GLsizei;
|
||||
Length : access GLsizei;
|
||||
infoLog : access GLchar);
|
||||
procedure glGetRenderbufferParameteriv
|
||||
(Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : access GLint);
|
||||
procedure glGetShaderiv (Shader : in GLuint;
|
||||
pName : in GLenum;
|
||||
Params : access GLint);
|
||||
procedure glGetShaderInfoLog (Shader : in GLuint;
|
||||
BufSize : in GLsizei;
|
||||
Length : access GLsizei;
|
||||
infoLog : access GLchar);
|
||||
procedure glGetShaderPrecisionFormat (ShaderType : in GLenum;
|
||||
PrecisionType : in GLenum;
|
||||
the_Range : access GLint;
|
||||
Precision : access GLint);
|
||||
procedure glGetShaderSource (Shader : in GLuint;
|
||||
BufSize : in GLsizei;
|
||||
Length : access GLsizei;
|
||||
Source : access GLchar);
|
||||
procedure glGetTexParameterfv (Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : in GLfloat_Address);
|
||||
procedure glGetUniformfv (Program : in GLuint;
|
||||
Location : in GLint;
|
||||
Params : in GLfloat_Address);
|
||||
procedure glGetUniformiv (Program : in GLuint;
|
||||
Location : in GLint;
|
||||
Params : access GLint);
|
||||
function glGetUniformLocation (Program : in GLuint;
|
||||
Name : access GLchar) return Interfaces.C.int;
|
||||
procedure glGetVertexAttribfv (Index : in GLuint;
|
||||
pName : in GLenum;
|
||||
Params : in GLfloat_Address);
|
||||
procedure glGetVertexAttribiv (Index : in GLuint;
|
||||
pName : in GLenum;
|
||||
Params : access GLint);
|
||||
procedure glGetVertexAttribPointerv (Index : in GLuint;
|
||||
pName : in GLenum;
|
||||
Pointer : access GLvoid);
|
||||
function glIsBuffer (Buffer : in GLuint) return GLboolean;
|
||||
function glIsFramebuffer (FrameBuffer : in GLuint) return GLboolean;
|
||||
function glIsProgram (Program : in GLuint) return GLboolean;
|
||||
function glIsRenderbuffer (RenderBuffer : in GLuint) return GLboolean;
|
||||
function glIsShader (Shader : in GLuint) return GLboolean;
|
||||
function glIsTexture (Texture : in GLuint) return GLboolean;
|
||||
procedure glLinkProgram (Program : in GLuint);
|
||||
procedure glReleaseShaderCompiler;
|
||||
procedure glRenderbufferStorage (Target : in GLenum;
|
||||
internalFormat : in GLenum;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei);
|
||||
procedure glSampleCoverage (Value : in GLclampf;
|
||||
Invert : in GLboolean);
|
||||
procedure glShaderBinary (N : in GLint;
|
||||
Shaders : access GLuint;
|
||||
BinaryFormat : in GLenum;
|
||||
Binary : access GLvoid;
|
||||
Length : in GLint);
|
||||
procedure glShaderSource (Shader : in GLuint;
|
||||
Count : in GLsizei;
|
||||
String : access GLchar_Pointer;
|
||||
Length : access GLint);
|
||||
procedure glStencilFuncSeparate (Face : in GLenum;
|
||||
Func : in GLenum;
|
||||
Ref : in GLint;
|
||||
Mask : in GLuint);
|
||||
procedure glStencilMaskSeparate (Face : in GLenum;
|
||||
Mask : in GLuint);
|
||||
procedure glStencilOpSeparate (Face : in GLenum;
|
||||
Fail : in GLenum;
|
||||
zFail : in GLenum;
|
||||
zPass : in GLenum);
|
||||
procedure glTexParameterf (Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Param : in GLfloat);
|
||||
procedure glTexParameterfv (Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : in GLfloat_Address);
|
||||
procedure glTexParameteriv (Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : access GLint);
|
||||
procedure glUniform1f (Location : in GLint;
|
||||
X : in GLfloat);
|
||||
procedure glUniform1fv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
V : in GLfloat_Address);
|
||||
procedure glUniform1i (Location : in GLint;
|
||||
X : in GLint);
|
||||
procedure glUniform1iv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
V : access GLint);
|
||||
procedure glUniform2f (Location : in GLint;
|
||||
X : in GLfloat;
|
||||
Y : in GLfloat);
|
||||
procedure glUniform2fv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
V : in GLfloat_Address);
|
||||
procedure glUniform2i (Location : in GLint;
|
||||
X : in GLint;
|
||||
Y : in GLint);
|
||||
procedure glUniform2iv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
V : access GLint);
|
||||
procedure glUniform3f (Location : in GLint;
|
||||
X : in GLfloat;
|
||||
Y : in GLfloat;
|
||||
Z : in GLfloat);
|
||||
procedure glUniform3fv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
V : in GLfloat_Address);
|
||||
procedure glUniform3i (Location : in GLint;
|
||||
X : in GLint;
|
||||
Y : in GLint;
|
||||
Z : in GLint);
|
||||
procedure glUniform3iv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
V : access GLint);
|
||||
procedure glUniform4f (Location : in GLint;
|
||||
X : in GLfloat;
|
||||
Y : in GLfloat;
|
||||
Z : in GLfloat;
|
||||
W : in GLfloat);
|
||||
procedure glUniform4fv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
V : in GLfloat_Address);
|
||||
procedure glUniform4i (Location : in GLint;
|
||||
X : in GLint;
|
||||
Y : in GLint;
|
||||
Z : in GLint;
|
||||
W : in GLint);
|
||||
procedure glUniform4iv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
V : access GLint);
|
||||
procedure glUniformMatrix2fv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
Transpose : in GLboolean;
|
||||
Value : in GLfloat_Address);
|
||||
procedure glUniformMatrix3fv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
Transpose : in GLboolean;
|
||||
Value : in GLfloat_Address);
|
||||
procedure glUniformMatrix4fv (Location : in GLint;
|
||||
Count : in GLsizei;
|
||||
Transpose : in GLboolean;
|
||||
Value : in GLfloat_Address);
|
||||
procedure glUseProgram (Program : in GLuint);
|
||||
procedure glValidateProgram (Program : in GLuint);
|
||||
procedure glVertexAttrib1f (Index : in GLuint;
|
||||
X : in GLfloat);
|
||||
procedure glVertexAttrib1fv (Index : in GLuint;
|
||||
Values : in GLfloat_Address);
|
||||
procedure glVertexAttrib2f (Index : in GLuint;
|
||||
X : in GLfloat;
|
||||
Y : in GLfloat);
|
||||
procedure glVertexAttrib2fv (Index : in GLuint;
|
||||
Values : in GLfloat_Address);
|
||||
procedure glVertexAttrib3f (Index : in GLuint;
|
||||
X : in GLfloat;
|
||||
Y : in GLfloat;
|
||||
Z : in GLfloat);
|
||||
procedure glVertexAttrib3fv (Index : in GLuint;
|
||||
Values : in GLfloat_Address);
|
||||
procedure glVertexAttrib4f (Index : in GLuint;
|
||||
X : in GLfloat;
|
||||
Y : in GLfloat;
|
||||
Z : in GLfloat;
|
||||
W : in GLfloat);
|
||||
procedure glVertexAttrib4fv (Index : in GLuint;
|
||||
Values : in GLfloat_Address);
|
||||
procedure glVertexAttribPointer (Index : in GLuint;
|
||||
Size : in GLint;
|
||||
the_Type : in GLenum;
|
||||
Normalized : in GLboolean;
|
||||
Stride : in GLsizei;
|
||||
Ptr : access GLvoid);
|
||||
|
||||
private
|
||||
|
||||
for GLintptr 'Size use standard'Address_Size;
|
||||
for GLsizeiptr'Size use standard'Address_Size;
|
||||
|
||||
|
||||
-------------
|
||||
-- Functions
|
||||
--
|
||||
pragma Import (StdCall, glAttachShader, "glAttachShader");
|
||||
pragma Import (StdCall, glBindAttribLocation, "glBindAttribLocation");
|
||||
pragma Import (StdCall, glBindBuffer, "glBindBuffer");
|
||||
pragma Import (StdCall, glBindFramebuffer, "glBindFramebuffer");
|
||||
pragma Import (StdCall, glBindRenderbuffer, "glBindRenderbuffer");
|
||||
pragma Import (StdCall, glBlendColor, "glBlendColor");
|
||||
pragma Import (StdCall, glBlendEquation, "glBlendEquation");
|
||||
pragma Import (StdCall, glBlendEquationSeparate, "glBlendEquationSeparate");
|
||||
pragma Import (StdCall, glBlendFuncSeparate, "glBlendFuncSeparate");
|
||||
pragma Import (StdCall, glBufferData, "glBufferData");
|
||||
pragma Import (StdCall, glBufferSubData, "glBufferSubData");
|
||||
pragma Import (StdCall, glCheckFramebufferStatus, "glCheckFramebufferStatus");
|
||||
pragma Import (StdCall, glCompileShader, "glCompileShader");
|
||||
pragma Import (StdCall, glCompressedTexImage2D, "glCompressedTexImage2D");
|
||||
pragma Import (StdCall, glCompressedTexSubImage2D, "glCompressedTexSubImage2D");
|
||||
pragma Import (StdCall, glCopyTexImage2D, "glCopyTexImage2D");
|
||||
pragma Import (StdCall, glCopyTexSubImage2D, "glCopyTexSubImage2D");
|
||||
pragma Import (StdCall, glCreateProgram, "glCreateProgram");
|
||||
pragma Import (StdCall, glCreateShader, "glCreateShader");
|
||||
pragma Import (StdCall, glDeleteBuffers, "glDeleteBuffers");
|
||||
pragma Import (StdCall, glDeleteFramebuffers, "glDeleteFramebuffers");
|
||||
pragma Import (StdCall, glDeleteProgram, "glDeleteProgram");
|
||||
pragma Import (StdCall, glDeleteRenderbuffers, "glDeleteRenderbuffers");
|
||||
pragma Import (StdCall, glDeleteShader, "glDeleteShader");
|
||||
pragma Import (StdCall, glDeleteTextures, "glDeleteTextures");
|
||||
pragma Import (StdCall, glDetachShader, "glDetachShader");
|
||||
pragma Import (StdCall, glDisableVertexAttribArray, "glDisableVertexAttribArray");
|
||||
pragma Import (StdCall, glEnableVertexAttribArray, "glEnableVertexAttribArray");
|
||||
pragma Import (StdCall, glFramebufferRenderbuffer, "glFramebufferRenderbuffer");
|
||||
pragma Import (StdCall, glFramebufferTexture2D, "glFramebufferTexture2D");
|
||||
pragma Import (StdCall, glGenBuffers, "glGenBuffers");
|
||||
pragma Import (StdCall, glGenerateMipmap, "glGenerateMipmap");
|
||||
pragma Import (StdCall, glGenFramebuffers, "glGenFramebuffers");
|
||||
pragma Import (StdCall, glGenRenderbuffers, "glGenRenderbuffers");
|
||||
pragma Import (StdCall, glGetActiveAttrib, "glGetActiveAttrib");
|
||||
pragma Import (StdCall, glGetActiveUniform, "glGetActiveUniform");
|
||||
pragma Import (StdCall, glGetAttachedShaders, "glGetAttachedShaders");
|
||||
pragma Import (StdCall, glGetAttribLocation, "glGetAttribLocation");
|
||||
pragma Import (StdCall, glGetBufferParameteriv, "glGetBufferParameteriv");
|
||||
pragma Import (StdCall, glGetFramebufferAttachmentParameteriv,
|
||||
"glGetFramebufferAttachmentParameteriv");
|
||||
pragma Import (StdCall, glGetProgramiv, "glGetProgramiv");
|
||||
pragma Import (StdCall, glGetProgramInfoLog, "glGetProgramInfoLog");
|
||||
pragma Import (StdCall, glGetRenderbufferParameteriv, "glGetRenderbufferParameteriv");
|
||||
pragma Import (StdCall, glGetShaderiv, "glGetShaderiv");
|
||||
pragma Import (StdCall, glGetShaderInfoLog, "glGetShaderInfoLog");
|
||||
pragma Import (StdCall, glGetShaderPrecisionFormat, "glGetShaderPrecisionFormat");
|
||||
pragma Import (StdCall, glGetShaderSource, "glGetShaderSource");
|
||||
pragma Import (StdCall, glGetTexParameterfv, "glGetTexParameterfv");
|
||||
pragma Import (StdCall, glGetUniformfv, "glGetUniformfv");
|
||||
pragma Import (StdCall, glGetUniformiv, "glGetUniformiv");
|
||||
pragma Import (StdCall, glGetUniformLocation, "glGetUniformLocation");
|
||||
pragma Import (StdCall, glGetVertexAttribfv, "glGetVertexAttribfv");
|
||||
pragma Import (StdCall, glGetVertexAttribiv, "glGetVertexAttribiv");
|
||||
pragma Import (StdCall, glGetVertexAttribPointerv, "glGetVertexAttribPointerv");
|
||||
pragma Import (StdCall, glIsBuffer, "glIsBuffer");
|
||||
pragma Import (StdCall, glIsFramebuffer, "glIsFramebuffer");
|
||||
pragma Import (StdCall, glIsProgram, "glIsProgram");
|
||||
pragma Import (StdCall, glIsRenderbuffer, "glIsRenderbuffer");
|
||||
pragma Import (StdCall, glIsShader, "glIsShader");
|
||||
pragma Import (StdCall, glIsTexture, "glIsTexture");
|
||||
pragma Import (StdCall, glLinkProgram, "glLinkProgram");
|
||||
pragma Import (StdCall, glReleaseShaderCompiler, "glReleaseShaderCompiler");
|
||||
pragma Import (StdCall, glRenderbufferStorage, "glRenderbufferStorage");
|
||||
pragma Import (StdCall, glSampleCoverage, "glSampleCoverage");
|
||||
pragma Import (StdCall, glShaderBinary, "glShaderBinary");
|
||||
pragma Import (StdCall, glShaderSource, "glShaderSource");
|
||||
pragma Import (StdCall, glStencilFuncSeparate, "glStencilFuncSeparate");
|
||||
pragma Import (StdCall, glStencilMaskSeparate, "glStencilMaskSeparate");
|
||||
pragma Import (StdCall, glStencilOpSeparate, "glStencilOpSeparate");
|
||||
pragma Import (StdCall, glTexParameterf, "glTexParameterf");
|
||||
pragma Import (StdCall, glTexParameterfv, "glTexParameterfv");
|
||||
pragma Import (StdCall, glTexParameteriv, "glTexParameteriv");
|
||||
pragma Import (StdCall, glUniform1f, "glUniform1f");
|
||||
pragma Import (StdCall, glUniform1fv, "glUniform1fv");
|
||||
pragma Import (StdCall, glUniform1i, "glUniform1i");
|
||||
pragma Import (StdCall, glUniform1iv, "glUniform1iv");
|
||||
pragma Import (StdCall, glUniform2f, "glUniform2f");
|
||||
pragma Import (StdCall, glUniform2fv, "glUniform2fv");
|
||||
pragma Import (StdCall, glUniform2i, "glUniform2i");
|
||||
pragma Import (StdCall, glUniform2iv, "glUniform2iv");
|
||||
pragma Import (StdCall, glUniform3f, "glUniform3f");
|
||||
pragma Import (StdCall, glUniform3fv, "glUniform3fv");
|
||||
pragma Import (StdCall, glUniform3i, "glUniform3i");
|
||||
pragma Import (StdCall, glUniform3iv, "glUniform3iv");
|
||||
pragma Import (StdCall, glUniform4f, "glUniform4f");
|
||||
pragma Import (StdCall, glUniform4fv, "glUniform4fv");
|
||||
pragma Import (StdCall, glUniform4i, "glUniform4i");
|
||||
pragma Import (StdCall, glUniform4iv, "glUniform4iv");
|
||||
pragma Import (StdCall, glUniformMatrix2fv, "glUniformMatrix2fv");
|
||||
pragma Import (StdCall, glUniformMatrix3fv, "glUniformMatrix3fv");
|
||||
pragma Import (StdCall, glUniformMatrix4fv, "glUniformMatrix4fv");
|
||||
pragma Import (StdCall, glUseProgram, "glUseProgram");
|
||||
pragma Import (StdCall, glValidateProgram, "glValidateProgram");
|
||||
pragma Import (StdCall, glVertexAttrib1f, "glVertexAttrib1f");
|
||||
pragma Import (StdCall, glVertexAttrib1fv, "glVertexAttrib1fv");
|
||||
pragma Import (StdCall, glVertexAttrib2f, "glVertexAttrib2f");
|
||||
pragma Import (StdCall, glVertexAttrib2fv, "glVertexAttrib2fv");
|
||||
pragma Import (StdCall, glVertexAttrib3f, "glVertexAttrib3f");
|
||||
pragma Import (StdCall, glVertexAttrib3fv, "glVertexAttrib3fv");
|
||||
pragma Import (StdCall, glVertexAttrib4f, "glVertexAttrib4f");
|
||||
pragma Import (StdCall, glVertexAttrib4fv, "glVertexAttrib4fv");
|
||||
pragma Import (StdCall, glVertexAttribPointer, "glVertexAttribPointer");
|
||||
|
||||
end GL.lean;
|
||||
52
3-mid/opengl/private/gl/source/gl-pointers.adb
Normal file
52
3-mid/opengl/private/gl/source/gl-pointers.adb
Normal file
@@ -0,0 +1,52 @@
|
||||
with
|
||||
ada.unchecked_Conversion,
|
||||
system.Address_to_Access_Conversions;
|
||||
|
||||
package body GL.Pointers
|
||||
is
|
||||
|
||||
type GLvoid_access is access all GLvoid;
|
||||
type GLchar_access is access all lean.GLchar;
|
||||
type GLchar_Pointer_access is access all lean.GLchar_Pointer;
|
||||
type chars_ptr_access is access all C.strings.chars_ptr;
|
||||
|
||||
package Conversions is new system.Address_To_Access_Conversions (GLvoid);
|
||||
|
||||
|
||||
|
||||
function to_GLvoid_access (From : in system.Address) return access GLvoid
|
||||
is
|
||||
begin
|
||||
return Conversions.to_Pointer (From);
|
||||
end to_GLvoid_access;
|
||||
|
||||
|
||||
|
||||
function to_GLvoid_access (From : access C.unsigned_char) return access GLvoid
|
||||
is
|
||||
type unsigned_Char_access is access all C.unsigned_char;
|
||||
function Convert is new ada.unchecked_Conversion (unsigned_Char_access, GLvoid_access);
|
||||
begin
|
||||
return Convert (unsigned_Char_access (From));
|
||||
end to_GLvoid_access;
|
||||
|
||||
|
||||
|
||||
function to_GLchar_access (From : in C.Strings.chars_ptr) return access lean.GLchar
|
||||
is
|
||||
function Convert is new ada.unchecked_Conversion (C.Strings.chars_ptr, GLchar_access);
|
||||
begin
|
||||
return Convert (From);
|
||||
end to_GLchar_access;
|
||||
|
||||
|
||||
|
||||
function to_GLchar_Pointer_access (From : access C.Strings.chars_ptr_array) return access lean.GLchar_Pointer
|
||||
is
|
||||
function Convert is new ada.unchecked_Conversion (chars_ptr_access, GLchar_Pointer_access);
|
||||
begin
|
||||
return Convert (From (From'First)'unchecked_Access);
|
||||
end to_GLchar_Pointer_access;
|
||||
|
||||
|
||||
end GL.Pointers;
|
||||
23
3-mid/opengl/private/gl/source/gl-pointers.ads
Normal file
23
3-mid/opengl/private/gl/source/gl-pointers.ads
Normal file
@@ -0,0 +1,23 @@
|
||||
with
|
||||
GL.lean,
|
||||
Interfaces.C.Strings,
|
||||
System;
|
||||
|
||||
package GL.Pointers
|
||||
--
|
||||
-- Provides pointer conversions.
|
||||
--
|
||||
is
|
||||
function to_GLvoid_access (From : in system.Address) return access GLvoid;
|
||||
function to_GLvoid_access (From : access C.unsigned_char) return access GLvoid;
|
||||
function to_GLchar_access (From : in C.Strings.chars_ptr) return access lean.GLchar;
|
||||
|
||||
function to_GLchar_Pointer_access
|
||||
(From : access C.Strings.chars_ptr_array)
|
||||
return access lean.GLchar_Pointer;
|
||||
|
||||
function "+" (From : in system.Address) return access GLvoid renames to_GLvoid_access;
|
||||
function "+" (From : access C.unsigned_char) return access GLvoid renames to_GLvoid_access;
|
||||
function "+" (From : in C.Strings.chars_ptr) return access lean.GLchar renames to_GLchar_access;
|
||||
|
||||
end GL.Pointers;
|
||||
379
3-mid/opengl/private/gl/source/gl-safe.ads
Normal file
379
3-mid/opengl/private/gl/source/gl-safe.ads
Normal file
@@ -0,0 +1,379 @@
|
||||
with
|
||||
Interfaces.C.Pointers;
|
||||
|
||||
package GL.safe
|
||||
--
|
||||
-- Provides types, constants and functions specific to the openGL 'Safety Critical' profile.
|
||||
--
|
||||
is
|
||||
---------
|
||||
-- Types
|
||||
--
|
||||
|
||||
-- GLubyte_Pointer
|
||||
--
|
||||
package GLubyte_Pointers is new C.Pointers (Index => C.size_t,
|
||||
Element => GLubyte,
|
||||
Element_Array => GLubyte_array,
|
||||
Default_Terminator => 0);
|
||||
subtype GLubyte_Pointer is GLubyte_Pointers.Pointer;
|
||||
|
||||
|
||||
-- GLint_Pointer
|
||||
--
|
||||
package GLint_Pointers is new C.Pointers (Index => C.size_t,
|
||||
Element => GLint,
|
||||
Element_Array => GLint_array,
|
||||
Default_Terminator => 0);
|
||||
subtype GLint_Pointer is GLint_Pointers.Pointer;
|
||||
|
||||
|
||||
-- GLfloat_Pointer
|
||||
--
|
||||
package GLfloat_Pointers is new C.Pointers (Index => C.size_t,
|
||||
Element => GLfloat,
|
||||
Element_Array => GLfloat_array,
|
||||
Default_Terminator => 0.0);
|
||||
subtype GLfloat_Pointer is GLfloat_Pointers.Pointer;
|
||||
|
||||
|
||||
-- GLvoid_Pointer
|
||||
--
|
||||
package GLvoid_Pointers is new C.Pointers (Index => C.size_t,
|
||||
Element => GLvoid,
|
||||
Element_Array => GLvoid_array,
|
||||
Default_Terminator => 0);
|
||||
subtype GLvoid_Pointer is GLvoid_Pointers.Pointer;
|
||||
|
||||
|
||||
-- GLvoid_Pointer_Pointer
|
||||
--
|
||||
type GLvoid_Pointer_array is array (C.size_t range <>) of aliased GLvoid_Pointer;
|
||||
package GLvoid_Pointer_Pointers is new C.Pointers (Index => C.size_t,
|
||||
Element => GLvoid_Pointer,
|
||||
Element_Array => GLvoid_Pointer_array,
|
||||
Default_Terminator => null);
|
||||
subtype GLvoid_Pointer_Pointer is GLvoid_Pointer_Pointers.Pointer;
|
||||
|
||||
|
||||
|
||||
-------------
|
||||
-- Constants
|
||||
--
|
||||
|
||||
GL_ADD : constant := 16#0104#;
|
||||
GL_ALPHA_TEST : constant := 16#0BC0#;
|
||||
GL_ALPHA_TEST_FUNC : constant := 16#0BC1#;
|
||||
GL_ALPHA_TEST_REF : constant := 16#0BC2#;
|
||||
GL_AMBIENT : constant := 16#1200#;
|
||||
GL_AMBIENT_AND_DIFFUSE : constant := 16#1602#;
|
||||
GL_BLEND_DST : constant := 16#0BE0#;
|
||||
GL_BLEND_SRC : constant := 16#0BE1#;
|
||||
GL_CLIENT_ACTIVE_TEXTURE : constant := 16#84E1#;
|
||||
GL_COLOR : constant := 16#1800#;
|
||||
GL_COLOR_ARRAY : constant := 16#8076#;
|
||||
GL_COLOR_ARRAY_POINTER : constant := 16#8090#;
|
||||
GL_COLOR_ARRAY_SIZE : constant := 16#8081#;
|
||||
GL_COLOR_ARRAY_STRIDE : constant := 16#8083#;
|
||||
GL_COLOR_ARRAY_TYPE : constant := 16#8082#;
|
||||
GL_COLOR_INDEX : constant := 16#1900#;
|
||||
GL_COLOR_INDEX8_EXT : constant := 16#80E5#;
|
||||
GL_COLOR_MATERIAL : constant := 16#0B57#;
|
||||
GL_COLOR_TABLE_ALPHA_SIZE : constant := 16#80DD#;
|
||||
GL_COLOR_TABLE_BLUE_SIZE : constant := 16#80DC#;
|
||||
GL_COLOR_TABLE_FORMAT : constant := 16#80D8#;
|
||||
GL_COLOR_TABLE_GREEN_SIZE : constant := 16#80DB#;
|
||||
GL_COLOR_TABLE_INTENSITY_SIZE : constant := 16#80DF#;
|
||||
GL_COLOR_TABLE_LUMINANCE_SIZE : constant := 16#80DE#;
|
||||
GL_COLOR_TABLE_RED_Size : constant := 16#80DA#;
|
||||
GL_COLOR_TABLE_WIDTH : constant := 16#80D9#;
|
||||
GL_COMPILE : constant := 16#1300#;
|
||||
GL_CURRENT_COLOR : constant := 16#0B00#;
|
||||
GL_CURRENT_NORMAL : constant := 16#0B02#;
|
||||
GL_CURRENT_RASTER_COLOR : constant := 16#0B04#;
|
||||
GL_CURRENT_RASTER_TEXTURE_COORDS : constant := 16#0B06#;
|
||||
GL_CURRENT_TEXTURE_COORDS : constant := 16#0B03#;
|
||||
GL_DECAL : constant := 16#2101#;
|
||||
GL_DIFFUSE : constant := 16#1201#;
|
||||
GL_EMISSION : constant := 16#1600#;
|
||||
GL_EXT_paletted_texture : constant := 1;
|
||||
GL_FLAT : constant := 16#1D00#;
|
||||
GL_LIGHT0 : constant := 16#4000#;
|
||||
GL_LIGHT1 : constant := 16#4001#;
|
||||
GL_LIGHTING : constant := 16#0B50#;
|
||||
GL_LIGHT_MODEL_AMBIENT : constant := 16#0B53#;
|
||||
GL_LINE_SMOOTH : constant := 16#0B20#;
|
||||
GL_LINE_SMOOTH_HINT : constant := 16#0C52#;
|
||||
GL_LINE_STIPPLE : constant := 16#0B24#;
|
||||
GL_LINE_STIPPLE_PATTERN : constant := 16#0B25#;
|
||||
GL_LINE_STIPPLE_REPEAT : constant := 16#0B26#;
|
||||
GL_LIST_BASE : constant := 16#0B32#;
|
||||
GL_MATRIX_MODE : constant := 16#0BA0#;
|
||||
GL_MAX_ELEMENTS_INDICES : constant := 16#80E9#;
|
||||
GL_MAX_ELEMENTS_VERTICES : constant := 16#80E8#;
|
||||
GL_MAX_LIGHTS : constant := 16#0D31#;
|
||||
GL_MAX_LIST_NESTING : constant := 16#0B31#;
|
||||
GL_MAX_MODELVIEW_STACK_DEPTH : constant := 16#0D36#;
|
||||
GL_MAX_PROJECTION_STACK_DEPTH : constant := 16#0D38#;
|
||||
GL_MAX_TEXTURE_UNITS : constant := 16#84E2#;
|
||||
GL_MODELVIEW : constant := 16#1700#;
|
||||
GL_MODELVIEW_MATRIX : constant := 16#0BA6#;
|
||||
GL_MODELVIEW_STACK_DEPTH : constant := 16#0BA3#;
|
||||
GL_MODULATE : constant := 16#2100#;
|
||||
GL_NORMALIZE : constant := 16#0BA1#;
|
||||
GL_NORMAL_ARRAY : constant := 16#8075#;
|
||||
GL_NORMAL_ARRAY_POINTER : constant := 16#808F#;
|
||||
GL_NORMAL_ARRAY_STRIDE : constant := 16#807F#;
|
||||
GL_NORMAL_ARRAY_TYPE : constant := 16#807E#;
|
||||
GL_OES_single_precision : constant := 1;
|
||||
GL_OSC_VERSION_1_0 : constant := 1;
|
||||
GL_PERSPECTIVE_CORRECTION_HINT : constant := 16#0C50#;
|
||||
GL_POINT_SIZE : constant := 16#0B11#;
|
||||
GL_POINT_SMOOTH : constant := 16#0B10#;
|
||||
GL_POINT_SMOOTH_HINT : constant := 16#0C51#;
|
||||
GL_POLYGON_SMOOTH_HINT : constant := 16#0C53#;
|
||||
GL_POLYGON_STIPPLE : constant := 16#0B42#;
|
||||
GL_POSITION : constant := 16#1203#;
|
||||
GL_PROJECTION : constant := 16#1701#;
|
||||
GL_PROJECTION_MATRIX : constant := 16#0BA7#;
|
||||
GL_PROJECTION_STACK_DEPTH : constant := 16#0BA4#;
|
||||
GL_RESCALE_NORMAL : constant := 16#803A#;
|
||||
GL_SHADE_MODEL : constant := 16#0B54#;
|
||||
GL_SHININESS : constant := 16#1601#;
|
||||
GL_SMOOTH : constant := 16#1D01#;
|
||||
GL_SMOOTH_LINE_WIDTH_GRANULARITY : constant := 16#0B23#;
|
||||
GL_SMOOTH_LINE_WIDTH_RANGE : constant := 16#0B22#;
|
||||
GL_SMOOTH_POINT_SIZE_GRANULARITY : constant := 16#0B13#;
|
||||
GL_SMOOTH_POINT_SIZE_RANGE : constant := 16#0B12#;
|
||||
GL_SPECULAR : constant := 16#1202#;
|
||||
GL_STACK_OVERFLOW : constant := 16#0503#;
|
||||
GL_STACK_UNDERFLOW : constant := 16#0504#;
|
||||
GL_TEXTURE_COORD_ARRAY : constant := 16#8078#;
|
||||
GL_TEXTURE_COORD_ARRAY_POINTER : constant := 16#8092#;
|
||||
GL_TEXTURE_COORD_ARRAY_SIZE : constant := 16#8088#;
|
||||
GL_TEXTURE_COORD_ARRAY_STRIDE : constant := 16#808A#;
|
||||
GL_TEXTURE_COORD_ARRAY_TYPE : constant := 16#8089#;
|
||||
GL_TEXTURE_ENV : constant := 16#2300#;
|
||||
GL_TEXTURE_ENV_COLOR : constant := 16#2201#;
|
||||
GL_TEXTURE_ENV_MODE : constant := 16#2200#;
|
||||
GL_VERTEX_ARRAY : constant := 16#8074#;
|
||||
GL_VERTEX_ARRAY_POINTER : constant := 16#808E#;
|
||||
GL_VERTEX_ARRAY_SIZE : constant := 16#807A#;
|
||||
GL_VERTEX_ARRAY_STRIDE : constant := 16#807C#;
|
||||
GL_VERTEX_ARRAY_TYPE : constant := 16#807B#;
|
||||
|
||||
|
||||
--------------
|
||||
-- Functions
|
||||
--
|
||||
|
||||
procedure glAlphaFunc (Func : in GLenum;
|
||||
Ref : in GLclampf);
|
||||
procedure glBegin (Mode : in GLenum);
|
||||
procedure glBitmap (Width : in GLsizei;
|
||||
Height : in GLsizei;
|
||||
xOrig : in GLfloat;
|
||||
yOrig : in GLfloat;
|
||||
xMove : in GLfloat;
|
||||
yMove : in GLfloat;
|
||||
Bitmap : in GLubyte_Pointer);
|
||||
procedure glCallLists (N : in GLsizei;
|
||||
the_Type : in GLenum;
|
||||
Lists : in GLvoid_Pointer);
|
||||
procedure glClientActiveTexture (Texture : in GLenum);
|
||||
procedure glColor4f (Red : in GLfloat;
|
||||
Green : in GLfloat;
|
||||
Blue : in GLfloat;
|
||||
Alpha : in GLfloat);
|
||||
procedure glColor4fv (V : in GLfloat_Pointer);
|
||||
procedure glColor4ub (Red : in GLubyte;
|
||||
Green : in GLubyte;
|
||||
Blue : in GLubyte;
|
||||
Alpha : in GLubyte);
|
||||
procedure glColorPointer (Size : in GLint;
|
||||
the_Type : in GLenum;
|
||||
Stride : in GLsizei;
|
||||
Ptr : in GLvoid_Pointer);
|
||||
procedure glCopyPixels (X : in GLint;
|
||||
Y : in GLint;
|
||||
Width : in GLsizei;
|
||||
Height : in GLsizei;
|
||||
the_Type : in GLenum);
|
||||
procedure glDisableClientState (Cap : in GLenum);
|
||||
procedure glDrawPixels (Width : in GLsizei;
|
||||
Height : in GLsizei;
|
||||
Format : in GLenum;
|
||||
the_Type : in GLenum;
|
||||
Pixels : in GLvoid_Pointer);
|
||||
procedure glEnableClientState (Cap : in GLenum);
|
||||
procedure glEnd;
|
||||
procedure glEndList;
|
||||
procedure glFrustumf (Left : in GLfloat;
|
||||
Right : in GLfloat;
|
||||
Bottom : in GLfloat;
|
||||
Top : in GLfloat;
|
||||
near_Val : in GLfloat;
|
||||
far_Val : in GLfloat);
|
||||
function glGenLists (the_Range : in GLsizei) return GLuint;
|
||||
procedure glGetLightfv (Light : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : in GLfloat_Pointer);
|
||||
procedure glGetMaterialfv (Face : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : in GLfloat_Pointer);
|
||||
procedure glGetPointerv (pName : in GLenum;
|
||||
Params : in GLvoid_Pointer_Pointer);
|
||||
procedure glGetPolygonStipple (Mask : in GLubyte_Pointer);
|
||||
procedure glGetTexEnvfv (Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : in GLfloat_Pointer);
|
||||
procedure glGetTexEnviv (Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : in GLint_Pointer);
|
||||
procedure glLightModelfv (pName : in GLenum;
|
||||
Params : in GLfloat_Pointer);
|
||||
procedure glLightfv (Light : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : in GLfloat_Pointer);
|
||||
procedure glLineStipple (Factor : in GLint;
|
||||
Pattern : in GLushort);
|
||||
procedure glListBase (Base : in GLuint);
|
||||
procedure glLoadIdentity;
|
||||
procedure glLoadMatrixf (M : in GLfloat_Pointer);
|
||||
procedure glMaterialf (Face : in GLenum;
|
||||
pName : in GLenum;
|
||||
Param : in GLfloat);
|
||||
procedure glMaterialfv (Face : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : in GLfloat_Pointer);
|
||||
procedure glMatrixMode (Mode : in GLenum);
|
||||
procedure glMultMatrixf (M : in GLfloat_Pointer);
|
||||
procedure glMultiTexCoord2f (Target : in GLenum;
|
||||
S : in GLfloat;
|
||||
T : in GLfloat);
|
||||
procedure glMultiTexCoord2fv (Target : in GLenum;
|
||||
V : in GLfloat_Pointer);
|
||||
procedure glNewList (List : in GLuint;
|
||||
Mode : in GLenum);
|
||||
procedure glNormal3f (nX : in GLfloat;
|
||||
nY : in GLfloat;
|
||||
nZ : in GLfloat);
|
||||
procedure glNormal3fv (V : in GLfloat_Pointer);
|
||||
procedure glNormalPointer (the_Type : in GLenum;
|
||||
Stride : in GLsizei;
|
||||
Ptr : in GLvoid_Pointer);
|
||||
procedure glOrthof (Left : in GLfloat;
|
||||
Right : in GLfloat;
|
||||
Bottom : in GLfloat;
|
||||
Top : in GLfloat;
|
||||
Near : in GLfloat;
|
||||
Far : in GLfloat);
|
||||
procedure glPointSize (Size : in GLfloat);
|
||||
procedure glPolygonStipple (Mask : in GLubyte_Pointer);
|
||||
procedure glPopMatrix;
|
||||
procedure glPushMatrix;
|
||||
procedure glRasterPos3f (X : in GLfloat;
|
||||
Y : in GLfloat;
|
||||
Z : in GLfloat);
|
||||
procedure glRotatef (Angle : in GLfloat;
|
||||
X : in GLfloat;
|
||||
Y : in GLfloat;
|
||||
Z : in GLfloat);
|
||||
procedure glScalef (X : in GLfloat;
|
||||
Y : in GLfloat;
|
||||
Z : in GLfloat);
|
||||
procedure glShadeModel (Mode : in GLenum);
|
||||
procedure glTexCoordPointer (Size : in GLint;
|
||||
the_Type : in GLenum;
|
||||
Stride : in GLsizei;
|
||||
Ptr : in GLvoid_Pointer);
|
||||
procedure glTexEnvfv (Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Params : in GLfloat_Pointer);
|
||||
procedure glTexEnvi (Target : in GLenum;
|
||||
pName : in GLenum;
|
||||
Param : in GLint);
|
||||
procedure glTranslatef (X : in GLfloat;
|
||||
Y : in GLfloat;
|
||||
Z : in GLfloat);
|
||||
procedure glVertex2f (X : in GLfloat;
|
||||
Y : in GLfloat);
|
||||
procedure glVertex2fv (V : in GLfloat_Pointer);
|
||||
procedure glVertex3f (X : in GLfloat;
|
||||
Y : in GLfloat;
|
||||
Z : in GLfloat);
|
||||
procedure glVertex3fv (V : in GLfloat_Pointer);
|
||||
procedure glVertexPointer (Size : in GLint;
|
||||
the_Type : in GLenum;
|
||||
Stride : in GLsizei;
|
||||
Ptr : in GLvoid_Pointer);
|
||||
|
||||
private
|
||||
|
||||
pragma Import (StdCall, glAlphaFunc, "glAlphaFunc");
|
||||
pragma Import (StdCall, glBegin, "glBegin");
|
||||
pragma Import (StdCall, glBitmap, "glBitmap");
|
||||
pragma Import (StdCall, glCallLists, "glCallLists");
|
||||
pragma Import (StdCall, glClientActiveTexture, "glClientActiveTexture");
|
||||
pragma Import (StdCall, glColor4f, "glColor4f");
|
||||
pragma Import (StdCall, glColor4fv, "glColor4fv");
|
||||
pragma Import (StdCall, glColor4ub, "glColor4ub");
|
||||
pragma Import (StdCall, glColorPointer, "glColorPointer");
|
||||
pragma Import (StdCall, glCopyPixels, "glCopyPixels");
|
||||
pragma Import (StdCall, glDisableClientState, "glDisableClientState");
|
||||
pragma Import (StdCall, glDrawPixels, "glDrawPixels");
|
||||
pragma Import (StdCall, glEnableClientState, "glEnableClientState");
|
||||
pragma Import (StdCall, glEnd, "glEnd");
|
||||
pragma Import (StdCall, glEndList, "glEndList");
|
||||
pragma Import (StdCall, glFrustumf, "glFrustumf");
|
||||
pragma Import (StdCall, glGenLists, "glGenLists");
|
||||
pragma Import (StdCall, glGetLightfv, "glGetLightfv");
|
||||
pragma Import (StdCall, glGetMaterialfv, "glGetMaterialfv");
|
||||
pragma Import (StdCall, glGetPointerv, "glGetPointerv");
|
||||
pragma Import (StdCall, glGetPolygonStipple, "glGetPolygonStipple");
|
||||
pragma Import (StdCall, glGetTexEnvfv, "glGetTexEnvfv");
|
||||
pragma Import (StdCall, glGetTexEnviv, "glGetTexEnviv");
|
||||
pragma Import (StdCall, glLightModelfv, "glLightModelfv");
|
||||
pragma Import (StdCall, glLightfv, "glLightfv");
|
||||
pragma Import (StdCall, glLineStipple, "glLineStipple");
|
||||
pragma Import (StdCall, glListBase, "glListBase");
|
||||
pragma Import (StdCall, glLoadIdentity, "glLoadIdentity");
|
||||
pragma Import (StdCall, glLoadMatrixf, "glLoadMatrixf");
|
||||
pragma Import (StdCall, glMaterialf, "glMaterialf");
|
||||
pragma Import (StdCall, glMaterialfv, "glMaterialfv");
|
||||
pragma Import (StdCall, glMatrixMode, "glMatrixMode");
|
||||
pragma Import (StdCall, glMultMatrixf, "glMultMatrixf");
|
||||
pragma Import (StdCall, glMultiTexCoord2f, "glMultiTexCoord2f");
|
||||
pragma Import (StdCall, glMultiTexCoord2fv, "glMultiTexCoord2fv");
|
||||
pragma Import (StdCall, glNewList, "glNewList");
|
||||
pragma Import (StdCall, glNormal3f, "glNormal3f");
|
||||
pragma Import (StdCall, glNormal3fv, "glNormal3fv");
|
||||
pragma Import (StdCall, glNormalPointer, "glNormalPointer");
|
||||
pragma Import (StdCall, glOrthof, "glOrthof");
|
||||
pragma Import (StdCall, glPointSize, "glPointSize");
|
||||
pragma Import (StdCall, glPolygonStipple, "glPolygonStipple");
|
||||
pragma Import (StdCall, glPopMatrix, "glPopMatrix");
|
||||
pragma Import (StdCall, glPushMatrix, "glPushMatrix");
|
||||
pragma Import (StdCall, glRasterPos3f, "glRasterPos3f");
|
||||
pragma Import (StdCall, glRotatef, "glRotatef");
|
||||
pragma Import (StdCall, glScalef, "glScalef");
|
||||
pragma Import (StdCall, glShadeModel, "glShadeModel");
|
||||
pragma Import (StdCall, glTexCoordPointer, "glTexCoordPointer");
|
||||
pragma Import (StdCall, glTexEnvfv, "glTexEnvfv");
|
||||
pragma Import (StdCall, glTexEnvi, "glTexEnvi");
|
||||
pragma Import (StdCall, glTranslatef, "glTranslatef");
|
||||
pragma Import (StdCall, glVertex2f, "glVertex2f");
|
||||
pragma Import (StdCall, glVertex2fv, "glVertex2fv");
|
||||
pragma Import (StdCall, glVertex3f, "glVertex3f");
|
||||
pragma Import (StdCall, glVertex3fv, "glVertex3fv");
|
||||
pragma Import (StdCall, glVertexPointer, "glVertexPointer");
|
||||
|
||||
end GL.safe;
|
||||
|
||||
-- TODO: Bind these missing functions, if needed.
|
||||
--
|
||||
-- GLAPI void APIENTRY glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *table);
|
||||
-- GLAPI void APIENTRY glColorTableEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
|
||||
-- GLAPI void APIENTRY glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *table);
|
||||
-- GLAPI void APIENTRY glGetColorTableParameterivEXT
|
||||
-- (GLenum target, GLenum pname, GLint *params);
|
||||
284
3-mid/opengl/private/gl/source/gl.ads
Normal file
284
3-mid/opengl/private/gl/source/gl.ads
Normal file
@@ -0,0 +1,284 @@
|
||||
with
|
||||
GL_Types,
|
||||
Interfaces.C;
|
||||
|
||||
package GL
|
||||
--
|
||||
-- Provides types and constants common to all openGL profiles.
|
||||
--
|
||||
is
|
||||
pragma Pure;
|
||||
|
||||
use Interfaces;
|
||||
|
||||
---------
|
||||
-- Types
|
||||
--
|
||||
|
||||
-- GLvoid
|
||||
--
|
||||
subtype GLvoid is GL_Types.GLvoid;
|
||||
type GLvoid_array is array (C.size_t range <>) of aliased GLvoid;
|
||||
|
||||
-- GLenum
|
||||
--
|
||||
subtype GLenum is GL_Types.GLenum;
|
||||
type GLenum_array is array (C.size_t range <>) of aliased GLenum;
|
||||
|
||||
-- GLboolean
|
||||
--
|
||||
subtype GLboolean is GL_Types.GLboolean;
|
||||
type GLboolean_array is array (C.size_t range <>) of aliased GLboolean;
|
||||
|
||||
-- GLbitfield
|
||||
--
|
||||
subtype GLbitfield is GL_Types.GLbitfield;
|
||||
type GLbitfield_array is array (C.size_t range <>) of aliased GLbitfield;
|
||||
|
||||
-- GLshort
|
||||
--
|
||||
subtype GLshort is GL_Types.GLshort;
|
||||
type GLshort_array is array (C.size_t range <>) of aliased GLshort;
|
||||
|
||||
-- GLint
|
||||
--
|
||||
subtype GLint is GL_Types.GLint;
|
||||
type GLint_array is array (C.size_t range <>) of aliased GLint;
|
||||
|
||||
-- GLsizei
|
||||
--
|
||||
subtype GLsizei is GL_Types.GLsizei;
|
||||
type GLsizei_array is array (C.size_t range <>) of aliased GLsizei;
|
||||
|
||||
-- GLushort
|
||||
--
|
||||
subtype GLushort is GL_Types.GLushort;
|
||||
type GLushort_array is array (C.size_t range <>) of aliased GLushort;
|
||||
|
||||
-- GLuint
|
||||
--
|
||||
subtype GLuint is GL_Types.GLuint;
|
||||
type GLuint_array is array (C.size_t range <>) of aliased GLuint;
|
||||
|
||||
|
||||
-- GLbyte
|
||||
--
|
||||
subtype GLbyte is GL_Types.GLbyte;
|
||||
type GLbyte_array is array (C.size_t range <>) of aliased GLbyte;
|
||||
|
||||
|
||||
-- GLubyte
|
||||
--
|
||||
subtype GLubyte is GL_Types.GLubyte;
|
||||
type GLubyte_array is array (C.size_t range <>) of aliased GLubyte;
|
||||
|
||||
|
||||
-- GLfloat
|
||||
--
|
||||
subtype GLfloat is GL_Types.GLfloat;
|
||||
type GLfloat_array is array (C.size_t range <>) of aliased GLfloat;
|
||||
|
||||
|
||||
-- GLclampf
|
||||
--
|
||||
subtype GLclampf is GL_Types.GLclampf;
|
||||
type GLclampf_array is array (C.size_t range <>) of aliased GLclampf;
|
||||
|
||||
|
||||
-------------
|
||||
-- Constants
|
||||
--
|
||||
|
||||
-- ClearBufferMask
|
||||
GL_DEPTH_BUFFER_BIT : constant := 16#100#;
|
||||
GL_STENCIL_BUFFER_BIT : constant := 16#400#;
|
||||
GL_COLOR_BUFFER_BIT : constant := 16#4000#;
|
||||
|
||||
-- Boolean
|
||||
GL_FALSE : constant := 0;
|
||||
GL_TRUE : constant := 1;
|
||||
|
||||
-- BeginMode
|
||||
GL_POINTS : constant := 16#0#;
|
||||
GL_LINES : constant := 16#1#;
|
||||
GL_LINE_LOOP : constant := 16#2#;
|
||||
GL_LINE_STRIP : constant := 16#3#;
|
||||
GL_TRIANGLES : constant := 16#4#;
|
||||
GL_TRIANGLE_STRIP : constant := 16#5#;
|
||||
GL_TRIANGLE_FAN : constant := 16#6#;
|
||||
|
||||
-- BlendingFactorDest
|
||||
GL_ZERO : constant := 0;
|
||||
GL_ONE : constant := 1;
|
||||
GL_ONE_MINUS_SRC_ALPHA : constant := 16#303#;
|
||||
|
||||
-- BlendingFactorSrc
|
||||
GL_SRC_ALPHA : constant := 16#302#;
|
||||
GL_SRC_ALPHA_SATURATE : constant := 16#308#;
|
||||
|
||||
-- CullFaceMode
|
||||
GL_FRONT : constant := 16#404#;
|
||||
GL_BACK : constant := 16#405#;
|
||||
GL_FRONT_AND_BACK : constant := 16#408#;
|
||||
|
||||
-- EnableCap
|
||||
GL_TEXTURE_2D : constant := 16#de1#;
|
||||
GL_CULL_FACE : constant := 16#b44#;
|
||||
GL_BLEND : constant := 16#be2#;
|
||||
GL_STENCIL_TEST : constant := 16#b90#;
|
||||
GL_DEPTH_TEST : constant := 16#b71#;
|
||||
GL_SCISSOR_TEST : constant := 16#c11#;
|
||||
GL_POLYGON_OFFSET_FILL : constant := 16#8037#;
|
||||
|
||||
-- ErrorCode
|
||||
GL_NO_ERROR : constant := 0;
|
||||
GL_INVALID_ENUM : constant := 16#500#;
|
||||
GL_INVALID_VALUE : constant := 16#501#;
|
||||
GL_INVALID_OPERATION : constant := 16#502#;
|
||||
GL_OUT_OF_MEMORY : constant := 16#505#;
|
||||
|
||||
-- FrontFaceDirection
|
||||
GL_CW : constant := 16#900#;
|
||||
GL_CCW : constant := 16#901#;
|
||||
|
||||
|
||||
-- TODO: As above, categorise and add category comment for the following ...
|
||||
--
|
||||
|
||||
GL_LINE_WIDTH : constant := 16#b21#;
|
||||
|
||||
GL_ALIASED_POINT_SIZE_RANGE : constant := 16#846d#;
|
||||
GL_ALIASED_LINE_WIDTH_RANGE : constant := 16#846e#;
|
||||
|
||||
GL_CULL_FACE_MODE : constant := 16#b45#;
|
||||
GL_FRONT_FACE : constant := 16#b46#;
|
||||
GL_DEPTH_RANGE : constant := 16#b70#;
|
||||
GL_DEPTH_WRITEMASK : constant := 16#b72#;
|
||||
GL_DEPTH_CLEAR_VALUE : constant := 16#b73#;
|
||||
GL_DEPTH_FUNC : constant := 16#b74#;
|
||||
|
||||
GL_STENCIL_CLEAR_VALUE : constant := 16#b91#;
|
||||
GL_STENCIL_FUNC : constant := 16#b92#;
|
||||
GL_STENCIL_FAIL : constant := 16#b94#;
|
||||
GL_STENCIL_PASS_DEPTH_FAIL : constant := 16#b95#;
|
||||
GL_STENCIL_PASS_DEPTH_PASS : constant := 16#b96#;
|
||||
GL_STENCIL_REF : constant := 16#b97#;
|
||||
GL_STENCIL_VALUE_MASK : constant := 16#b93#;
|
||||
GL_STENCIL_WRITEMASK : constant := 16#b98#;
|
||||
|
||||
GL_VIEWPORT : constant := 16#ba2#;
|
||||
GL_SCISSOR_BOX : constant := 16#c10#;
|
||||
|
||||
GL_COLOR_CLEAR_VALUE : constant := 16#c22#;
|
||||
GL_COLOR_WRITEMASK : constant := 16#c23#;
|
||||
|
||||
GL_UNPACK_ALIGNMENT : constant := 16#cf5#;
|
||||
GL_PACK_ALIGNMENT : constant := 16#d05#;
|
||||
|
||||
GL_MAX_TEXTURE_SIZE : constant := 16#d33#;
|
||||
GL_MAX_VIEWPORT_DIMS : constant := 16#d3a#;
|
||||
|
||||
GL_SUBPIXEL_BITS : constant := 16#d50#;
|
||||
GL_RED_BITS : constant := 16#d52#;
|
||||
GL_GREEN_BITS : constant := 16#d53#;
|
||||
GL_BLUE_BITS : constant := 16#d54#;
|
||||
GL_ALPHA_BITS : constant := 16#d55#;
|
||||
GL_DEPTH_BITS : constant := 16#d56#;
|
||||
GL_STENCIL_BITS : constant := 16#d57#;
|
||||
|
||||
GL_POLYGON_OFFSET_UNITS : constant := 16#2a00#;
|
||||
GL_POLYGON_OFFSET_FACTOR : constant := 16#8038#;
|
||||
|
||||
GL_TEXTURE_BINDING_2D : constant := 16#8069#;
|
||||
|
||||
GL_DONT_CARE : constant := 16#1100#;
|
||||
GL_FASTEST : constant := 16#1101#;
|
||||
GL_NICEST : constant := 16#1102#;
|
||||
|
||||
GL_BYTE : constant := 16#1400#;
|
||||
GL_UNSIGNED_BYTE : constant := 16#1401#;
|
||||
GL_INT : constant := 16#1404#;
|
||||
GL_UNSIGNED_INT : constant := 16#1405#;
|
||||
GL_FLOAT : constant := 16#1406#;
|
||||
|
||||
GL_ALPHA : constant := 16#1906#;
|
||||
GL_RGB : constant := 16#1907#;
|
||||
GL_RGBA : constant := 16#1908#;
|
||||
GL_LUMINANCE : constant := 16#1909#;
|
||||
GL_LUMINANCE_ALPHA : constant := 16#190a#;
|
||||
|
||||
GL_NEVER : constant := 16#200#;
|
||||
GL_LESS : constant := 16#201#;
|
||||
GL_EQUAL : constant := 16#202#;
|
||||
GL_LEQUAL : constant := 16#203#;
|
||||
GL_GREATER : constant := 16#204#;
|
||||
GL_NOTEQUAL : constant := 16#205#;
|
||||
GL_GEQUAL : constant := 16#206#;
|
||||
GL_ALWAYS : constant := 16#207#;
|
||||
|
||||
GL_KEEP : constant := 16#1e00#;
|
||||
GL_REPLACE : constant := 16#1e01#;
|
||||
GL_INCR : constant := 16#1e02#;
|
||||
GL_DECR : constant := 16#1e03#;
|
||||
|
||||
GL_INVERT : constant := 16#150a#;
|
||||
|
||||
GL_VENDOR : constant := 16#1f00#;
|
||||
GL_RENDERER : constant := 16#1f01#;
|
||||
GL_VERSION : constant := 16#1f02#;
|
||||
GL_EXTENSIONS : constant := 16#1f03#;
|
||||
|
||||
GL_MAJOR_VERSION : constant := 16#821B#;
|
||||
GL_MINOR_VERSION : constant := 16#821C#;
|
||||
|
||||
GL_NEAREST : constant := 16#2600#;
|
||||
GL_LINEAR : constant := 16#2601#;
|
||||
|
||||
GL_NEAREST_MIPMAP_NEAREST : constant := 16#2700#;
|
||||
GL_LINEAR_MIPMAP_NEAREST : constant := 16#2701#;
|
||||
GL_NEAREST_MIPMAP_LINEAR : constant := 16#2702#;
|
||||
GL_LINEAR_MIPMAP_LINEAR : constant := 16#2703#;
|
||||
|
||||
GL_TEXTURE_MAG_FILTER : constant := 16#2800#;
|
||||
GL_TEXTURE_MIN_FILTER : constant := 16#2801#;
|
||||
GL_TEXTURE_WRAP_S : constant := 16#2802#;
|
||||
GL_TEXTURE_WRAP_T : constant := 16#2803#;
|
||||
|
||||
GL_TEXTURE0 : constant := 16#84c0#;
|
||||
GL_TEXTURE1 : constant := 16#84c1#;
|
||||
GL_TEXTURE2 : constant := 16#84c2#;
|
||||
GL_TEXTURE3 : constant := 16#84c3#;
|
||||
GL_TEXTURE4 : constant := 16#84c4#;
|
||||
GL_TEXTURE5 : constant := 16#84c5#;
|
||||
GL_TEXTURE6 : constant := 16#84c6#;
|
||||
GL_TEXTURE7 : constant := 16#84c7#;
|
||||
GL_TEXTURE8 : constant := 16#84c8#;
|
||||
GL_TEXTURE9 : constant := 16#84c9#;
|
||||
GL_TEXTURE10 : constant := 16#84ca#;
|
||||
GL_TEXTURE11 : constant := 16#84cb#;
|
||||
GL_TEXTURE12 : constant := 16#84cc#;
|
||||
GL_TEXTURE13 : constant := 16#84cd#;
|
||||
GL_TEXTURE14 : constant := 16#84ce#;
|
||||
GL_TEXTURE15 : constant := 16#84cf#;
|
||||
GL_TEXTURE16 : constant := 16#84d0#;
|
||||
GL_TEXTURE17 : constant := 16#84d1#;
|
||||
GL_TEXTURE18 : constant := 16#84d2#;
|
||||
GL_TEXTURE19 : constant := 16#84d3#;
|
||||
GL_TEXTURE20 : constant := 16#84d4#;
|
||||
GL_TEXTURE21 : constant := 16#84d5#;
|
||||
GL_TEXTURE22 : constant := 16#84d6#;
|
||||
GL_TEXTURE23 : constant := 16#84d7#;
|
||||
GL_TEXTURE24 : constant := 16#84d8#;
|
||||
GL_TEXTURE25 : constant := 16#84d9#;
|
||||
GL_TEXTURE26 : constant := 16#84da#;
|
||||
GL_TEXTURE27 : constant := 16#84db#;
|
||||
GL_TEXTURE28 : constant := 16#84dc#;
|
||||
GL_TEXTURE29 : constant := 16#84dd#;
|
||||
GL_TEXTURE30 : constant := 16#84de#;
|
||||
GL_TEXTURE31 : constant := 16#84df#;
|
||||
|
||||
GL_ACTIVE_TEXTURE : constant := 16#84e0#;
|
||||
GL_REPEAT : constant := 16#2901#;
|
||||
GL_CLAMP_TO_EDGE : constant := 16#812f#;
|
||||
|
||||
end GL;
|
||||
33
3-mid/opengl/private/gl/source/gl_types.ads
Normal file
33
3-mid/opengl/private/gl/source/gl_types.ads
Normal file
@@ -0,0 +1,33 @@
|
||||
with
|
||||
Interfaces.C,
|
||||
System;
|
||||
|
||||
package GL_Types
|
||||
--
|
||||
-- Provides openGL types whose definitions may differ amongst platforms.
|
||||
--
|
||||
-- This file is generated by the 'generate_GL_types_Spec' tool.
|
||||
--
|
||||
is
|
||||
pragma Pure;
|
||||
use Interfaces;
|
||||
|
||||
subtype GLenum is C.unsigned;
|
||||
subtype GLboolean is C.unsigned_char;
|
||||
subtype GLbitfield is C.unsigned;
|
||||
subtype GLvoid is system.Address;
|
||||
subtype GLbyte is C.signed_char;
|
||||
subtype GLshort is C.short;
|
||||
subtype GLint is C.int;
|
||||
subtype GLubyte is C.unsigned_char;
|
||||
subtype GLushort is C.unsigned_short;
|
||||
subtype GLuint is C.unsigned;
|
||||
subtype GLsizei is C.int;
|
||||
subtype GLfloat is C.C_float;
|
||||
subtype GLclampf is C.C_float;
|
||||
subtype GLdouble is C.double;
|
||||
subtype GLclampd is C.double;
|
||||
subtype GLchar is C.char;
|
||||
subtype GLfixed is Integer_32;
|
||||
|
||||
end GL_Types;
|
||||
1202
3-mid/opengl/private/gl/source/glu.adb
Normal file
1202
3-mid/opengl/private/gl/source/glu.adb
Normal file
File diff suppressed because it is too large
Load Diff
30
3-mid/opengl/private/gl/source/glu.ads
Normal file
30
3-mid/opengl/private/gl/source/glu.ads
Normal file
@@ -0,0 +1,30 @@
|
||||
with
|
||||
GL,
|
||||
System;
|
||||
|
||||
package GLU
|
||||
with Obsolescent
|
||||
--
|
||||
-- Provides a subset of the functions in GLU, tailored to be suitable for use with the openGL 'Embedded' profile.
|
||||
--
|
||||
-- Currently only 'gluScaleImage' is ported.
|
||||
--
|
||||
is
|
||||
use GL;
|
||||
|
||||
procedure gluScaleImage (Format : in GLenum;
|
||||
WidthIn : in GLsizei;
|
||||
HeightIn : in GLsizei;
|
||||
TypeIn : in GLenum;
|
||||
DataIn : in System.Address;
|
||||
WidthOut : in GLsizei;
|
||||
HeightOut : in GLsizei;
|
||||
TypeOut : in GLenum;
|
||||
DataOut : in System.Address);
|
||||
GLU_INVALID_VALUE,
|
||||
GLU_INVALID_ENUM,
|
||||
GLU_INVALID_TYPE,
|
||||
GLU_INVALID_OPERATION,
|
||||
GLU_OUT_OF_MEMORY : exception;
|
||||
|
||||
end GLU;
|
||||
4
3-mid/opengl/private/gl/source/glx/gl-glx.ads
Normal file
4
3-mid/opengl/private/gl/source/glx/gl-glx.ads
Normal file
@@ -0,0 +1,4 @@
|
||||
package gl.GLX
|
||||
is
|
||||
pragma Pure;
|
||||
end gl.GLX;
|
||||
366
3-mid/opengl/private/gl/source/wgl/gl-wgl.ads
Normal file
366
3-mid/opengl/private/gl/source/wgl/gl-wgl.ads
Normal file
@@ -0,0 +1,366 @@
|
||||
--
|
||||
-- Copyright (c) 2002-2003, David Holm
|
||||
-- All rights reserved.
|
||||
--
|
||||
-- Redistribution and use in source and binary forms, with or without
|
||||
-- modification, are permitted provided that the following conditions are
|
||||
-- met:
|
||||
--
|
||||
-- * Redistributions of source code must retain the above copyright notice,
|
||||
-- this list of conditions and the following disclaimer.
|
||||
-- * Redistributions in binary form must reproduce the above copyright
|
||||
-- notice,
|
||||
-- this list of conditions and the following disclaimer in the
|
||||
-- documentation
|
||||
-- and/or other materials provided with the distribution.
|
||||
-- * The names of its contributors may not be used to endorse or promote
|
||||
-- products derived from this software without specific prior written
|
||||
-- permission.
|
||||
--
|
||||
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
-- "AS IS"
|
||||
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
-- SUBSTITUTE GOODS OR SERVICES;
|
||||
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
-- POSSIBILITY OF SUCH DAMAGE.
|
||||
--
|
||||
|
||||
with Interfaces.C;
|
||||
with Interfaces.C.Extensions;
|
||||
with System;
|
||||
|
||||
package GL.WGL is
|
||||
|
||||
WGL_FONT_LINES : constant := 8#0000#;
|
||||
WGL_FONT_POLYGONS : constant := 1;
|
||||
WGL_SWAP_MAIN_PLANE : constant := 1;
|
||||
WGL_SWAP_OVERLAY1 : constant := 2;
|
||||
WGL_SWAP_OVERLAY2 : constant := 4;
|
||||
WGL_SWAP_OVERLAY3 : constant := 8;
|
||||
WGL_SWAP_OVERLAY4 : constant := 16#0010#;
|
||||
WGL_SWAP_OVERLAY5 : constant := 16#0020#;
|
||||
WGL_SWAP_OVERLAY6 : constant := 16#0040#;
|
||||
WGL_SWAP_OVERLAY7 : constant := 16#0080#;
|
||||
WGL_SWAP_OVERLAY8 : constant := 16#0100#;
|
||||
WGL_SWAP_OVERLAY9 : constant := 16#0200#;
|
||||
WGL_SWAP_OVERLAY10 : constant := 16#0400#;
|
||||
WGL_SWAP_OVERLAY11 : constant := 16#0800#;
|
||||
WGL_SWAP_OVERLAY12 : constant := 16#1000#;
|
||||
WGL_SWAP_OVERLAY13 : constant := 16#2000#;
|
||||
WGL_SWAP_OVERLAY14 : constant := 16#4000#;
|
||||
WGL_SWAP_OVERLAY15 : constant := 16#8000#;
|
||||
WGL_SWAP_UNDERLAY1 : constant := 16#0001_0000#;
|
||||
WGL_SWAP_UNDERLAY2 : constant := 16#0002_0000#;
|
||||
WGL_SWAP_UNDERLAY3 : constant := 16#0004_0000#;
|
||||
WGL_SWAP_UNDERLAY4 : constant := 16#0008_0000#;
|
||||
WGL_SWAP_UNDERLAY5 : constant := 16#0010_0000#;
|
||||
WGL_SWAP_UNDERLAY6 : constant := 16#0020_0000#;
|
||||
WGL_SWAP_UNDERLAY7 : constant := 16#0040_0000#;
|
||||
WGL_SWAP_UNDERLAY8 : constant := 16#0080_0000#;
|
||||
WGL_SWAP_UNDERLAY9 : constant := 16#0100_0000#;
|
||||
WGL_SWAP_UNDERLAY10 : constant := 16#0200_0000#;
|
||||
WGL_SWAP_UNDERLAY11 : constant := 16#0400_0000#;
|
||||
WGL_SWAP_UNDERLAY12 : constant := 16#0800_0000#;
|
||||
WGL_SWAP_UNDERLAY13 : constant := 16#1000_0000#;
|
||||
WGL_SWAP_UNDERLAY14 : constant := 16#2000_0000#;
|
||||
WGL_SWAP_UNDERLAY15 : constant := 16#4000_0000#;
|
||||
|
||||
type Pixel_Format_Descriptor is
|
||||
record
|
||||
nSize : Interfaces.C.short;
|
||||
nVersion : Interfaces.C.short;
|
||||
dwFlags : Interfaces.C.long;
|
||||
iPixelType : Interfaces.C.char;
|
||||
cColorBits : Interfaces.C.char;
|
||||
cRedBits : Interfaces.C.char;
|
||||
cRedShift : Interfaces.C.char;
|
||||
cGreenBits : Interfaces.C.char;
|
||||
cGreenShift : Interfaces.C.char;
|
||||
cBlueBits : Interfaces.C.char;
|
||||
cBlueShift : Interfaces.C.char;
|
||||
cAlphaBits : Interfaces.C.char;
|
||||
cAlphaShift : Interfaces.C.char;
|
||||
cAccumBits : Interfaces.C.char;
|
||||
cAccumRedBits : Interfaces.C.char;
|
||||
cAccumGreenBits : Interfaces.C.char;
|
||||
cAccumBlueBits : Interfaces.C.char;
|
||||
cAccumAlphaBits : Interfaces.C.char;
|
||||
cDepthBits : Interfaces.C.char;
|
||||
cStencilBits : Interfaces.C.char;
|
||||
cAuxBuffers : Interfaces.C.char;
|
||||
iLayerType : Interfaces.C.char;
|
||||
bReserved : Interfaces.C.char;
|
||||
dwLayerMask : Interfaces.C.long;
|
||||
dwVisibleMask : Interfaces.C.long;
|
||||
dwDamageMask : Interfaces.C.long;
|
||||
end record;
|
||||
pragma Convention (C_Pass_By_Copy, Pixel_Format_Descriptor);
|
||||
|
||||
type Point_Float is
|
||||
record
|
||||
x : Interfaces.C.C_float;
|
||||
y : Interfaces.C.C_float;
|
||||
end record;
|
||||
pragma Convention (C_Pass_By_Copy, Point_Float);
|
||||
|
||||
type Glyph_Metrics_Float is
|
||||
record
|
||||
gmfBlackBoxX : Interfaces.C.C_float;
|
||||
gmfBlackBoxY : Interfaces.C.C_float;
|
||||
gmfptGlyphOrigin : Point_Float;
|
||||
gmfCellIncX : Interfaces.C.C_float;
|
||||
gmfCellIncY : Interfaces.C.C_float;
|
||||
end record;
|
||||
pragma Convention (C_Pass_By_Copy, Glyph_Metrics_Float);
|
||||
|
||||
type COLORREF is new Interfaces.C.long;
|
||||
type COLORREF_Type is access all COLORREF;
|
||||
|
||||
type Layer_Plane_Descriptor is
|
||||
record
|
||||
nSize : Interfaces.C.short;
|
||||
nVersion : Interfaces.C.short;
|
||||
dwFlags : Interfaces.C.long;
|
||||
iPixelType : Interfaces.C.char;
|
||||
cColorBits : Interfaces.C.char;
|
||||
cRedBits : Interfaces.C.char;
|
||||
cRedShift : Interfaces.C.char;
|
||||
cGreenBits : Interfaces.C.char;
|
||||
cGreenShift : Interfaces.C.char;
|
||||
cBlueBits : Interfaces.C.char;
|
||||
cBlueShift : Interfaces.C.char;
|
||||
cAlphaBits : Interfaces.C.char;
|
||||
cAlphaShift : Interfaces.C.char;
|
||||
cAccumBits : Interfaces.C.char;
|
||||
cAccumRedBits : Interfaces.C.char;
|
||||
cAccumGreenBits : Interfaces.C.char;
|
||||
cAccumBlueBits : Interfaces.C.char;
|
||||
cAccumAlphaBits : Interfaces.C.char;
|
||||
cDepthBits : Interfaces.C.char;
|
||||
cStencilBits : Interfaces.C.char;
|
||||
cAuxBuffers : Interfaces.C.char;
|
||||
iLayerPlane : Interfaces.C.char;
|
||||
bReserved : Interfaces.C.char;
|
||||
crTransparent : COLORREF;
|
||||
end record;
|
||||
pragma Convention (C_Pass_By_Copy, Layer_Plane_Descriptor);
|
||||
|
||||
type Layer_Plane_Descriptor_Type is access all Layer_Plane_Descriptor;
|
||||
type Glyph_Metrics_Float_Type is access all Glyph_Metrics_Float;
|
||||
type Pixel_Format_Descriptor_Type is access all Pixel_Format_Descriptor;
|
||||
|
||||
type HANDLE is new Interfaces.C.Extensions.void_ptr;
|
||||
subtype HDC is HANDLE;
|
||||
subtype HGLRC is HANDLE;
|
||||
|
||||
type PROC is access function return Interfaces.C.int;
|
||||
|
||||
function wglDeleteContext (Rendering_Context : HGLRC)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglMakeCurrent (Device_Context : HDC;
|
||||
Rendering_Context : HGLRC)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglSetPixelFormat (Device_Context : HDC;
|
||||
Pixel_Format : Interfaces.C.int;
|
||||
Pixel_Format_Desc :
|
||||
access Pixel_Format_Descriptor_Type)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglSwapBuffers (Device_Context : HDC)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglGetCurrentDC return HANDLE;
|
||||
|
||||
function wglCreateContext (Device_Context : HDC)
|
||||
return HANDLE;
|
||||
|
||||
function wglCreateLayerContext (Device_Context : HDC;
|
||||
Layer_Plane : Interfaces.C.int)
|
||||
return HANDLE;
|
||||
|
||||
function wglGetCurrentContext return HANDLE;
|
||||
|
||||
function wglGetProcAddress (Proc_Desc : access Interfaces.C.char) return PROC;
|
||||
|
||||
function wglChoosePixelFormat (Device_Context : HDC;
|
||||
Pixel_Format_Desc :
|
||||
access Pixel_Format_Descriptor_Type)
|
||||
return Interfaces.C.int;
|
||||
|
||||
|
||||
function wglCopyContext (Rendering_Context_Source : HGLRC;
|
||||
Rendering_Context_Dest : HGLRC;
|
||||
Mask :
|
||||
Interfaces.C.unsigned)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglDescribeLayerPlane (Device_Context : HDC;
|
||||
Pixel_Format : Interfaces.C.int;
|
||||
Layer_Plane : Interfaces.C.int;
|
||||
Bytes : Interfaces.C.unsigned;
|
||||
Plane_Desc :
|
||||
Layer_Plane_Descriptor_Type)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglDescribePixelFormat (Device_Context : HDC;
|
||||
Layer_Plane : Interfaces.C.int;
|
||||
Bytes :
|
||||
Interfaces.C.unsigned;
|
||||
Pixel_Format_Desc :
|
||||
Pixel_Format_Descriptor_Type)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglGetLayerPaletteEntries (Device_Context : HDC;
|
||||
Layer_Plane : Interfaces.C.int;
|
||||
Start : Interfaces.C.int;
|
||||
Entries : Interfaces.C.int;
|
||||
Color_Ref :
|
||||
access Interfaces.C.long)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglGetPixelFormat (Device_Context : HDC)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglRealizeLayerPalette (Device_Context : HDC;
|
||||
Layer_Plane : Interfaces.C.int;
|
||||
Realize : Boolean)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglSetLayerPaletteEntries (Device_Context : HDC;
|
||||
Layer_Plane : Interfaces.C.int;
|
||||
Start : Interfaces.C.int;
|
||||
Entries : Interfaces.C.int;
|
||||
Color_Reference : COLORREF_Type)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglShareLists (Existing_Rendering_Context : HGLRC;
|
||||
New_Rendering_Context : HGLRC)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglSwapLayerBuffers (Device_Context : HDC;
|
||||
Planes : Interfaces.C.unsigned)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglUseFontBitmapsA (Device_Context : HDC;
|
||||
First : Interfaces.C.unsigned;
|
||||
Count : Interfaces.C.unsigned;
|
||||
List_Base : Interfaces.C.unsigned)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglUseFontBitmapsW (Device_Context : HDC;
|
||||
First : Interfaces.C.unsigned;
|
||||
Count : Interfaces.C.unsigned;
|
||||
List_Base : Interfaces.C.unsigned)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglUseFontOutlinesA (Device_Context : HDC;
|
||||
First : Interfaces.C.unsigned;
|
||||
Count : Interfaces.C.unsigned;
|
||||
List_Base : Interfaces.C.unsigned;
|
||||
Deviation : Interfaces.C.C_float;
|
||||
Extrusion : Interfaces.C.C_float;
|
||||
Format : Interfaces.C.int;
|
||||
Glyph_Data_Buffer : Glyph_Metrics_Float_Type)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function wglUseFontOutlinesW (Device_Context : HDC;
|
||||
First : Interfaces.C.unsigned;
|
||||
Count : Interfaces.C.unsigned;
|
||||
List_Base : Interfaces.C.unsigned;
|
||||
Deviation : Interfaces.C.C_float;
|
||||
Extrusion : Interfaces.C.C_float;
|
||||
Format : Interfaces.C.int;
|
||||
Glyph_Data_Buffer : Glyph_Metrics_Float_Type)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function SwapBuffers (Device_Context : HDC) return
|
||||
Interfaces.C.int;
|
||||
|
||||
function ChoosePixelFormat (Device_Context : HDC;
|
||||
Pixel_Format_Desc :
|
||||
access Pixel_Format_Descriptor_Type)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function DescribePixelFormat (Device_Context : HDC;
|
||||
Pixel_Format : Interfaces.C.int;
|
||||
Bytes : Interfaces.C.unsigned;
|
||||
Pixel_Format_Desc :
|
||||
Pixel_Format_Descriptor_Type)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function GetPixelFormat (Device_Context : HDC)
|
||||
return Interfaces.C.int;
|
||||
|
||||
function SetPixelFormat (Device_Context : HDC;
|
||||
Pixel_Format : Interfaces.C.int;
|
||||
Pixel_Format_Desc :
|
||||
access Pixel_Format_Descriptor_Type)
|
||||
return Interfaces.C.int;
|
||||
|
||||
private
|
||||
|
||||
pragma Import (StdCall, wglDeleteContext, "wglDeleteContext");
|
||||
|
||||
pragma Import (StdCall, wglMakeCurrent, "wglMakeCurrent");
|
||||
|
||||
pragma Import (StdCall, wglSetPixelFormat, "wglSetPixelFormat");
|
||||
|
||||
pragma Import (StdCall, wglSwapBuffers, "wglSwapBuffers");
|
||||
|
||||
pragma Import (StdCall, wglGetCurrentDC, "wglGetCurrentDC");
|
||||
|
||||
pragma Import (StdCall, wglCreateContext, "wglCreateContext");
|
||||
|
||||
pragma Import (StdCall, wglCreateLayerContext, "wglCreateLayerContext");
|
||||
|
||||
pragma Import (StdCall, wglGetCurrentContext, "wglGetCurrentContext");
|
||||
|
||||
pragma Import (StdCall, wglGetProcAddress, "wglGetProcAddress");
|
||||
|
||||
pragma Import (StdCall, wglChoosePixelFormat, "wglChoosePixelFormat");
|
||||
|
||||
pragma Import (StdCall, wglCopyContext, "wglCopyContext");
|
||||
|
||||
pragma Import (StdCall, wglDescribeLayerPlane, "wglDescribeLayerPlane");
|
||||
|
||||
pragma Import (StdCall, wglDescribePixelFormat, "wglDescribePixelFormat");
|
||||
|
||||
pragma Import (StdCall, wglGetLayerPaletteEntries, "wglGetLayerPaletteEntries");
|
||||
|
||||
pragma Import (StdCall, wglGetPixelFormat, "wglGetPixelFormat");
|
||||
|
||||
pragma Import (StdCall, wglRealizeLayerPalette, "wglRealizeLayerPalette");
|
||||
|
||||
pragma Import (StdCall, wglSetLayerPaletteEntries, "wglSetLayerPaletteEntries");
|
||||
|
||||
pragma Import (StdCall, wglShareLists, "wglShareLists");
|
||||
|
||||
pragma Import (StdCall, wglSwapLayerBuffers, "wglSwapLayerBuffers");
|
||||
|
||||
pragma Import (StdCall, wglUseFontBitmapsA, "wglUseFontBitmapsA");
|
||||
|
||||
pragma Import (StdCall, wglUseFontBitmapsW, "wglUseFontBitmapsW");
|
||||
|
||||
pragma Import (StdCall, wglUseFontOutlinesA, "wglUseFontOutlinesA");
|
||||
|
||||
pragma Import (StdCall, wglUseFontOutlinesW, "wglUseFontOutlinesW");
|
||||
|
||||
pragma Import (StdCall, SwapBuffers, "SwapBuffers");
|
||||
|
||||
pragma Import (StdCall, ChoosePixelFormat, "ChoosePixelFormat");
|
||||
|
||||
pragma Import (StdCall, DescribePixelFormat, "DescribePixelFormat");
|
||||
|
||||
pragma Import (StdCall, GetPixelFormat, "GetPixelFormat");
|
||||
|
||||
pragma Import (StdCall, SetPixelFormat, "SetPixelFormat");
|
||||
|
||||
end GL.WGL;
|
||||
Reference in New Issue
Block a user