Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

BlitzMax/Modules/Graphics/OpenGL Graphics

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Functions GLGraphicsDriver Function GLGraphicsDriver:TGLGraphicsDriver() Description: Get OpenGL graphics driver Returns: An OpenGL graphics driver Information: The returned driver can be used with SetGraphicsDriver GLGraphics Function GLGraphics:TGraphics( width,height,depth=0,hertz=60,flags=GRAPHICS_BACKBUFFER|GRAPHICS_DEPTHBUFFER ) Description: Create OpenGL graphics Returns: An OpenGL graphics object Information: This is a convenience function that allows you to easily create an OpenGL graphics context. GLAdjustTexSize Function GLAdjustTexSize( width Var,height Var ) Description: Helper function to calculate nearest valid texture size Information: This functions rounds width and height up to the nearest valid texture size GLTexFromPixmap Function GLTexFromPixmap( pixmap:TPixmap,mipmap=True ) Description: Helper function to create a texture from a pixmap Returns: Integer GL Texture name Information: pixmap is resized to a valid texture size before conversion. GLDrawRect Function GLDrawRect( x,y,width,height ) Description: Helper function to output a simple rectangle Information: Draws a rectangle relative to top-left of current viewport. GLDrawText Function GLDrawText( text$,x,y ) Description: Helper function to output some simple 8x16 font text Information: Draws text relative to top-left of current viewport. The font used is an internal fixed point 8x16 font. This function is intended for debugging purposes only - performance is unlikely to be stellar. GLDrawPixmap Function GLDrawPixmap( pixmap:TPixmap,x,y ) Description: Helper function to draw a pixmap to a gl context Information: Draws the pixmap relative to top-left of current viewport. This function is intended for debugging purposes only - performance is unlikely to be stellar. GLShareContexts Function GLShareContexts() Description: Enable OpenGL context sharing Information: Calling GLShareContexts will cause all opengl graphics contexts created to shared displaylists, textures, shaders etc. This should be called before any opengl contexts are created.