KiCad PCB EDA Suite
Loading...
Searching...
No Matches
OGL_ATT_LIST Class Reference

Helper class to create an attribute list. More...

#include <ogl_attr_list.h>

Static Public Member Functions

static const int * GetAttributesList (ANTIALIASING_MODE aAntiAliasingMode)
 Get a list of attributes to pass to wxGLCanvas. More...
 

Static Private Attributes

static const int m_openGL_attributes_list []
 Attributes list to be passed to a wxGLCanvas creation. More...
 
static int m_openGL_attributes_list_to_use [] = { 0 }
 Attributes list that was (eventually) changed and are passed to creation. More...
 

Detailed Description

Helper class to create an attribute list.

Definition at line 46 of file ogl_attr_list.h.

Member Function Documentation

◆ GetAttributesList()

const int * OGL_ATT_LIST::GetAttributesList ( ANTIALIASING_MODE  aAntiAliasingMode)
static

Get a list of attributes to pass to wxGLCanvas.

Parameters
aAntiAliasingMode= 0 - disabled; try to initialize (if is supported) the list with anti aliasing capabilities
Returns
a list of options to be passed in the creation of a EDA_3D_CANVAS class

Definition at line 73 of file ogl_attr_list.cpp.

References ATT_WX_GL_SAMPLE_BUFFERS_DATA, ATT_WX_GL_SAMPLE_BUFFERS_OFFSET, ATT_WX_GL_SAMPLES_OFFSET, ATT_WX_GL_SAMPLES_OFFSET_DATA, m_openGL_attributes_list, and m_openGL_attributes_list_to_use.

Referenced by DIALOG_SELECT_3DMODEL::DIALOG_SELECT_3DMODEL(), EVT_TOOL_RANGE(), and PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL().

Member Data Documentation

◆ m_openGL_attributes_list

const int OGL_ATT_LIST::m_openGL_attributes_list
staticprivate
Initial value:
= {
WX_GL_RGBA, WX_GL_RGBA,
WX_GL_DOUBLEBUFFER, WX_GL_DOUBLEBUFFER,
WX_GL_DEPTH_SIZE, 16,
WX_GL_STENCIL_SIZE, 8,
WX_GL_SAMPLES, 0,
WX_GL_SAMPLE_BUFFERS, 1,
0, 0
}

Attributes list to be passed to a wxGLCanvas creation.

This array should be 2*n+1 Sadly wxwidgets / glx < 13 allowed a thing named "boolean attributes" that don't take a value. (See src/unix/glx11.cpp -> wxGLCanvasX11::ConvertWXAttrsToGL() ). To avoid problems due to this, just specify those attributes twice. Only WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_STEREO are such boolean attributes.

Definition at line 71 of file ogl_attr_list.h.

Referenced by GetAttributesList().

◆ m_openGL_attributes_list_to_use

int OGL_ATT_LIST::m_openGL_attributes_list_to_use = { 0 }
staticprivate

Attributes list that was (eventually) changed and are passed to creation.

Definition at line 76 of file ogl_attr_list.h.

Referenced by GetAttributesList().


The documentation for this class was generated from the following files: