Vendor updates

This commit is contained in:
2018-10-13 01:38:03 +01:00
parent 0dd44d9de7
commit 197b5e696b
51 changed files with 70978 additions and 10088 deletions

View File

@@ -1,21 +0,0 @@
sudo: false
addons:
apt_packages:
- libgles2-mesa-dev
language: go
go:
- 1.8.x
- 1.4.x
- master
matrix:
allow_failures:
- go: master
fast_finish: true
install:
- # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step).
script:
- go get -t -v ./...
- diff -u <(echo -n) <(gofmt -d -s .)
- # vet is reporting "possible misuse of unsafe.Pointer", need to fix that.
- # go tool vet .
- go test -v -race ./...

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcoreall(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_gl21(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gles2
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_gles231(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcompatibility32(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcore32(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcompatibility33(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcore33(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcompatibility41(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcore41(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcompatibility42(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcore42(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcompatibility43(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcore43(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcompatibility44(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcore44(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcompatibility45(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,7 @@ package gl
#include <stdlib.h>
#include <GL/glx.h>
void* GlowGetProcAddress_glcore45(const char* name) {
return glXGetProcAddress(name);
return glXGetProcAddress((const GLubyte *) name);
}
#endif
*/

View File

@@ -86,6 +86,7 @@ package gl
// typedef double GLdouble;
// typedef double GLclampd;
// typedef void *GLeglClientBufferEXT;
// typedef void *GLeglImageOES;
// typedef char GLchar;
// typedef char GLcharARB;
// #ifdef __APPLE__
@@ -564,7 +565,7 @@ package gl
// typedef void (APIENTRYP GPDEPTHBOUNDSDNV)(GLdouble zmin, GLdouble zmax);
// typedef void (APIENTRYP GPDEPTHFUNC)(GLenum func);
// typedef void (APIENTRYP GPDEPTHMASK)(GLboolean flag);
// typedef void (APIENTRYP GPDEPTHRANGE)(GLdouble xnear, GLdouble xfar);
// typedef void (APIENTRYP GPDEPTHRANGE)(GLdouble n, GLdouble f);
// typedef void (APIENTRYP GPDEPTHRANGEARRAYV)(GLuint first, GLsizei count, const GLdouble * v);
// typedef void (APIENTRYP GPDEPTHRANGEINDEXED)(GLuint index, GLdouble n, GLdouble f);
// typedef void (APIENTRYP GPDEPTHRANGEDNV)(GLdouble zNear, GLdouble zFar);
@@ -630,6 +631,8 @@ package gl
// typedef void (APIENTRYP GPDRAWTRANSFORMFEEDBACKSTREAM)(GLenum mode, GLuint id, GLuint stream);
// typedef void (APIENTRYP GPDRAWTRANSFORMFEEDBACKSTREAMINSTANCED)(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
// typedef void (APIENTRYP GPDRAWVKIMAGENV)(GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
// typedef void (APIENTRYP GPEGLIMAGETARGETTEXSTORAGEEXT)(GLenum target, GLeglImageOES image, const GLint* attrib_list);
// typedef void (APIENTRYP GPEGLIMAGETARGETTEXTURESTORAGEEXT)(GLuint texture, GLeglImageOES image, const GLint* attrib_list);
// typedef void (APIENTRYP GPEDGEFLAG)(GLboolean flag);
// typedef void (APIENTRYP GPEDGEFLAGFORMATNV)(GLsizei stride);
// typedef void (APIENTRYP GPEDGEFLAGPOINTER)(GLsizei stride, const void * pointer);
@@ -4414,8 +4417,8 @@ package gl
// static void glowDepthMask(GPDEPTHMASK fnptr, GLboolean flag) {
// (*fnptr)(flag);
// }
// static void glowDepthRange(GPDEPTHRANGE fnptr, GLdouble xnear, GLdouble xfar) {
// (*fnptr)(xnear, xfar);
// static void glowDepthRange(GPDEPTHRANGE fnptr, GLdouble n, GLdouble f) {
// (*fnptr)(n, f);
// }
// static void glowDepthRangeArrayv(GPDEPTHRANGEARRAYV fnptr, GLuint first, GLsizei count, const GLdouble * v) {
// (*fnptr)(first, count, v);
@@ -4612,6 +4615,12 @@ package gl
// static void glowDrawVkImageNV(GPDRAWVKIMAGENV fnptr, GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1) {
// (*fnptr)(vkImage, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1);
// }
// static void glowEGLImageTargetTexStorageEXT(GPEGLIMAGETARGETTEXSTORAGEEXT fnptr, GLenum target, GLeglImageOES image, const GLint* attrib_list) {
// (*fnptr)(target, image, attrib_list);
// }
// static void glowEGLImageTargetTextureStorageEXT(GPEGLIMAGETARGETTEXTURESTORAGEEXT fnptr, GLuint texture, GLeglImageOES image, const GLint* attrib_list) {
// (*fnptr)(texture, image, attrib_list);
// }
// static void glowEdgeFlag(GPEDGEFLAG fnptr, GLboolean flag) {
// (*fnptr)(flag);
// }
@@ -12149,6 +12158,7 @@ const (
BINORMAL_ARRAY_TYPE_EXT = 0x8440
BITMAP = 0x1A00
BITMAP_TOKEN = 0x0704
BLACKHOLE_RENDER_INTEL = 0x83FC
BLEND = 0x0BE2
BLEND_ADVANCED_COHERENT_KHR = 0x9285
BLEND_ADVANCED_COHERENT_NV = 0x9285
@@ -17357,6 +17367,8 @@ var (
gpDrawTransformFeedbackStream C.GPDRAWTRANSFORMFEEDBACKSTREAM
gpDrawTransformFeedbackStreamInstanced C.GPDRAWTRANSFORMFEEDBACKSTREAMINSTANCED
gpDrawVkImageNV C.GPDRAWVKIMAGENV
gpEGLImageTargetTexStorageEXT C.GPEGLIMAGETARGETTEXSTORAGEEXT
gpEGLImageTargetTextureStorageEXT C.GPEGLIMAGETARGETTEXTURESTORAGEEXT
gpEdgeFlag C.GPEDGEFLAG
gpEdgeFlagFormatNV C.GPEDGEFLAGFORMATNV
gpEdgeFlagPointer C.GPEDGEFLAGPOINTER
@@ -21435,8 +21447,8 @@ func DepthMask(flag bool) {
}
// specify mapping of depth values from normalized device coordinates to window coordinates
func DepthRange(near float64, far float64) {
C.glowDepthRange(gpDepthRange, (C.GLdouble)(near), (C.GLdouble)(far))
func DepthRange(n float64, f float64) {
C.glowDepthRange(gpDepthRange, (C.GLdouble)(n), (C.GLdouble)(f))
}
func DepthRangeArrayv(first uint32, count int32, v *float64) {
C.glowDepthRangeArrayv(gpDepthRangeArrayv, (C.GLuint)(first), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(v)))
@@ -21687,6 +21699,12 @@ func DrawTransformFeedbackStreamInstanced(mode uint32, id uint32, stream uint32,
func DrawVkImageNV(vkImage uint64, sampler uint32, x0 float32, y0 float32, x1 float32, y1 float32, z float32, s0 float32, t0 float32, s1 float32, t1 float32) {
C.glowDrawVkImageNV(gpDrawVkImageNV, (C.GLuint64)(vkImage), (C.GLuint)(sampler), (C.GLfloat)(x0), (C.GLfloat)(y0), (C.GLfloat)(x1), (C.GLfloat)(y1), (C.GLfloat)(z), (C.GLfloat)(s0), (C.GLfloat)(t0), (C.GLfloat)(s1), (C.GLfloat)(t1))
}
func EGLImageTargetTexStorageEXT(target uint32, image C.GLeglImageOES, attrib_list *int32) {
C.glowEGLImageTargetTexStorageEXT(gpEGLImageTargetTexStorageEXT, (C.GLenum)(target), (C.GLeglImageOES)(image), (*C.GLint)(unsafe.Pointer(attrib_list)))
}
func EGLImageTargetTextureStorageEXT(texture uint32, image C.GLeglImageOES, attrib_list *int32) {
C.glowEGLImageTargetTextureStorageEXT(gpEGLImageTargetTextureStorageEXT, (C.GLuint)(texture), (C.GLeglImageOES)(image), (*C.GLint)(unsafe.Pointer(attrib_list)))
}
// flag edges as either boundary or nonboundary
func EdgeFlag(flag bool) {
@@ -30979,6 +30997,8 @@ func InitWithProcAddrFunc(getProcAddr func(name string) unsafe.Pointer) error {
return errors.New("glDrawTransformFeedbackStreamInstanced")
}
gpDrawVkImageNV = (C.GPDRAWVKIMAGENV)(getProcAddr("glDrawVkImageNV"))
gpEGLImageTargetTexStorageEXT = (C.GPEGLIMAGETARGETTEXSTORAGEEXT)(getProcAddr("glEGLImageTargetTexStorageEXT"))
gpEGLImageTargetTextureStorageEXT = (C.GPEGLIMAGETARGETTEXTURESTORAGEEXT)(getProcAddr("glEGLImageTargetTextureStorageEXT"))
gpEdgeFlag = (C.GPEDGEFLAG)(getProcAddr("glEdgeFlag"))
if gpEdgeFlag == nil {
return errors.New("glEdgeFlag")

View File

@@ -82,6 +82,7 @@ package gl
// typedef int GLsizei;
// typedef float GLfloat;
// typedef double GLdouble;
// typedef void *GLeglImageOES;
// typedef char GLchar;
// typedef ptrdiff_t GLintptr;
// typedef ptrdiff_t GLsizeiptr;
@@ -296,7 +297,7 @@ package gl
// typedef void (APIENTRYP GPDELETEVERTEXARRAYS)(GLsizei n, const GLuint * arrays);
// typedef void (APIENTRYP GPDEPTHFUNC)(GLenum func);
// typedef void (APIENTRYP GPDEPTHMASK)(GLboolean flag);
// typedef void (APIENTRYP GPDEPTHRANGE)(GLdouble xnear, GLdouble xfar);
// typedef void (APIENTRYP GPDEPTHRANGE)(GLdouble n, GLdouble f);
// typedef void (APIENTRYP GPDEPTHRANGEARRAYV)(GLuint first, GLsizei count, const GLdouble * v);
// typedef void (APIENTRYP GPDEPTHRANGEINDEXED)(GLuint index, GLdouble n, GLdouble f);
// typedef void (APIENTRYP GPDEPTHRANGEF)(GLfloat n, GLfloat f);
@@ -341,6 +342,8 @@ package gl
// typedef void (APIENTRYP GPDRAWTRANSFORMFEEDBACKSTREAM)(GLenum mode, GLuint id, GLuint stream);
// typedef void (APIENTRYP GPDRAWTRANSFORMFEEDBACKSTREAMINSTANCED)(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
// typedef void (APIENTRYP GPDRAWVKIMAGENV)(GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1);
// typedef void (APIENTRYP GPEGLIMAGETARGETTEXSTORAGEEXT)(GLenum target, GLeglImageOES image, const GLint* attrib_list);
// typedef void (APIENTRYP GPEGLIMAGETARGETTEXTURESTORAGEEXT)(GLuint texture, GLeglImageOES image, const GLint* attrib_list);
// typedef void (APIENTRYP GPEDGEFLAGFORMATNV)(GLsizei stride);
// typedef void (APIENTRYP GPENABLE)(GLenum cap);
// typedef void (APIENTRYP GPENABLECLIENTSTATEINDEXEDEXT)(GLenum array, GLuint index);
@@ -1956,8 +1959,8 @@ package gl
// static void glowDepthMask(GPDEPTHMASK fnptr, GLboolean flag) {
// (*fnptr)(flag);
// }
// static void glowDepthRange(GPDEPTHRANGE fnptr, GLdouble xnear, GLdouble xfar) {
// (*fnptr)(xnear, xfar);
// static void glowDepthRange(GPDEPTHRANGE fnptr, GLdouble n, GLdouble f) {
// (*fnptr)(n, f);
// }
// static void glowDepthRangeArrayv(GPDEPTHRANGEARRAYV fnptr, GLuint first, GLsizei count, const GLdouble * v) {
// (*fnptr)(first, count, v);
@@ -2091,6 +2094,12 @@ package gl
// static void glowDrawVkImageNV(GPDRAWVKIMAGENV fnptr, GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1) {
// (*fnptr)(vkImage, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1);
// }
// static void glowEGLImageTargetTexStorageEXT(GPEGLIMAGETARGETTEXSTORAGEEXT fnptr, GLenum target, GLeglImageOES image, const GLint* attrib_list) {
// (*fnptr)(target, image, attrib_list);
// }
// static void glowEGLImageTargetTextureStorageEXT(GPEGLIMAGETARGETTEXTURESTORAGEEXT fnptr, GLuint texture, GLeglImageOES image, const GLint* attrib_list) {
// (*fnptr)(texture, image, attrib_list);
// }
// static void glowEdgeFlagFormatNV(GPEDGEFLAGFORMATNV fnptr, GLsizei stride) {
// (*fnptr)(stride);
// }
@@ -5244,6 +5253,7 @@ const (
BGRA = 0x80E1
BGRA_INTEGER = 0x8D9B
BGR_INTEGER = 0x8D9A
BLACKHOLE_RENDER_INTEL = 0x83FC
BLEND = 0x0BE2
BLEND_ADVANCED_COHERENT_KHR = 0x9285
BLEND_ADVANCED_COHERENT_NV = 0x9285
@@ -7444,6 +7454,8 @@ var (
gpDrawTransformFeedbackStream C.GPDRAWTRANSFORMFEEDBACKSTREAM
gpDrawTransformFeedbackStreamInstanced C.GPDRAWTRANSFORMFEEDBACKSTREAMINSTANCED
gpDrawVkImageNV C.GPDRAWVKIMAGENV
gpEGLImageTargetTexStorageEXT C.GPEGLIMAGETARGETTEXSTORAGEEXT
gpEGLImageTargetTextureStorageEXT C.GPEGLIMAGETARGETTEXTURESTORAGEEXT
gpEdgeFlagFormatNV C.GPEDGEFLAGFORMATNV
gpEnable C.GPENABLE
gpEnableClientStateIndexedEXT C.GPENABLECLIENTSTATEINDEXEDEXT
@@ -9293,8 +9305,8 @@ func DepthMask(flag bool) {
}
// specify mapping of depth values from normalized device coordinates to window coordinates
func DepthRange(near float64, far float64) {
C.glowDepthRange(gpDepthRange, (C.GLdouble)(near), (C.GLdouble)(far))
func DepthRange(n float64, f float64) {
C.glowDepthRange(gpDepthRange, (C.GLdouble)(n), (C.GLdouble)(f))
}
func DepthRangeArrayv(first uint32, count int32, v *float64) {
C.glowDepthRangeArrayv(gpDepthRangeArrayv, (C.GLuint)(first), (C.GLsizei)(count), (*C.GLdouble)(unsafe.Pointer(v)))
@@ -9480,6 +9492,12 @@ func DrawTransformFeedbackStreamInstanced(mode uint32, id uint32, stream uint32,
func DrawVkImageNV(vkImage uint64, sampler uint32, x0 float32, y0 float32, x1 float32, y1 float32, z float32, s0 float32, t0 float32, s1 float32, t1 float32) {
C.glowDrawVkImageNV(gpDrawVkImageNV, (C.GLuint64)(vkImage), (C.GLuint)(sampler), (C.GLfloat)(x0), (C.GLfloat)(y0), (C.GLfloat)(x1), (C.GLfloat)(y1), (C.GLfloat)(z), (C.GLfloat)(s0), (C.GLfloat)(t0), (C.GLfloat)(s1), (C.GLfloat)(t1))
}
func EGLImageTargetTexStorageEXT(target uint32, image C.GLeglImageOES, attrib_list *int32) {
C.glowEGLImageTargetTexStorageEXT(gpEGLImageTargetTexStorageEXT, (C.GLenum)(target), (C.GLeglImageOES)(image), (*C.GLint)(unsafe.Pointer(attrib_list)))
}
func EGLImageTargetTextureStorageEXT(texture uint32, image C.GLeglImageOES, attrib_list *int32) {
C.glowEGLImageTargetTextureStorageEXT(gpEGLImageTargetTextureStorageEXT, (C.GLuint)(texture), (C.GLeglImageOES)(image), (*C.GLint)(unsafe.Pointer(attrib_list)))
}
func EdgeFlagFormatNV(stride int32) {
C.glowEdgeFlagFormatNV(gpEdgeFlagFormatNV, (C.GLsizei)(stride))
}
@@ -13948,6 +13966,8 @@ func InitWithProcAddrFunc(getProcAddr func(name string) unsafe.Pointer) error {
return errors.New("glDrawTransformFeedbackStreamInstanced")
}
gpDrawVkImageNV = (C.GPDRAWVKIMAGENV)(getProcAddr("glDrawVkImageNV"))
gpEGLImageTargetTexStorageEXT = (C.GPEGLIMAGETARGETTEXSTORAGEEXT)(getProcAddr("glEGLImageTargetTexStorageEXT"))
gpEGLImageTargetTextureStorageEXT = (C.GPEGLIMAGETARGETTEXTURESTORAGEEXT)(getProcAddr("glEGLImageTargetTextureStorageEXT"))
gpEdgeFlagFormatNV = (C.GPEDGEFLAGFORMATNV)(getProcAddr("glEdgeFlagFormatNV"))
gpEnable = (C.GPENABLE)(getProcAddr("glEnable"))
if gpEnable == nil {

View File

@@ -23,11 +23,11 @@ package glfw
// ----------------
// GLFW Options:
#cgo linux,!wayland CFLAGS: -D_GLFW_X11
#cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND
#cgo linux,wayland CFLAGS: -D_GLFW_WAYLAND -D_GNU_SOURCE
// Linker Options:
#cgo linux,!wayland LDFLAGS: -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama -ldl -lrt
#cgo linux,wayland LDFLAGS: -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama -ldl -lrt
#cgo linux,wayland LDFLAGS: -lGL -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon -lm -ldl -lrt
// FreeBSD Build Tags
@@ -38,6 +38,6 @@ package glfw
// Linker Options:
#cgo freebsd,!wayland LDFLAGS: -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama
#cgo freebsd,wayland LDFLAGS: -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama
#cgo freebsd,wayland LDFLAGS: -lGL -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon -lm
*/
import "C"

View File

@@ -12,6 +12,8 @@ package glfw
#include "glfw/src/wl_init.c"
#include "glfw/src/wl_monitor.c"
#include "glfw/src/wl_window.c"
#include "glfw/src/wayland-pointer-constraints-unstable-v1-client-protocol.c"
#include "glfw/src/wayland-relative-pointer-unstable-v1-client-protocol.c"
#endif
#ifdef _GLFW_X11
#include "glfw/src/x11_init.c"

View File

@@ -1,4 +1,4 @@
// +build linux freebsd
// +build linux,!wayland freebsd,!wayland
package glfw

View File

@@ -167,6 +167,12 @@ func (w *Window) GLFWWindow() uintptr {
return uintptr(unsafe.Pointer(w.data))
}
// GoWindow creates a Window from a *C.GLFWwindow reference.
// Used when an external C library is calling your Go handlers.
func GoWindow(window unsafe.Pointer) *Window {
return &Window{data: (*C.GLFWwindow)(window)}
}
//export goWindowPosCB
func goWindowPosCB(window unsafe.Pointer, xpos, ypos C.int) {
w := windows.get((*C.GLFWwindow)(window))