Don't use C for constants

This commit is contained in:
Milan Nikolic 2017-12-07 19:52:53 +01:00
parent 6fc955d098
commit 6f72c4f5af
4 changed files with 46 additions and 46 deletions

View file

@ -12,11 +12,11 @@ type CameraMode int32
// Camera system modes // Camera system modes
const ( const (
CameraCustom CameraMode = C.CAMERA_CUSTOM CameraCustom CameraMode = iota
CameraFree CameraMode = C.CAMERA_FREE CameraFree
CameraOrbital CameraMode = C.CAMERA_ORBITAL CameraOrbital
CameraFirstPerson CameraMode = C.CAMERA_FIRST_PERSON CameraFirstPerson
CameraThirdPerson CameraMode = C.CAMERA_THIRD_PERSON CameraThirdPerson
) )
// SetCameraMode - Set camera mode (multiple camera modes available) // SetCameraMode - Set camera mode (multiple camera modes available)

View file

@ -12,17 +12,17 @@ type Gestures int32
// Gestures types // Gestures types
// NOTE: It could be used as flags to enable only some gestures // NOTE: It could be used as flags to enable only some gestures
const ( const (
GestureNone Gestures = C.GESTURE_NONE GestureNone Gestures = 0
GestureTap Gestures = C.GESTURE_TAP GestureTap Gestures = 1
GestureDoubletap Gestures = C.GESTURE_DOUBLETAP GestureDoubletap Gestures = 2
GestureHold Gestures = C.GESTURE_HOLD GestureHold Gestures = 4
GestureDrag Gestures = C.GESTURE_DRAG GestureDrag Gestures = 8
GestureSwipeRight Gestures = C.GESTURE_SWIPE_RIGHT GestureSwipeRight Gestures = 16
GestureSwipeLeft Gestures = C.GESTURE_SWIPE_LEFT GestureSwipeLeft Gestures = 32
GestureSwipeUp Gestures = C.GESTURE_SWIPE_UP GestureSwipeUp Gestures = 64
GestureSwipeDown Gestures = C.GESTURE_SWIPE_DOWN GestureSwipeDown Gestures = 128
GesturePinchIn Gestures = C.GESTURE_PINCH_IN GesturePinchIn Gestures = 256
GesturePinchOut Gestures = C.GESTURE_PINCH_OUT GesturePinchOut Gestures = 512
) )
// SetGesturesEnabled - Enable a set of gestures using flags // SetGesturesEnabled - Enable a set of gestures using flags

View file

@ -67,9 +67,9 @@ type BlendMode int32
// Color blending modes (pre-defined) // Color blending modes (pre-defined)
const ( const (
BlendAlpha BlendMode = C.BLEND_ALPHA BlendAlpha BlendMode = iota
BlendAdditive BlendMode = C.BLEND_ADDITIVE BlendAdditive
BlendMultiplied BlendMode = C.BLEND_MULTIPLIED BlendMultiplied
) )
// Shader type (generic shader) // Shader type (generic shader)

View file

@ -18,41 +18,41 @@ type TextureFormat int32
// NOTE: Support depends on OpenGL version and platform // NOTE: Support depends on OpenGL version and platform
const ( const (
// 8 bit per pixel (no alpha) // 8 bit per pixel (no alpha)
UncompressedGrayscale TextureFormat = C.UNCOMPRESSED_GRAYSCALE UncompressedGrayscale TextureFormat = iota + 1
// 16 bpp (2 channels) // 16 bpp (2 channels)
UncompressedGrayAlpha TextureFormat = C.UNCOMPRESSED_GRAY_ALPHA UncompressedGrayAlpha
// 16 bpp // 16 bpp
UncompressedR5g6b5 TextureFormat = C.UNCOMPRESSED_R5G6B5 UncompressedR5g6b5
// 24 bpp // 24 bpp
UncompressedR8g8b8 TextureFormat = C.UNCOMPRESSED_R8G8B8 UncompressedR8g8b8
// 16 bpp (1 bit alpha) // 16 bpp (1 bit alpha)
UncompressedR5g5b5a1 TextureFormat = C.UNCOMPRESSED_R5G5B5A1 UncompressedR5g5b5a1
// 16 bpp (4 bit alpha) // 16 bpp (4 bit alpha)
UncompressedR4g4b4a4 TextureFormat = C.UNCOMPRESSED_R4G4B4A4 UncompressedR4g4b4a4
// 32 bpp // 32 bpp
UncompressedR8g8b8a8 TextureFormat = C.UNCOMPRESSED_R8G8B8A8 UncompressedR8g8b8a8
// 4 bpp (no alpha) // 4 bpp (no alpha)
CompressedDxt1Rgb TextureFormat = C.COMPRESSED_DXT1_RGB CompressedDxt1Rgb
// 4 bpp (1 bit alpha) // 4 bpp (1 bit alpha)
CompressedDxt1Rgba TextureFormat = C.COMPRESSED_DXT1_RGBA CompressedDxt1Rgba
// 8 bpp // 8 bpp
CompressedDxt3Rgba TextureFormat = C.COMPRESSED_DXT3_RGBA CompressedDxt3Rgba
// 8 bpp // 8 bpp
CompressedDxt5Rgba TextureFormat = C.COMPRESSED_DXT5_RGBA CompressedDxt5Rgba
// 4 bpp // 4 bpp
CompressedEtc1Rgb TextureFormat = C.COMPRESSED_ETC1_RGB CompressedEtc1Rgb
// 4 bpp // 4 bpp
CompressedEtc2Rgb TextureFormat = C.COMPRESSED_ETC2_RGB CompressedEtc2Rgb
// 8 bpp // 8 bpp
CompressedEtc2EacRgba TextureFormat = C.COMPRESSED_ETC2_EAC_RGBA CompressedEtc2EacRgba
// 4 bpp // 4 bpp
CompressedPvrtRgb TextureFormat = C.COMPRESSED_PVRT_RGB CompressedPvrtRgb
// 4 bpp // 4 bpp
CompressedPvrtRgba TextureFormat = C.COMPRESSED_PVRT_RGBA CompressedPvrtRgba
// 8 bpp // 8 bpp
CompressedAstc4x4Rgba TextureFormat = C.COMPRESSED_ASTC_4x4_RGBA CompressedAstc4x4Rgba
// 2 bpp // 2 bpp
CompressedAstc8x8Rgba TextureFormat = C.COMPRESSED_ASTC_8x8_RGBA CompressedAstc8x8Rgba
) )
// TextureFilterMode - Texture filter mode // TextureFilterMode - Texture filter mode
@ -63,17 +63,17 @@ type TextureFilterMode int32
// NOTE 2: Filter is accordingly set for minification and magnification // NOTE 2: Filter is accordingly set for minification and magnification
const ( const (
// No filter, just pixel aproximation // No filter, just pixel aproximation
FilterPoint TextureFilterMode = C.FILTER_POINT FilterPoint TextureFilterMode = iota
// Linear filtering // Linear filtering
FilterBilinear TextureFilterMode = C.FILTER_BILINEAR FilterBilinear
// Trilinear filtering (linear with mipmaps) // Trilinear filtering (linear with mipmaps)
FilterTrilinear TextureFilterMode = C.FILTER_TRILINEAR FilterTrilinear
// Anisotropic filtering 4x // Anisotropic filtering 4x
FilterAnisotropic4x TextureFilterMode = C.FILTER_ANISOTROPIC_4X FilterAnisotropic4x
// Anisotropic filtering 8x // Anisotropic filtering 8x
FilterAnisotropic8x TextureFilterMode = C.FILTER_ANISOTROPIC_8X FilterAnisotropic8x
// Anisotropic filtering 16x // Anisotropic filtering 16x
FilterAnisotropic16x TextureFilterMode = C.FILTER_ANISOTROPIC_16X FilterAnisotropic16x
) )
// TextureWrapMode - Texture wrap mode // TextureWrapMode - Texture wrap mode
@ -81,9 +81,9 @@ type TextureWrapMode int32
// Texture parameters: wrap mode // Texture parameters: wrap mode
const ( const (
WrapRepeat TextureWrapMode = C.WRAP_REPEAT WrapRepeat TextureWrapMode = iota
WrapClamp TextureWrapMode = C.WRAP_CLAMP WrapClamp
WrapMirror TextureWrapMode = C.WRAP_MIRROR WrapMirror
) )
// Image type, bpp always RGBA (32bit) // Image type, bpp always RGBA (32bit)