< BlitzMax < Modules < Graphics

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.

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.