Skip to content
PHP-GLFW
Using textures
Initializing search
GitHub
Home
Gettings Started
User Guide
Classes / Functions & API
Examples
VISU Framework →
PHP-GLFW
GitHub
Home
Gettings Started
Gettings Started
About this Guide
Installation
Installation
Linux
MacOS
Windows
IDE Setup
Creating a Window
Drawing a Triangle
User Guide
User Guide
Vector Graphics
Vector Graphics
Getting Started
Fill & Stroke
Shapes
Colors
Text & Fonts
Images
Gradients
Math & 3D Space
Math & 3D Space
Math Functions
Noise
Noise
Noise Functions
Offscreen & Headless Rendering
Offscreen & Headless Rendering
Rendering to an Image
Debugging
Debugging
Debugging OpenGL Calls with apitrace
Classes / Functions & API
Classes / Functions & API
Buffer
Buffer
ByteBuffer
DoubleBuffer
FloatBuffer
HFloatBuffer
IntBuffer
ShortBuffer
UByteBuffer
UIntBuffer
UShortBuffer
GLFW
GLFW
glfwCreateStandardCursor
glfwCreateWindow
glfwDefaultWindowHints
glfwDestroyCursor
glfwDestroyWindow
glfwExtensionSupported
glfwFocusWindow
glfwGetClipboardString
glfwGetCurrentContext
glfwGetCursorPos
glfwGetFramebufferSize
glfwGetGamepadAxes
glfwGetGamepadButtons
glfwGetGamepadName
glfwGetInputMode
glfwGetJoystickAxes
glfwGetJoystickButtons
glfwGetJoystickGUID
glfwGetJoystickName
glfwGetKey
glfwGetKeyName
glfwGetKeyScancode
glfwGetMonitorContentScale
glfwGetMonitorName
glfwGetMonitorPhysicalSize
glfwGetMonitorPos
glfwGetMonitorWorkarea
glfwGetMouseButton
glfwGetPrimaryMonitor
glfwGetTime
glfwGetVersion
glfwGetVersionString
glfwGetVideoMode
glfwGetVideoModes
glfwGetWindowAttrib
glfwGetWindowContentScale
glfwGetWindowFrameSize
glfwGetWindowMonitor
glfwGetWindowOpacity
glfwGetWindowPos
glfwGetWindowSize
glfwHideWindow
glfwIconifyWindow
glfwInit
glfwInitHint
glfwJoystickIsGamepad
glfwJoystickPresent
glfwMakeContextCurrent
glfwMaximizeWindow
glfwPollEvents
glfwPostEmptyEvent
glfwRawMouseMotionSupported
glfwRequestWindowAttention
glfwRestoreWindow
glfwSetCharCallback
glfwSetCharModsCallback
glfwSetClipboardString
glfwSetCursor
glfwSetCursorEnterCallback
glfwSetCursorPos
glfwSetCursorPosCallback
glfwSetDropCallback
glfwSetFramebufferSizeCallback
glfwSetGamma
glfwSetInputMode
glfwSetKeyCallback
glfwSetMouseButtonCallback
glfwSetScrollCallback
glfwSetTime
glfwSetWindowAspectRatio
glfwSetWindowAttrib
glfwSetWindowCloseCallback
glfwSetWindowContentScaleCallback
glfwSetWindowFocusCallback
glfwSetWindowIconifyCallback
glfwSetWindowMaximizeCallback
glfwSetWindowMonitor
glfwSetWindowOpacity
glfwSetWindowPos
glfwSetWindowPosCallback
glfwSetWindowRefreshCallback
glfwSetWindowShouldClose
glfwSetWindowSize
glfwSetWindowSizeCallback
glfwSetWindowSizeLimits
glfwSetWindowTitle
glfwShowWindow
glfwSwapBuffers
glfwSwapInterval
glfwTerminate
glfwUpdateGamepadMappings
glfwVulkanSupported
glfwWaitEvents
glfwWaitEventsTimeout
glfwWindowHint
glfwWindowHintString
glfwWindowShouldClose
Geometry
Geometry
ObjFileParser
ObjFileParser / Group
ObjFileParser / Material
ObjFileParser / Mesh
Math
Math
Mat4 - GL Math
Quat - GL Math
Vec2 - GL Math
Vec3 - GL Math
Vec4 - GL Math
OpenGL
OpenGL
glActiveShaderProgram
glActiveTexture
glAttachShader
glBeginConditionalRender
glBeginQuery
glBeginQueryIndexed
glBeginTransformFeedback
glBindAttribLocation
glBindBuffer
glBindBufferBase
glBindBufferRange
glBindFragDataLocation
glBindFragDataLocationIndexed
glBindFramebuffer
glBindProgramPipeline
glBindRenderbuffer
glBindSampler
glBindTexture
glBindTransformFeedback
glBindVertexArray
glBlendColor
glBlendEquation
glBlendEquationSeparate
glBlendEquationSeparatei
glBlendEquationi
glBlendFunc
glBlendFuncSeparate
glBlendFuncSeparatei
glBlendFunci
glBlitFramebuffer
glBufferData
glCheckFramebufferStatus
glClampColor
glClear
glClearBufferfi
glClearBufferfv
glClearBufferiv
glClearBufferuiv
glClearColor
glClearDepth
glClearDepthf
glClearStencil
glClientWaitSync
glColorMask
glColorMaski
glColorP3ui
glColorP3uiv
glColorP4ui
glColorP4uiv
glCompileShader
glCopyBufferSubData
glCopyTexImage1D
glCopyTexImage2D
glCopyTexSubImage1D
glCopyTexSubImage2D
glCopyTexSubImage3D
glCreateProgram
glCreateShader
glCullFace
glDeleteBuffers
glDeleteFramebuffers
glDeleteProgram
glDeleteProgramPipelines
glDeleteQueries
glDeleteRenderbuffers
glDeleteSamplers
glDeleteShader
glDeleteSync
glDeleteTextures
glDeleteTransformFeedbacks
glDeleteVertexArrays
glDepthFunc
glDepthMask
glDepthRange
glDepthRangeArrayv
glDepthRangeIndexed
glDepthRangef
glDetachShader
glDisable
glDisableVertexAttribArray
glDisablei
glDrawArrays
glDrawArraysInstanced
glDrawBuffer
glDrawBuffers
glDrawTransformFeedback
glDrawTransformFeedbackStream
glEnable
glEnableVertexAttribArray
glEnablei
glEndConditionalRender
glEndQuery
glEndQueryIndexed
glEndTransformFeedback
glFenceSync
glFinish
glFlush
glFlushMappedBufferRange
glFramebufferRenderbuffer
glFramebufferTexture
glFramebufferTexture1D
glFramebufferTexture2D
glFramebufferTexture3D
glFramebufferTextureLayer
glFrontFace
glGenBuffers
glGenFramebuffers
glGenProgramPipelines
glGenQueries
glGenRenderbuffers
glGenSamplers
glGenTextures
glGenTransformFeedbacks
glGenVertexArrays
glGenerateMipmap
glGetActiveSubroutineUniformiv
glGetActiveUniformBlockiv
glGetAttachedShaders
glGetAttribLocation
glGetBooleani_v
glGetBooleanv
glGetBufferParameteri64v
glGetBufferParameteriv
glGetDoublei_v
glGetDoublev
glGetError
glGetFloati_v
glGetFloatv
glGetFragDataIndex
glGetFragDataLocation
glGetFramebufferAttachmentParameteriv
glGetInteger64i_v
glGetInteger64v
glGetIntegeri_v
glGetIntegerv
glGetMultisamplefv
glGetProgramInfoLog
glGetProgramPipelineiv
glGetProgramStageiv
glGetProgramiv
glGetQueryIndexediv
glGetQueryObjecti64v
glGetQueryObjectiv
glGetQueryObjectui64v
glGetQueryObjectuiv
glGetQueryiv
glGetRenderbufferParameteriv
glGetSamplerParameterIiv
glGetSamplerParameterIuiv
glGetSamplerParameterfv
glGetSamplerParameteriv
glGetShaderInfoLog
glGetShaderPrecisionFormat
glGetShaderiv
glGetString
glGetStringi
glGetSubroutineIndex
glGetSubroutineUniformLocation
glGetSynciv
glGetTexImage
glGetTexLevelParameterfv
glGetTexLevelParameteriv
glGetTexParameterIiv
glGetTexParameterIuiv
glGetTexParameterfv
glGetTexParameteriv
glGetUniformBlockIndex
glGetUniformLocation
glGetUniformSubroutineuiv
glGetUniformdv
glGetUniformfv
glGetUniformiv
glGetUniformuiv
glGetVertexAttribIiv
glGetVertexAttribIuiv
glGetVertexAttribLdv
glGetVertexAttribdv
glGetVertexAttribfv
glGetVertexAttribiv
glHint
glIsBuffer
glIsEnabled
glIsEnabledi
glIsFramebuffer
glIsProgram
glIsProgramPipeline
glIsQuery
glIsRenderbuffer
glIsSampler
glIsShader
glIsSync
glIsTexture
glIsTransformFeedback
glIsVertexArray
glLineWidth
glLinkProgram
glLogicOp
glMinSampleShading
glMultiTexCoordP1ui
glMultiTexCoordP1uiv
glMultiTexCoordP2ui
glMultiTexCoordP2uiv
glMultiTexCoordP3ui
glMultiTexCoordP3uiv
glMultiTexCoordP4ui
glMultiTexCoordP4uiv
glNormalP3ui
glNormalP3uiv
glPatchParameterfv
glPatchParameteri
glPauseTransformFeedback
glPixelStoref
glPixelStorei
glPointParameterf
glPointParameterfv
glPointParameteri
glPointParameteriv
glPointSize
glPolygonMode
glPolygonOffset
glPrimitiveRestartIndex
glProgramParameteri
glProgramUniform1d
glProgramUniform1dv
glProgramUniform1f
glProgramUniform1fv
glProgramUniform1i
glProgramUniform1iv
glProgramUniform1ui
glProgramUniform1uiv
glProgramUniform2d
glProgramUniform2dv
glProgramUniform2f
glProgramUniform2fv
glProgramUniform2i
glProgramUniform2iv
glProgramUniform2ui
glProgramUniform2uiv
glProgramUniform3d
glProgramUniform3dv
glProgramUniform3f
glProgramUniform3fv
glProgramUniform3i
glProgramUniform3iv
glProgramUniform3ui
glProgramUniform3uiv
glProgramUniform4d
glProgramUniform4dv
glProgramUniform4f
glProgramUniform4fv
glProgramUniform4i
glProgramUniform4iv
glProgramUniform4ui
glProgramUniform4uiv
glProgramUniformMatrix2dv
glProgramUniformMatrix2fv
glProgramUniformMatrix2x3dv
glProgramUniformMatrix2x3fv
glProgramUniformMatrix2x4dv
glProgramUniformMatrix2x4fv
glProgramUniformMatrix3dv
glProgramUniformMatrix3fv
glProgramUniformMatrix3x2dv
glProgramUniformMatrix3x2fv
glProgramUniformMatrix3x4dv
glProgramUniformMatrix3x4fv
glProgramUniformMatrix4dv
glProgramUniformMatrix4fv
glProgramUniformMatrix4x2dv
glProgramUniformMatrix4x2fv
glProgramUniformMatrix4x3dv
glProgramUniformMatrix4x3fv
glProvokingVertex
glQueryCounter
glReadBuffer
glReadPixels
glReleaseShaderCompiler
glRenderbufferStorage
glRenderbufferStorageMultisample
glResumeTransformFeedback
glSampleCoverage
glSampleMaski
glSamplerParameterIiv
glSamplerParameterIuiv
glSamplerParameterf
glSamplerParameterfv
glSamplerParameteri
glSamplerParameteriv
glScissor
glScissorArrayv
glScissorIndexed
glScissorIndexedv
glSecondaryColorP3ui
glSecondaryColorP3uiv
glShaderSource
glStencilFunc
glStencilFuncSeparate
glStencilMask
glStencilMaskSeparate
glStencilOp
glStencilOpSeparate
glTexBuffer
glTexCoordP1ui
glTexCoordP1uiv
glTexCoordP2ui
glTexCoordP2uiv
glTexCoordP3ui
glTexCoordP3uiv
glTexCoordP4ui
glTexCoordP4uiv
glTexImage2D
glTexImage2DMultisample
glTexImage3DMultisample
glTexParameterIiv
glTexParameterIuiv
glTexParameterf
glTexParameterfv
glTexParameteri
glTexParameteriv
glUniform1d
glUniform1dv
glUniform1f
glUniform1fv
glUniform1i
glUniform1iv
glUniform1ui
glUniform1uiv
glUniform2d
glUniform2dv
glUniform2f
glUniform2fv
glUniform2i
glUniform2iv
glUniform2ui
glUniform2uiv
glUniform3d
glUniform3dv
glUniform3f
glUniform3fv
glUniform3i
glUniform3iv
glUniform3ui
glUniform3uiv
glUniform4d
glUniform4dv
glUniform4f
glUniform4fv
glUniform4i
glUniform4iv
glUniform4ui
glUniform4uiv
glUniformBlockBinding
glUniformMatrix2dv
glUniformMatrix2fv
glUniformMatrix2x3dv
glUniformMatrix2x3fv
glUniformMatrix2x4dv
glUniformMatrix2x4fv
glUniformMatrix3dv
glUniformMatrix3fv
glUniformMatrix3x2dv
glUniformMatrix3x2fv
glUniformMatrix3x4dv
glUniformMatrix3x4fv
glUniformMatrix4dv
glUniformMatrix4f
glUniformMatrix4fv
glUniformMatrix4x2dv
glUniformMatrix4x2fv
glUniformMatrix4x3dv
glUniformMatrix4x3fv
glUniformSubroutinesuiv
glUniformVec2f
glUniformVec3f
glUniformVec4f
glUnmapBuffer
glUseProgram
glUseProgramStages
glValidateProgram
glValidateProgramPipeline
glVertexAttrib1d
glVertexAttrib1dv
glVertexAttrib1f
glVertexAttrib1fv
glVertexAttrib1s
glVertexAttrib1sv
glVertexAttrib2d
glVertexAttrib2dv
glVertexAttrib2f
glVertexAttrib2fv
glVertexAttrib2s
glVertexAttrib2sv
glVertexAttrib3d
glVertexAttrib3dv
glVertexAttrib3f
glVertexAttrib3fv
glVertexAttrib3s
glVertexAttrib3sv
glVertexAttrib4Nbv
glVertexAttrib4Niv
glVertexAttrib4Nsv
glVertexAttrib4Nub
glVertexAttrib4Nubv
glVertexAttrib4Nuiv
glVertexAttrib4Nusv
glVertexAttrib4bv
glVertexAttrib4d
glVertexAttrib4dv
glVertexAttrib4f
glVertexAttrib4fv
glVertexAttrib4iv
glVertexAttrib4s
glVertexAttrib4sv
glVertexAttrib4ubv
glVertexAttrib4uiv
glVertexAttrib4usv
glVertexAttribDivisor
glVertexAttribI1i
glVertexAttribI1iv
glVertexAttribI1ui
glVertexAttribI1uiv
glVertexAttribI2i
glVertexAttribI2iv
glVertexAttribI2ui
glVertexAttribI2uiv
glVertexAttribI3i
glVertexAttribI3iv
glVertexAttribI3ui
glVertexAttribI3uiv
glVertexAttribI4bv
glVertexAttribI4i
glVertexAttribI4iv
glVertexAttribI4sv
glVertexAttribI4ubv
glVertexAttribI4ui
glVertexAttribI4uiv
glVertexAttribI4usv
glVertexAttribL1d
glVertexAttribL1dv
glVertexAttribL2d
glVertexAttribL2dv
glVertexAttribL3d
glVertexAttribL3dv
glVertexAttribL4d
glVertexAttribL4dv
glVertexAttribP1ui
glVertexAttribP1uiv
glVertexAttribP2ui
glVertexAttribP2uiv
glVertexAttribP3ui
glVertexAttribP3uiv
glVertexAttribP4ui
glVertexAttribP4uiv
glVertexAttribPointer
glVertexP2ui
glVertexP2uiv
glVertexP3ui
glVertexP3uiv
glVertexP4ui
glVertexP4uiv
glViewport
glViewportArrayv
glViewportIndexedf
glViewportIndexedfv
glWaitSync
Texture
Texture
Texture2D
Examples
Examples
About PHP-GLFW Examples
OpenGL
OpenGL
Basic triangle
Basic 3D Cube
Textued 3D Cube
Basic Instancing
Object file loading
Simple lighting
Text Rendering
Input & Events
Sponza
Vector Graphics
Vector Graphics
Color Constants
Color Lightness
Visaulizing Bitshifting
Plotting primes
Linear Gradient
Radial Gradient
Gradient Wave
Image Filtering
Image Repetition
Image Rotation
Joystick Input
Genetic Car Pathfinding
Noise explorer
Noise Grid
Text Alignment
Text Boxes
Colored Words
Text with Shadow
VISU Framework →
Using textures
¶