mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +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 GPISPROGRAM)(GLuint program);
|
||||||
// typedef GLboolean (APIENTRYP GPISTEXTURE)(GLuint texture);
|
// typedef GLboolean (APIENTRYP GPISTEXTURE)(GLuint texture);
|
||||||
// typedef void (APIENTRYP GPLINKPROGRAM)(GLuint program);
|
// 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 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 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);
|
// 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 GPUNIFORM2FV)(GLint location, GLsizei count, const GLfloat * value);
|
||||||
// typedef void (APIENTRYP GPUNIFORM4FV)(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 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 GPUSEPROGRAM)(GLuint program);
|
||||||
// typedef void (APIENTRYP GPVERTEXATTRIBPOINTER)(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const uintptr_t pointer);
|
// 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);
|
// 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) {
|
// static void glowLinkProgram(GPLINKPROGRAM fnptr, GLuint program) {
|
||||||
// (*fnptr)(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) {
|
// static void glowPixelStorei(GPPIXELSTOREI fnptr, GLenum pname, GLint param) {
|
||||||
// (*fnptr)(pname, param);
|
// (*fnptr)(pname, param);
|
||||||
// }
|
// }
|
||||||
@ -341,9 +336,6 @@ package gl
|
|||||||
// static void glowUniformMatrix4fv(GPUNIFORMMATRIX4FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
|
// static void glowUniformMatrix4fv(GPUNIFORMMATRIX4FV fnptr, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {
|
||||||
// (*fnptr)(location, count, transpose, value);
|
// (*fnptr)(location, count, transpose, value);
|
||||||
// }
|
// }
|
||||||
// static GLboolean glowUnmapBuffer(GPUNMAPBUFFER fnptr, GLenum target) {
|
|
||||||
// return (*fnptr)(target);
|
|
||||||
// }
|
|
||||||
// static void glowUseProgram(GPUSEPROGRAM fnptr, GLuint program) {
|
// static void glowUseProgram(GPUSEPROGRAM fnptr, GLuint program) {
|
||||||
// (*fnptr)(program);
|
// (*fnptr)(program);
|
||||||
// }
|
// }
|
||||||
@ -409,7 +401,6 @@ var (
|
|||||||
gpIsProgram C.GPISPROGRAM
|
gpIsProgram C.GPISPROGRAM
|
||||||
gpIsTexture C.GPISTEXTURE
|
gpIsTexture C.GPISTEXTURE
|
||||||
gpLinkProgram C.GPLINKPROGRAM
|
gpLinkProgram C.GPLINKPROGRAM
|
||||||
gpMapBuffer C.GPMAPBUFFER
|
|
||||||
gpPixelStorei C.GPPIXELSTOREI
|
gpPixelStorei C.GPPIXELSTOREI
|
||||||
gpReadPixels C.GPREADPIXELS
|
gpReadPixels C.GPREADPIXELS
|
||||||
gpShaderSource C.GPSHADERSOURCE
|
gpShaderSource C.GPSHADERSOURCE
|
||||||
@ -421,7 +412,6 @@ var (
|
|||||||
gpUniform2fv C.GPUNIFORM2FV
|
gpUniform2fv C.GPUNIFORM2FV
|
||||||
gpUniform4fv C.GPUNIFORM4FV
|
gpUniform4fv C.GPUNIFORM4FV
|
||||||
gpUniformMatrix4fv C.GPUNIFORMMATRIX4FV
|
gpUniformMatrix4fv C.GPUNIFORMMATRIX4FV
|
||||||
gpUnmapBuffer C.GPUNMAPBUFFER
|
|
||||||
gpUseProgram C.GPUSEPROGRAM
|
gpUseProgram C.GPUSEPROGRAM
|
||||||
gpVertexAttribPointer C.GPVERTEXATTRIBPOINTER
|
gpVertexAttribPointer C.GPVERTEXATTRIBPOINTER
|
||||||
gpViewport C.GPVIEWPORT
|
gpViewport C.GPVIEWPORT
|
||||||
@ -626,11 +616,6 @@ func LinkProgram(program uint32) {
|
|||||||
C.glowLinkProgram(gpLinkProgram, (C.GLuint)(program))
|
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) {
|
func PixelStorei(pname uint32, param int32) {
|
||||||
C.glowPixelStorei(gpPixelStorei, (C.GLenum)(pname), (C.GLint)(param))
|
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)))
|
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) {
|
func UseProgram(program uint32) {
|
||||||
C.glowUseProgram(gpUseProgram, (C.GLuint)(program))
|
C.glowUseProgram(gpUseProgram, (C.GLuint)(program))
|
||||||
}
|
}
|
||||||
@ -833,10 +813,6 @@ func InitWithProcAddrFunc(getProcAddr func(name string) unsafe.Pointer) error {
|
|||||||
if gpLinkProgram == nil {
|
if gpLinkProgram == nil {
|
||||||
return errors.New("glLinkProgram")
|
return errors.New("glLinkProgram")
|
||||||
}
|
}
|
||||||
gpMapBuffer = (C.GPMAPBUFFER)(getProcAddr("glMapBuffer"))
|
|
||||||
if gpMapBuffer == nil {
|
|
||||||
return errors.New("glMapBuffer")
|
|
||||||
}
|
|
||||||
gpPixelStorei = (C.GPPIXELSTOREI)(getProcAddr("glPixelStorei"))
|
gpPixelStorei = (C.GPPIXELSTOREI)(getProcAddr("glPixelStorei"))
|
||||||
if gpPixelStorei == nil {
|
if gpPixelStorei == nil {
|
||||||
return errors.New("glPixelStorei")
|
return errors.New("glPixelStorei")
|
||||||
@ -881,10 +857,6 @@ func InitWithProcAddrFunc(getProcAddr func(name string) unsafe.Pointer) error {
|
|||||||
if gpUniformMatrix4fv == nil {
|
if gpUniformMatrix4fv == nil {
|
||||||
return errors.New("glUniformMatrix4fv")
|
return errors.New("glUniformMatrix4fv")
|
||||||
}
|
}
|
||||||
gpUnmapBuffer = (C.GPUNMAPBUFFER)(getProcAddr("glUnmapBuffer"))
|
|
||||||
if gpUnmapBuffer == nil {
|
|
||||||
return errors.New("glUnmapBuffer")
|
|
||||||
}
|
|
||||||
gpUseProgram = (C.GPUSEPROGRAM)(getProcAddr("glUseProgram"))
|
gpUseProgram = (C.GPUSEPROGRAM)(getProcAddr("glUseProgram"))
|
||||||
if gpUseProgram == nil {
|
if gpUseProgram == nil {
|
||||||
return errors.New("glUseProgram")
|
return errors.New("glUseProgram")
|
||||||
|
@ -58,7 +58,6 @@ var (
|
|||||||
gpIsProgram uintptr
|
gpIsProgram uintptr
|
||||||
gpIsTexture uintptr
|
gpIsTexture uintptr
|
||||||
gpLinkProgram uintptr
|
gpLinkProgram uintptr
|
||||||
gpMapBuffer uintptr
|
|
||||||
gpPixelStorei uintptr
|
gpPixelStorei uintptr
|
||||||
gpReadPixels uintptr
|
gpReadPixels uintptr
|
||||||
gpShaderSource uintptr
|
gpShaderSource uintptr
|
||||||
@ -70,7 +69,6 @@ var (
|
|||||||
gpUniform2fv uintptr
|
gpUniform2fv uintptr
|
||||||
gpUniform4fv uintptr
|
gpUniform4fv uintptr
|
||||||
gpUniformMatrix4fv uintptr
|
gpUniformMatrix4fv uintptr
|
||||||
gpUnmapBuffer uintptr
|
|
||||||
gpUseProgram uintptr
|
gpUseProgram uintptr
|
||||||
gpVertexAttribPointer uintptr
|
gpVertexAttribPointer uintptr
|
||||||
gpViewport uintptr
|
gpViewport uintptr
|
||||||
@ -271,11 +269,6 @@ func IsTexture(texture uint32) bool {
|
|||||||
return ret != 0
|
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) {
|
func LinkProgram(program uint32) {
|
||||||
syscall.Syscall(gpLinkProgram, 1, uintptr(program), 0, 0)
|
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)
|
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) {
|
func UseProgram(program uint32) {
|
||||||
syscall.Syscall(gpUseProgram, 1, uintptr(program), 0, 0)
|
syscall.Syscall(gpUseProgram, 1, uintptr(program), 0, 0)
|
||||||
}
|
}
|
||||||
@ -478,10 +466,6 @@ func InitWithProcAddrFunc(getProcAddr func(name string) uintptr) error {
|
|||||||
if gpIsTexture == 0 {
|
if gpIsTexture == 0 {
|
||||||
return errors.New("glIsTexture")
|
return errors.New("glIsTexture")
|
||||||
}
|
}
|
||||||
gpMapBuffer = getProcAddr("glMapBuffer")
|
|
||||||
if gpMapBuffer == 0 {
|
|
||||||
return errors.New("glMapBuffer")
|
|
||||||
}
|
|
||||||
gpLinkProgram = getProcAddr("glLinkProgram")
|
gpLinkProgram = getProcAddr("glLinkProgram")
|
||||||
if gpLinkProgram == 0 {
|
if gpLinkProgram == 0 {
|
||||||
return errors.New("glLinkProgram")
|
return errors.New("glLinkProgram")
|
||||||
@ -530,10 +514,6 @@ func InitWithProcAddrFunc(getProcAddr func(name string) uintptr) error {
|
|||||||
if gpUniformMatrix4fv == 0 {
|
if gpUniformMatrix4fv == 0 {
|
||||||
return errors.New("glUniformMatrix4fv")
|
return errors.New("glUniformMatrix4fv")
|
||||||
}
|
}
|
||||||
gpUnmapBuffer = getProcAddr("glUnmapBuffer")
|
|
||||||
if gpUnmapBuffer == 0 {
|
|
||||||
return errors.New("glUnmapBuffer")
|
|
||||||
}
|
|
||||||
gpUseProgram = getProcAddr("glUseProgram")
|
gpUseProgram = getProcAddr("glUseProgram")
|
||||||
if gpUseProgram == 0 {
|
if gpUseProgram == 0 {
|
||||||
return errors.New("glUseProgram")
|
return errors.New("glUseProgram")
|
||||||
|
Loading…
Reference in New Issue
Block a user