mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
graphicsdriver/opengl/gl: Remove unused functions
This commit is contained in:
parent
38815ba801
commit
de48a13a6e
@ -144,7 +144,6 @@ package gl
|
||||
// typedef GLboolean (APIENTRYP GPISPROGRAM)(GLuint program);
|
||||
// typedef GLboolean (APIENTRYP GPISTEXTURE)(GLuint texture);
|
||||
// typedef void (APIENTRYP GPLINKPROGRAM)(GLuint program);
|
||||
// typedef uintptr_t (APIENTRYP GPMAPBUFFER)(GLenum target, GLenum access);
|
||||
// typedef void (APIENTRYP GPPIXELSTOREI)(GLenum pname, GLint param);
|
||||
// typedef void (APIENTRYP GPREADPIXELS)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels);
|
||||
// typedef void (APIENTRYP GPSHADERSOURCE)(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length);
|
||||
@ -156,7 +155,6 @@ package gl
|
||||
// typedef void (APIENTRYP GPUNIFORM2FV)(GLint location, GLsizei count, const GLfloat * value);
|
||||
// typedef void (APIENTRYP GPUNIFORM4FV)(GLint location, GLsizei count, const GLfloat * value);
|
||||
// typedef void (APIENTRYP GPUNIFORMMATRIX4FV)(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
|
||||
// typedef GLboolean (APIENTRYP GPUNMAPBUFFER)(GLenum target);
|
||||
// typedef void (APIENTRYP GPUSEPROGRAM)(GLuint program);
|
||||
// typedef void (APIENTRYP GPVERTEXATTRIBPOINTER)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const uintptr_t pointer);
|
||||
// typedef void (APIENTRYP GPVIEWPORT)(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
@ -305,9 +303,6 @@ package gl
|
||||
// static void glowLinkProgram(GPLINKPROGRAM fnptr, GLuint program) {
|
||||
// (*fnptr)(program);
|
||||
// }
|
||||
// static uintptr_t glowMapBuffer(GPMAPBUFFER fnptr, GLenum target, GLenum access) {
|
||||
// return (uintptr_t)(*fnptr)(target, access);
|
||||
// }
|
||||
// static void glowPixelStorei(GPPIXELSTOREI fnptr, GLenum pname, GLint param) {
|
||||
// (*fnptr)(pname, param);
|
||||
// }
|
||||
@ -341,9 +336,6 @@ package gl
|
||||
// static void glowUniformMatrix4fv(GPUNIFORMMATRIX4FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
|
||||
// (*fnptr)(location, count, transpose, value);
|
||||
// }
|
||||
// static GLboolean glowUnmapBuffer(GPUNMAPBUFFER fnptr, GLenum target) {
|
||||
// return (*fnptr)(target);
|
||||
// }
|
||||
// static void glowUseProgram(GPUSEPROGRAM fnptr, GLuint program) {
|
||||
// (*fnptr)(program);
|
||||
// }
|
||||
@ -409,7 +401,6 @@ var (
|
||||
gpIsProgram C.GPISPROGRAM
|
||||
gpIsTexture C.GPISTEXTURE
|
||||
gpLinkProgram C.GPLINKPROGRAM
|
||||
gpMapBuffer C.GPMAPBUFFER
|
||||
gpPixelStorei C.GPPIXELSTOREI
|
||||
gpReadPixels C.GPREADPIXELS
|
||||
gpShaderSource C.GPSHADERSOURCE
|
||||
@ -421,7 +412,6 @@ var (
|
||||
gpUniform2fv C.GPUNIFORM2FV
|
||||
gpUniform4fv C.GPUNIFORM4FV
|
||||
gpUniformMatrix4fv C.GPUNIFORMMATRIX4FV
|
||||
gpUnmapBuffer C.GPUNMAPBUFFER
|
||||
gpUseProgram C.GPUSEPROGRAM
|
||||
gpVertexAttribPointer C.GPVERTEXATTRIBPOINTER
|
||||
gpViewport C.GPVIEWPORT
|
||||
@ -626,11 +616,6 @@ func LinkProgram(program uint32) {
|
||||
C.glowLinkProgram(gpLinkProgram, (C.GLuint)(program))
|
||||
}
|
||||
|
||||
func MapBuffer(target uint32, access uint32) uintptr {
|
||||
ret := C.glowMapBuffer(gpMapBuffer, (C.GLenum)(target), (C.GLenum)(access))
|
||||
return uintptr(ret)
|
||||
}
|
||||
|
||||
func PixelStorei(pname uint32, param int32) {
|
||||
C.glowPixelStorei(gpPixelStorei, (C.GLenum)(pname), (C.GLint)(param))
|
||||
}
|
||||
@ -675,11 +660,6 @@ func UniformMatrix4fv(location int32, count int32, transpose bool, value *float3
|
||||
C.glowUniformMatrix4fv(gpUniformMatrix4fv, (C.GLint)(location), (C.GLsizei)(count), (C.GLboolean)(boolToInt(transpose)), (*C.GLfloat)(unsafe.Pointer(value)))
|
||||
}
|
||||
|
||||
func UnmapBuffer(target uint32) bool {
|
||||
ret := C.glowUnmapBuffer(gpUnmapBuffer, (C.GLenum)(target))
|
||||
return ret == TRUE
|
||||
}
|
||||
|
||||
func UseProgram(program uint32) {
|
||||
C.glowUseProgram(gpUseProgram, (C.GLuint)(program))
|
||||
}
|
||||
@ -833,10 +813,6 @@ func InitWithProcAddrFunc(getProcAddr func(name string) unsafe.Pointer) error {
|
||||
if gpLinkProgram == nil {
|
||||
return errors.New("glLinkProgram")
|
||||
}
|
||||
gpMapBuffer = (C.GPMAPBUFFER)(getProcAddr("glMapBuffer"))
|
||||
if gpMapBuffer == nil {
|
||||
return errors.New("glMapBuffer")
|
||||
}
|
||||
gpPixelStorei = (C.GPPIXELSTOREI)(getProcAddr("glPixelStorei"))
|
||||
if gpPixelStorei == nil {
|
||||
return errors.New("glPixelStorei")
|
||||
@ -881,10 +857,6 @@ func InitWithProcAddrFunc(getProcAddr func(name string) unsafe.Pointer) error {
|
||||
if gpUniformMatrix4fv == nil {
|
||||
return errors.New("glUniformMatrix4fv")
|
||||
}
|
||||
gpUnmapBuffer = (C.GPUNMAPBUFFER)(getProcAddr("glUnmapBuffer"))
|
||||
if gpUnmapBuffer == nil {
|
||||
return errors.New("glUnmapBuffer")
|
||||
}
|
||||
gpUseProgram = (C.GPUSEPROGRAM)(getProcAddr("glUseProgram"))
|
||||
if gpUseProgram == nil {
|
||||
return errors.New("glUseProgram")
|
||||
|
@ -58,7 +58,6 @@ var (
|
||||
gpIsProgram uintptr
|
||||
gpIsTexture uintptr
|
||||
gpLinkProgram uintptr
|
||||
gpMapBuffer uintptr
|
||||
gpPixelStorei uintptr
|
||||
gpReadPixels uintptr
|
||||
gpShaderSource uintptr
|
||||
@ -70,7 +69,6 @@ var (
|
||||
gpUniform2fv uintptr
|
||||
gpUniform4fv uintptr
|
||||
gpUniformMatrix4fv uintptr
|
||||
gpUnmapBuffer uintptr
|
||||
gpUseProgram uintptr
|
||||
gpVertexAttribPointer uintptr
|
||||
gpViewport uintptr
|
||||
@ -271,11 +269,6 @@ func IsTexture(texture uint32) bool {
|
||||
return ret != 0
|
||||
}
|
||||
|
||||
func MapBuffer(target uint32, access uint32) uintptr {
|
||||
ret, _, _ := syscall.Syscall(gpMapBuffer, 2, uintptr(target), uintptr(access), 0)
|
||||
return ret
|
||||
}
|
||||
|
||||
func LinkProgram(program uint32) {
|
||||
syscall.Syscall(gpLinkProgram, 1, uintptr(program), 0, 0)
|
||||
}
|
||||
@ -324,11 +317,6 @@ func UniformMatrix4fv(location int32, count int32, transpose bool, value *float3
|
||||
syscall.Syscall6(gpUniformMatrix4fv, 4, uintptr(location), uintptr(count), boolToUintptr(transpose), uintptr(unsafe.Pointer(value)), 0, 0)
|
||||
}
|
||||
|
||||
func UnmapBuffer(target uint32) bool {
|
||||
ret, _, _ := syscall.Syscall(gpUnmapBuffer, 1, uintptr(target), 0, 0)
|
||||
return ret != 0
|
||||
}
|
||||
|
||||
func UseProgram(program uint32) {
|
||||
syscall.Syscall(gpUseProgram, 1, uintptr(program), 0, 0)
|
||||
}
|
||||
@ -478,10 +466,6 @@ func InitWithProcAddrFunc(getProcAddr func(name string) uintptr) error {
|
||||
if gpIsTexture == 0 {
|
||||
return errors.New("glIsTexture")
|
||||
}
|
||||
gpMapBuffer = getProcAddr("glMapBuffer")
|
||||
if gpMapBuffer == 0 {
|
||||
return errors.New("glMapBuffer")
|
||||
}
|
||||
gpLinkProgram = getProcAddr("glLinkProgram")
|
||||
if gpLinkProgram == 0 {
|
||||
return errors.New("glLinkProgram")
|
||||
@ -530,10 +514,6 @@ func InitWithProcAddrFunc(getProcAddr func(name string) uintptr) error {
|
||||
if gpUniformMatrix4fv == 0 {
|
||||
return errors.New("glUniformMatrix4fv")
|
||||
}
|
||||
gpUnmapBuffer = getProcAddr("glUnmapBuffer")
|
||||
if gpUnmapBuffer == 0 {
|
||||
return errors.New("glUnmapBuffer")
|
||||
}
|
||||
gpUseProgram = getProcAddr("glUseProgram")
|
||||
if gpUseProgram == 0 {
|
||||
return errors.New("glUseProgram")
|
||||
|
Loading…
Reference in New Issue
Block a user