Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::DisplayOpenGL Class Reference
Inheritance diagram for Burger::DisplayOpenGL:
Collaboration diagram for Burger::DisplayOpenGL:

Public Member Functions

const Burger::StaticRTTIget_StaticRTTI (void) const noexcept override
 Get the description to the class.
 DisplayOpenGL (GameApp *pGameApp)
uint_t Init (uint_t uWidth, uint_t uHeight, uint_t uDepth=32, uint_t uFlags=DEFAULTFLAGS) override
void Shutdown (void) override
void BeginScene (void) override
void EndScene (void) override
TextureCreateTextureObject (void) override
VertexBufferCreateVertexBufferObject (void) override
void Resize (uint_t uWidth, uint_t uHeight) override
void SetViewport (uint_t uX, uint_t uY, uint_t uWidth, uint_t uHeight) override
void SetScissorRect (uint_t uX, uint_t uY, uint_t uWidth, uint_t uHeight) override
void SetClearColor (float fRed, float fGreen, float fBlue, float fAlpha) override
void SetClearDepth (float fDepth) override
void Clear (uint_t uMask) override
void Bind (Texture *pTexture, uint_t uIndex=0) override
void Bind (Effect *pEffect) override
void SetBlend (uint_t bEnable) override
void SetBlendFunction (eSourceBlendFactor uSourceFactor, eDestinationBlendFactor uDestFactor) override
void SetLighting (uint_t bEnable) override
void SetZWrite (uint_t bEnable) override
void SetDepthTest (eDepthFunction uDepthFunction) override
void SetCullMode (eCullMode uCullMode) override
void SetScissor (uint_t bEnable) override
void DrawPrimitive (ePrimitiveType uPrimitiveType, VertexBuffer *pVertexBuffer) override
void DrawElements (ePrimitiveType uPrimitiveType, VertexBuffer *pVertexBuffer) override
float GetOpenGLVersion (void) const
float GetShadingLanguageVersion (void) const
uint_t GetCompressedFormatCount (void) const
const uint_tGetCompressedFormats (void) const
uint_t GetMaximumVertexAttributes (void) const
void SetupOpenGL (void)
uint_t CompileShader (uint_t GLEnum, const char *pShaderCode, uintptr_t uShaderCodeLength=0) const
uint_t CompileProgram (const char *pUnifiedShader, uintptr_t uLength, const OpenGLVertexInputs_t *pVertexInputs=0, const uint_t *pMembers=0) const
uint_t CompileProgram (const char *pVertexShader, uintptr_t uVSLength, const char *pPixelShader, uintptr_t uPSLength, const OpenGLVertexInputs_t *pVertexInputs=0, const uint_t *pMembers=0) const
uint_t CreateVertexArrayObject (const OpenGLVertexBufferObjectDescription_t *pDescription) const
void DeleteVertexArrayObject (uint_t uVertexArrayObject) const
uint_t BuildFrameBufferObject (uint_t uWidth, uint_t uHeight, uint_t uGLDepth, uint_t uGLClamp, uint_t uGLZDepth=0) const
void DeleteFrameBufferObject (uint_t uFrameBufferObject) const
Public Member Functions inherited from Burger::Display
 Display (GameApp *pGameApp)
 Default constructor.
virtual ~Display ()
 Default destructor.
uint_t Init (uint_t uWidth, uint_t uHeight, uint_t uDepth=32, uint_t uFlags=DEFAULTFLAGS)
 Initialize the display.
void Shutdown (void)
 Shut down the current video display context.
void BeginScene (void)
 Prepare the display for rendering.
void EndScene (void)
 Render the scene to the display.
TextureCreateTextureObject (void)
VertexBufferCreateVertexBufferObject (void)
void Resize (uint_t uWidth, uint_t uHeight)
void SetViewport (uint_t uX, uint_t uY, uint_t uWidth, uint_t uHeight)
void SetScissorRect (uint_t uX, uint_t uY, uint_t uWidth, uint_t uHeight)
void SetClearColor (float fRed, float fGreen, float fBlue, float fAlpha)
void SetClearDepth (float fDepth)
void Clear (uint_t uMask)
void Bind (Texture *pTexture, uint_t uIndex=0)
void Bind (Effect *pEffect)
void SetBlend (uint_t bEnable)
void SetBlendFunction (eSourceBlendFactor uSourceFactor, eDestinationBlendFactor uDestFactor)
void SetLighting (uint_t bEnable)
void SetZWrite (uint_t bEnable)
void SetDepthTest (eDepthFunction uDepthFunction)
void SetCullMode (eCullMode uCullMode)
void SetScissor (uint_t bEnable)
void DrawPrimitive (ePrimitiveType uPrimitiveType, VertexBuffer *pVertexBuffer)
void DrawElements (ePrimitiveType uPrimitiveType, VertexBuffer *pVertexBuffer)
tagWINDOWPLACEMENT * GetWindowedPlacement (void) noexcept
 Return the pointer to a WINDOWPLACEMENT.
uint_t HandleMinMax (HWND__ *pWindow, uintptr_t lParam)
 Handler for WM_GETMINMAXINFO events.
virtual void CheckForWindowSizeChange (void)
 Resize the back buffer if the window size changed.
virtual void CheckForWindowChangingMonitors (void)
 Check if the window has changed monitors.
D3DVertexShader * CreateVertexShader (const void *pVertexShaderBinary) const
D3DPixelShader * CreatePixelShader (const void *pPixelShaderBinary) const
D3DDevice * GetD3DDevice (void) const noexcept
void InitState (void)
uint_t IsWideScreen (void) noexcept
uint_t IsHiDef (void) noexcept
uint_t IsInterlaced (void) noexcept
NSView * GetView (void) const noexcept
 Get the window's NSView.
NSWindowController * GetWindowController (void) const noexcept
 Get the window's NSWindowController.
NSOpenGLView * GetOpenGLView (void) const noexcept
 Get the window's NSOpenGLView.
_CGLContextObject * GetOpenGLContext (void) const noexcept
 Get the window's _CGLContextObject.
NSWindow * GetFullScreenWindow (void) const noexcept
 Get the window pointer.
void SetFullScreenWindow (NSWindow *pFullScreenWindow) noexcept
 Enable a full screen window and disable the primary game window.
EAGLContext * GetGLContext (void) const noexcept
 The currently active OpenGL context.
uint_t GetFrontBuffer (void) const noexcept
 Front buffer index.
uint_t GetColorBuffer (void) const noexcept
 Color buffer index.
uint_t GetDepthBuffer (void) const noexcept
 Depth buffer index.
float GetOpenGLVersion (void) const noexcept
float GetShadingLanguageVersion (void) const noexcept
uint_t GetCompressedFormatCount (void) const noexcept
const uint_tGetCompressedFormats (void) const noexcept
uint_t GetMaximumVertexAttributes (void) const noexcept
void SetupOpenGL (void)
uint_t CompileShader (uint_t GLEnum, const char *pShaderCode, uintptr_t uShaderCodeLength=0) const
uint_t CompileProgram (const char *pUnifiedShader, uintptr_t uLength, const OpenGLVertexInputs_t *pVertexInputs=0, const uint_t *pMembers=0) const
uint_t CompileProgram (const char *pVertexShader, uintptr_t uVSLength, const char *pPixelShader, uintptr_t uPSLength, const OpenGLVertexInputs_t *pVertexInputs=0, const uint_t *pMembers=0) const
uint_t CreateVertexArrayObject (const OpenGLVertexBufferObjectDescription_t *pDescription) const
void DeleteVertexArrayObject (uint_t uVertexArrayObject) const
uint_t BuildFrameBufferObject (uint_t uWidth, uint_t uHeight, uint_t uGLDepth, uint_t uGLClamp, uint_t uGLZDepth=0) const
void DeleteFrameBufferObject (uint_t uFrameBufferObject) const
void Pause (uint_t bPauseRendering)
 Pause or resume rendering.
TextureGetBoundTexture (uint_t uIndex=0) const noexcept
TextureCreateTexture (Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping and filters preset.
TextureCreateTexture (uint_t uWidth, uint_t uHeight, Image::ePixelTypes uPixelType, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with buffer and wrapping and filters preset.
TextureCreateTexturePNG (const char *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTexturePNG (Filename *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTexturePNG (RezFile *pRezFile, uint_t uRezNum, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTextureGIF (const char *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTextureGIF (Filename *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTextureGIF (RezFile *pRezFile, uint_t uRezNum, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTextureTGA (const char *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTextureTGA (Filename *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTextureTGA (RezFile *pRezFile, uint_t uRezNum, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTextureBMP (const char *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTextureBMP (Filename *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
TextureCreateTextureBMP (RezFile *pRezFile, uint_t uRezNum, Texture::eWrapping uWrapping, Texture::eFilter uFilter)
 Create a texture object with wrapping, filters and a texture source.
VertexBufferCreateVertexBuffer (const VertexBuffer::VertexAoS_t *pDescription)
 Create a vertex buffer object with from a vertex description.
void SetPalette (uint_t uStart, uint_t uCount, const uint8_t *pPalette)
 Update the color palette.
void SetPalette (uint_t uStart, uint_t uCount, const RGBAWord8_t *pPalette)
 Update the color palette.
void SetBorderColor (uint_t uColor)
 Update the display border color.
void SetWindowTitle (const char *pTitle)
 Set the display window title.
void SetPaletteBlack (void)
 Set the screen palette to all black.
void SetPaletteWhite (void)
 Set the screen palette to all white.
void SetPalette (const uint8_t *pPalette)
 Update the color palette.
void SetPalette (const RGBAWord8_t *pPalette)
 Update the color palette.
void SetPalette (void **pHandle)
 Update the color palette using a memory handle.
void SetPalette (RezFile *pRez, uint_t uResID)
 Update the color palette using a resource.
void SetPalette (uint_t uStart, uint_t uCount, RezFile *pRez, uint_t uResID)
 Update a partial color palette using a resource.
void FadeTo (const uint8_t *pPalette, FadeProc pProc=nullptr, void *pData=nullptr)
 Fade the hardware palette to a palette.
void FadeToBlack (FadeProc pProc=nullptr, void *pData=nullptr)
 Fade the hardware palette to black.
void FadeToWhite (FadeProc pProc=nullptr, void *pData=nullptr)
 Fade the hardware palette to white.
void FadeTo (RezFile *pRez, uint_t uResID, FadeProc pProc=nullptr, void *pData=nullptr)
 Fade the hardware palette to a palette.
void FadeTo (void **pHandle, FadeProc pProc=nullptr, void *pData=nullptr)
 Fade the hardware palette to a palette.
GameAppGetGameApp (void) const noexcept
 Get the parent application pointer.
uint_t GetWidth (void) const noexcept
 Get the width in pixels of the display buffer.
uint_t GetHeight (void) const noexcept
 Get the height in pixels of the display buffer.
uint_t GetDepth (void) const noexcept
 Get the depth in bits of the display buffer.
uint_t GetFlags (void) const noexcept
 Get the flags associated with this Display class instance.
uint_t GetDisplayWidth (void) const noexcept
 Get the width in pixels of the display hardware.
uint_t GetDisplayHeight (void) const noexcept
 Get the height in pixels of the display hardware.
float GetWidthFloat (void) const noexcept
 Get the width in pixels of the display buffer.
float GetHeightFloat (void) const noexcept
 Get the height in pixels of the display buffer.
float GetAspectRatioX (void) const noexcept
 Get the aspect ratio in the format of width/height.
float GetAspectRatioY (void) const noexcept
 Get the aspect ratio in the format of height/width.
eAspectRatio GetAspectRatio (void) const
 Get the enumeration of the screen aspect ratio.
const uint8_t * GetPalette (void) const noexcept
 Get the current palette.
uint_t GetBorderColor (void) const noexcept
 Get the hardware border color.
uint_t GetFadeSpeed (void) const noexcept
 Return the timer constant in Burger::Tick.
void SetFadeSpeed (uint_t uPaletteFadeSpeed) noexcept
 Set the timer constant in Burger::Tick.
uint_t GetPaletteVSync (void) const noexcept
 Return non-zero if palette updates are synced to vertical blank.
void SetPaletteVSync (uint_t bPaletteVSync) noexcept
 Set the flag to enable palette updates.
void SetResizeCallback (ResizeProc pResize, void *pResizeData) noexcept
 Set window resize callback.
ResizeProc GetResizeCallback (void) const noexcept
 Return the function pointer for the callback when the window's size is changed.
void * GetResizeCallbackData (void) const noexcept
 Return the window resize function.
void SetRenderCallback (RenderProc pRender, void *pRenderData) noexcept
 Set window update function.
RenderProc GetRenderCallback (void) const noexcept
 Set the window updat function.
void * GetRenderCallbackData (void) const noexcept
 Get the redraw callback function.
void SetReleaseCallback (ReleaseProc pRelease, void *pReleaseData) noexcept
 Set the purge callback.
ReleaseProc GetReleaseCallback (void) const noexcept
 Purge resource callback.
void * GetReleaseCallbackData (void) const noexcept
 Return pointer to callback void *.
Public Member Functions inherited from Burger::Base
const char * get_class_name (void) const noexcept
 Get the name of the class.
virtual ~Base () noexcept=default
 Destructor.

Static Public Member Functions

static void DeleteFrameBufferObjectAttachment (uint_t uAttachment)
static uint_t CreateTextureID (const Image *pImage, uint_t bGenerateMipMap=0)
static const char * GetErrorString (uint_t uGLErrorEnum)
static uintptr_t GetGLTypeSize (uint_t uGLTypeEnum)
static uint_t PrintGLError (const char *pErrorLocation)
static void WindowsLink (void)
 Manually load in all the OpenGL extensions.
static void WindowsUnlink (void)
 Release all of the OpenGL extensions.
static uint_t GetFrontBuffer (void)
Static Public Member Functions inherited from Burger::Display
static float GetRetinaScale (void) noexcept
 Get the scale factor for the retina display.
static void DeleteFrameBufferObjectAttachment (uint_t uAttachment)
static uint_t CreateTextureID (const Image *pImage, uint_t bGenerateMipMap=0)
static const char * GetErrorString (uint_t uGLErrorEnum)
static uintptr_t GetGLTypeSize (uint_t uGLTypeEnum)
static uint_t PrintGLError (const char *pErrorLocation)
static uint_t GetVideoModes (ClassArray< VideoCardDescription > *pOutput)
 Get a list of available video modes.
static uint_t GetDefaultWidth (void) noexcept
 Get the width of the default monitor.
static uint_t GetDefaultHeight (void) noexcept
 Get the height of the default monitor.
static uint_t GetDefaultDepth (void) noexcept
 Get the pixel depth of the default monitor.
static uint_t GetDefaultHertz (void) noexcept
 Get the refresh rate of the default monitor.
static uint_t GetDefaultTotalWidth (void) noexcept
 Get the width of the default monitor.
static uint_t GetDefaultTotalHeight (void) noexcept
 Get the height of the default monitor.
static uint_t GetDefaultMonitorCount (void) noexcept
 Get the number of active monitors.
static eAspectRatio get_aspect_ratio (uint32_t uWidth, uint32_t uHeight, uint_t bExactOnly) noexcept
 Calculate the screen aspect ratio.

Static Public Attributes

static const Burger::StaticRTTI g_StaticRTTI
Static Public Attributes inherited from Burger::Display
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.
Static Public Attributes inherited from Burger::Base
static const Burger::StaticRTTI g_StaticRTTI
 The global description of the class.

Protected Attributes

uint_tm_pCompressedFormats
 Pointer to an array of supported OpenGL compressed textures.
HDC__ * m_pOpenGLDeviceContext
 (Windows only) Window to attach the GL context to
HGLRC__ * m_pOpenGLContext
 (Windows only) Current OpenGL context
uint_t m_bResolutionChanged
 (Windows only) Set to TRUE if the display needs to be restored
float m_fOpenGLVersion
 Numeric value for the version of OpenGL.
float m_fShadingLanguageVersion
 Numeric value for the version of the Shader compiler.
uint_t m_uCompressedFormatCount
 Number of supported compressed texture formats.
uint_t m_uMaximumVertexAttributes
 Maximum number of vertex attributes GL_MAX_VERTEX_ATTRIBS.
uint_t m_uMaximumColorAttachments
 Maximum number of color frame attachments GL_MAX_COLOR_ATTACHMENTS.
uint_t m_uActiveTexture
 OpenGL glActiveTexture() shadow value.
Protected Attributes inherited from Burger::Display
GameAppm_pGameApp
 Pointer to the game application instance.
Rendererm_pRenderer
 Pointer to a renderer.
uint32_t m_WindowPlacement [11]
 WINDOWPLACEMENT record.
D3DDevice * m_pD3DDevice
 (Xbox 360 Only) Direct 3D device
uint_t m_uClearColor
 (Xbox 360 Only) 32 bit RGBA color for screen clear
float m_fClearDepth
 (Xbox 360 Only) ZValue to write for screen clear
uint_t m_bWideScreen
 (Xbox 360 Only) TRUE if wide screen display is active
NSView * m_pView
 (MacOSX Only) Pointer to the main view
NSWindowController * m_pWindowController
 (MacOSX Only) Pointer to the window controller
NSOpenGLView * m_pOpenGLView
 (MacOSX Only) Pointer to the OpenGL view
_CGLContextObject * m_pOpenGLContext
 (MacOSX Only) Pointer to the OpenGL context
NSWindow * m_pFullScreenWindow
 (MacOSX Only) Pointer to the main full screen window
EAGLContext * m_pEAGLContext
 (iOS Only) OpenGL Context
uint_t m_uFrontBuffer
 (iOS Only) Main render buffer GL name
uint_t m_uColorRenderBuffer
 (iOS Only) Color render buffer GL name
uint_t m_uDepthRenderBuffer
 (iOS Only) Depth buffer for rendering
ResizeProc m_pResize
 Callback if the screen changed sizes.
void * m_pResizeData
 pThis pointer for m_pResize calls
RenderProc m_pRender
 Callback if the operating system requests a scene draw.
void * m_pRenderData
 pThis pointer for m_pRender calls
ReleaseProc m_pRelease
 Callback if the operating system requests a scene draw.
void * m_pReleaseData
 pThis pointer for m_pRender calls
Texturem_pBoundTextures [8]
 Bound textures for the current context.
uint_t m_uWidth
 Width in pixels of the display buffer.
uint_t m_uHeight
 Height in pixels of the display buffer.
uint_t m_uDepth
 Depth in bits of the display buffer.
uint_t m_uFlags
 Flags for describing available features.
uint_t m_uDisplayWidth
 Width of the display hardware (Can differ from m_uWidth for pixel stretching)
uint_t m_uDisplayHeight
 Height of the display hardware (Can differ from m_uHeight for pixel stretching)
uint_t m_uDisplayDepth
 Depth of the display hardware (Can differ from m_uDepth for pixel depth change)
float m_fWidth
 Width of the rendering target as a float.
float m_fHeight
 Height of the rendering target as a float.
float m_fAspectRatioX
 Width/Height.
float m_fAspectRatioY
 Height/Width.
uint_t m_uBorderColor
 Hardware border color (MSDOS / Amiga only)
uint_t m_uPaletteFadeSpeed
 Speed in 1/60ths of a second for a palette fade.
int m_iPauseRenderingCount
 Rendering pausing reference count.
uint8_t m_bRenderingPaused
 If TRUE, rendering is paused.
uint8_t m_bPaletteDirty
 TRUE if the palette buffer was changed
uint8_t m_bPaletteVSync
 TRUE if palette updates sync to video
uint8_t m_bNotUsed [1]
 Padding.
uint8_t m_Palette [256 *3]
 Palette of 256 RGB values.

Additional Inherited Members

Public Types inherited from Burger::Display
enum  {
  INWINDOW = 0x0 , FULLSCREEN = 0x1 , ALLOWFULLSCREENTOGGLE = 0x2 , ALLOWRESIZING = 0x4 ,
  MAINTAIN_ASPECT_RATIO = 0x8 , STENCILENABLE = 0x20 , FULLPALETTEALLOWED = 0x40 , STEREO = 0x80 ,
  MULTITHREADED = 0x100 , GAMMAENABLE = 0x200 , DITHERENABLE = 0x400 , INTERLACEENABLE = 0x800 ,
  LANDSCAPE = 0x0000 , PORTRAIT = 0x1000 , INVERTED = 0x2000 , LANDSCAPEINVERTED = 0x2000 ,
  PORTRAITINVERTED = 0x3000 , PALMODE = 0x4000 , DEFAULTFLAGS = INWINDOW
}
enum  eAspectRatio {
  kAspectRatioUnknown , kAspectRatio1x1 , kAspectRatio4x3 , kAspectRatio16x10 ,
  kAspectRatio16x9 , kAspectRatio21x9 , kAspectRatio32x9 , kAspectRatioCustom ,
  kAspectRatioCount
}
enum  eClearBits { CLEAR_COLOR = 0x01 , CLEAR_DEPTH = 0x02 , CLEAR_STENCIL = 0x04 }
 Settings for Clear(uint_t) More...
enum  eDepthFunction {
  DEPTHCMP_NEVER , DEPTHCMP_LESS , DEPTHCMP_EQUAL , DEPTHCMP_LESSEQUAL ,
  DEPTHCMP_GREATER , DEPTHCMP_NOTEQUAL , DEPTHCMP_GREATEREQUAL , DEPTHCMP_ALWAYS
}
 Settings for SetDepthTest(eDepthFunction) More...
enum  eCullMode { CULL_NONE , CULL_CLOCKWISE , CULL_COUNTERCLOCKWISE }
 Settings for SetCullMode(eCullMode) More...
enum  eSourceBlendFactor {
  SRCBLEND_ZERO , SRCBLEND_ONE , SRCBLEND_COLOR , SRCBLEND_ONE_MINUS_COLOR ,
  SRCBLEND_SRC_ALPHA , SRCBLEND_ONE_MINUS_SRC_ALPHA , SRCBLEND_DST_ALPHA , SRCBLEND_ONE_MINUS_DST_ALPHA ,
  SRCBLEND_SRC_ALPHA_SATURATE
}
 Settings for SetBlendFunction(eSourceBlendFactor) More...
enum  eDestinationBlendFactor {
  DSTBLEND_ZERO , DSTBLEND_ONE , DSTBLEND_COLOR , DSTBLEND_ONE_MINUS_COLOR ,
  DSTBLEND_DST_ALPHA , DSTBLEND_ONE_MINUS_DST_ALPHA , DSTBLEND_SRC_ALPHA , DSTBLEND_ONE_MINUS_SRC_ALPHA
}
 Settings for SetBlendFunction(eDestinationBlendFactor) More...
enum  ePrimitiveType {
  PRIM_POINTS , PRIM_LINES , PRIM_LINESTRIP , PRIM_TRIANGLES ,
  PRIM_TRIANGLESTRIP , PRIM_TRIANGLEFAN
}
 Describe how to render a vertex array. More...
typedef uint_t(* FadeProc) (void *pThis, uint_t uStep)
 Callback function prototype for palette fading functions.
typedef void(* ResizeProc) (void *pThis, uint_t uWidth, uint_t uHeight)
 Callback function prototype for window resizing.
typedef void(* RenderProc) (void *pThis)
 Callback function for rendering the scene.
typedef void(* ReleaseProc) (void *pThis)
 Callback function for releasing resources on shutdown.
Public Attributes inherited from Burger::Display
uint_tm_pCompressedFormats
 Pointer to an array of supported OpenGL compressed textures.
float m_fOpenGLVersion
 Numeric value for the version of OpenGL.
float m_fShadingLanguageVersion
 Numeric value for the version of the Shader compiler.
uint_t m_uCompressedFormatCount
 Number of supported compressed texture formats.
uint_t m_uMaximumVertexAttributes
 Maximum number of vertex attributes GL_MAX_VERTEX_ATTRIBS.
uint_t m_uMaximumColorAttachments
 Maximum number of color frame attachments GL_MAX_COLOR_ATTACHMENTS.
uint_t m_uActiveTexture
 OpenGL glActiveTexture() shadow value.
Protected Member Functions inherited from Burger::Display
void InitDefaults (GameApp *pGameApp)
 Initialize shared variables.
void SetWidthHeight (uint_t uWidth, uint_t uHeight)
 Set the width and height of the screen.
Static Protected Member Functions inherited from Burger::Display
static void InitGlobals (void)
 Initialize video globals.
Static Protected Attributes inherited from Burger::Display
static Globals_t g_Globals
 Global values initialized when the first Display class is created.

Constructor & Destructor Documentation

◆ DisplayOpenGL()

Burger::DisplayOpenGL::DisplayOpenGL ( Burger::GameApp * pGameApp)

Member Function Documentation

◆ BeginScene()

void Burger::DisplayOpenGL::BeginScene ( void )
override

◆ Bind() [1/2]

void Burger::DisplayOpenGL::Bind ( Effect * pEffect)
override

◆ Bind() [2/2]

void Burger::DisplayOpenGL::Bind ( Texture * pTexture,
uint_t uIndex = 0 )
override

◆ BuildFrameBufferObject()

uint_t Burger::DisplayOpenGL::BuildFrameBufferObject ( uint_t uWidth,
uint_t uHeight,
uint_t uGLDepth,
uint_t uGLClamp,
uint_t uGLZDepth = 0 ) const

◆ Clear()

void Burger::DisplayOpenGL::Clear ( uint_t uMask)
override

◆ CompileProgram() [1/2]

uint_t Burger::DisplayOpenGL::CompileProgram ( const char * pUnifiedShader,
uintptr_t uLength,
const OpenGLVertexInputs_t * pVertexInputs = 0,
const uint_t * pMembers = 0 ) const

◆ CompileProgram() [2/2]

uint_t Burger::DisplayOpenGL::CompileProgram ( const char * pVertexShader,
uintptr_t uVSLength,
const char * pPixelShader,
uintptr_t uPSLength,
const OpenGLVertexInputs_t * pVertexInputs = 0,
const uint_t * pMembers = 0 ) const

◆ CompileShader()

uint_t Burger::DisplayOpenGL::CompileShader ( uint_t GLEnum,
const char * pShaderCode,
uintptr_t uShaderCodeLength = 0 ) const

◆ CreateTextureID()

uint_t Burger::DisplayOpenGL::CreateTextureID ( const Image * pImage,
uint_t bGenerateMipMap = 0 )
static

◆ CreateTextureObject()

Texture * Burger::DisplayOpenGL::CreateTextureObject ( void )
override

◆ CreateVertexArrayObject()

uint_t Burger::DisplayOpenGL::CreateVertexArrayObject ( const OpenGLVertexBufferObjectDescription_t * pDescription) const

◆ CreateVertexBufferObject()

VertexBuffer * Burger::DisplayOpenGL::CreateVertexBufferObject ( void )
override

◆ DeleteFrameBufferObject()

void Burger::DisplayOpenGL::DeleteFrameBufferObject ( uint_t uFrameBufferObject) const

◆ DeleteFrameBufferObjectAttachment()

void Burger::DisplayOpenGL::DeleteFrameBufferObjectAttachment ( uint_t uAttachment)
static

◆ DeleteVertexArrayObject()

void Burger::DisplayOpenGL::DeleteVertexArrayObject ( uint_t uVertexArrayObject) const

◆ DrawElements()

void Burger::DisplayOpenGL::DrawElements ( ePrimitiveType uPrimitiveType,
VertexBuffer * pVertexBuffer )
override

◆ DrawPrimitive()

void Burger::DisplayOpenGL::DrawPrimitive ( ePrimitiveType uPrimitiveType,
VertexBuffer * pVertexBuffer )
override

◆ EndScene()

void Burger::DisplayOpenGL::EndScene ( void )
override

◆ get_StaticRTTI()

const Burger::StaticRTTI * Burger::DisplayOpenGL::get_StaticRTTI ( void ) const
overridevirtualnoexcept

Get the description to the class.


This virtual function will pull the pointer to the StaticRTTI instance that has the name of the class. Due to it being virtual, it will be the name of the most derived class.

Returns
Pointer to a global, read only instance of StaticRTTI for the true class

Reimplemented from Burger::Display.

◆ GetCompressedFormatCount()

uint_t Burger::DisplayOpenGL::GetCompressedFormatCount ( void ) const
inline

◆ GetCompressedFormats()

const uint_t * Burger::DisplayOpenGL::GetCompressedFormats ( void ) const
inline

◆ GetErrorString()

const char * Burger::DisplayOpenGL::GetErrorString ( uint_t uGLErrorEnum)
static

◆ GetFrontBuffer()

uint_t Burger::DisplayOpenGL::GetFrontBuffer ( void )
inlinestatic

◆ GetGLTypeSize()

uintptr_t Burger::DisplayOpenGL::GetGLTypeSize ( uint_t uGLTypeEnum)
static

◆ GetMaximumVertexAttributes()

uint_t Burger::DisplayOpenGL::GetMaximumVertexAttributes ( void ) const
inline

◆ GetOpenGLVersion()

float Burger::DisplayOpenGL::GetOpenGLVersion ( void ) const
inline

◆ GetShadingLanguageVersion()

float Burger::DisplayOpenGL::GetShadingLanguageVersion ( void ) const
inline

◆ Init()

uint_t Burger::DisplayOpenGL::Init ( uint_t uWidth,
uint_t uHeight,
uint_t uDepth = 32,
uint_t uFlags = DEFAULTFLAGS )
override

◆ PrintGLError()

uint_t Burger::DisplayOpenGL::PrintGLError ( const char * pErrorLocation)
static

◆ Resize()

void Burger::DisplayOpenGL::Resize ( uint_t uWidth,
uint_t uHeight )
override

◆ SetBlend()

void Burger::DisplayOpenGL::SetBlend ( uint_t bEnable)
override

◆ SetBlendFunction()

void Burger::DisplayOpenGL::SetBlendFunction ( eSourceBlendFactor uSourceFactor,
eDestinationBlendFactor uDestFactor )
override

◆ SetClearColor()

void Burger::DisplayOpenGL::SetClearColor ( float fRed,
float fGreen,
float fBlue,
float fAlpha )
override

◆ SetClearDepth()

void Burger::DisplayOpenGL::SetClearDepth ( float fDepth)
override

◆ SetCullMode()

void Burger::DisplayOpenGL::SetCullMode ( eCullMode uCullMode)
override

◆ SetDepthTest()

void Burger::DisplayOpenGL::SetDepthTest ( eDepthFunction uDepthFunction)
override

◆ SetLighting()

void Burger::DisplayOpenGL::SetLighting ( uint_t bEnable)
override

◆ SetScissor()

void Burger::DisplayOpenGL::SetScissor ( uint_t bEnable)
override

◆ SetScissorRect()

void Burger::DisplayOpenGL::SetScissorRect ( uint_t uX,
uint_t uY,
uint_t uWidth,
uint_t uHeight )
override

◆ SetupOpenGL()

void Burger::DisplayOpenGL::SetupOpenGL ( void )

◆ SetViewport()

void Burger::DisplayOpenGL::SetViewport ( uint_t uX,
uint_t uY,
uint_t uWidth,
uint_t uHeight )
override

◆ SetZWrite()

void Burger::DisplayOpenGL::SetZWrite ( uint_t bEnable)
override

◆ Shutdown()

void Burger::DisplayOpenGL::Shutdown ( void )
override

◆ WindowsLink()

void BURGER_API Burger::DisplayOpenGL::WindowsLink ( void )
static

Manually load in all the OpenGL extensions.


Windows doesn't automatically link in all of the OpenGL functions when opengl32.lib is linked in. The extensions need to be manually loaded via calls to wglGetProcAddress() after an OpenGL pixelformat is selected.

Call this function immediately after an OpenGL pixelformat is selected and then all of the OpenGL extended function will "magically" appear and work as if they were directly linked in.

Note
This is only available on Windows
See also
Burger::DisplayOpenGL::WindowsUnlink()

◆ WindowsUnlink()

void BURGER_API Burger::DisplayOpenGL::WindowsUnlink ( void )
static

Release all of the OpenGL extensions.


When an OpenGL pixelformat is released, call this function to prevent accidental calling of any OpenGL functions that are connected to a disabled device driver.

Note
This is only available on Windows
See also
Burger::DisplayOpenGL::WindowsLink()

Member Data Documentation

◆ g_StaticRTTI

const Burger::StaticRTTI Burger::DisplayOpenGL::g_StaticRTTI
static

◆ m_bResolutionChanged

uint_t Burger::DisplayOpenGL::m_bResolutionChanged
protected

(Windows only) Set to TRUE if the display needs to be restored

◆ m_fOpenGLVersion

float Burger::DisplayOpenGL::m_fOpenGLVersion
protected

Numeric value for the version of OpenGL.

◆ m_fShadingLanguageVersion

float Burger::DisplayOpenGL::m_fShadingLanguageVersion
protected

Numeric value for the version of the Shader compiler.

◆ m_pCompressedFormats

uint_t* Burger::DisplayOpenGL::m_pCompressedFormats
protected

Pointer to an array of supported OpenGL compressed textures.

◆ m_pOpenGLContext

HGLRC__* Burger::DisplayOpenGL::m_pOpenGLContext
protected

(Windows only) Current OpenGL context

◆ m_pOpenGLDeviceContext

HDC__* Burger::DisplayOpenGL::m_pOpenGLDeviceContext
protected

(Windows only) Window to attach the GL context to

◆ m_uActiveTexture

uint_t Burger::DisplayOpenGL::m_uActiveTexture
protected

OpenGL glActiveTexture() shadow value.

◆ m_uCompressedFormatCount

uint_t Burger::DisplayOpenGL::m_uCompressedFormatCount
protected

Number of supported compressed texture formats.

◆ m_uMaximumColorAttachments

uint_t Burger::DisplayOpenGL::m_uMaximumColorAttachments
protected

Maximum number of color frame attachments GL_MAX_COLOR_ATTACHMENTS.

◆ m_uMaximumVertexAttributes

uint_t Burger::DisplayOpenGL::m_uMaximumVertexAttributes
protected

Maximum number of vertex attributes GL_MAX_VERTEX_ATTRIBS.