mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-08 08:43:51 +01:00
Fix ugly formatted arrays
Found via: `rg --multiline "=\n\t*\{\n"`
This commit is contained in:
parent
7cf801244c
commit
adc96072cd
@ -22,14 +22,14 @@ enum E_CULLING_TYPE
|
||||
};
|
||||
|
||||
//! Names for culling type
|
||||
const c8 *const AutomaticCullingNames[] =
|
||||
{
|
||||
const c8 *const AutomaticCullingNames[] = {
|
||||
"false",
|
||||
"box", // camera box against node box
|
||||
"frustum_box", // camera frustum against node box
|
||||
"frustum_sphere", // camera frustum against node sphere
|
||||
"occ_query", // occlusion query
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
@ -23,13 +23,13 @@ enum EGUI_ALIGNMENT
|
||||
};
|
||||
|
||||
//! Names for alignments
|
||||
const c8 *const GUIAlignmentNames[] =
|
||||
{
|
||||
const c8 *const GUIAlignmentNames[] = {
|
||||
"upperLeft",
|
||||
"lowerRight",
|
||||
"center",
|
||||
"scale",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
} // namespace gui
|
||||
} // namespace irr
|
||||
|
@ -99,8 +99,7 @@ enum EGUI_ELEMENT_TYPE
|
||||
};
|
||||
|
||||
//! Names for built-in element types
|
||||
const c8 *const GUIElementTypeNames[] =
|
||||
{
|
||||
const c8 *const GUIElementTypeNames[] = {
|
||||
"button",
|
||||
"checkBox",
|
||||
"comboBox",
|
||||
@ -127,7 +126,8 @@ const c8 *const GUIElementTypeNames[] =
|
||||
"element",
|
||||
"root",
|
||||
"profiler",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
@ -58,14 +58,14 @@ enum E_MATERIAL_TYPE
|
||||
};
|
||||
|
||||
//! Array holding the built in material type names
|
||||
const char *const sBuiltInMaterialTypeNames[] =
|
||||
{
|
||||
const char *const sBuiltInMaterialTypeNames[] = {
|
||||
"solid",
|
||||
"trans_alphach",
|
||||
"trans_alphach_ref",
|
||||
"trans_vertex_alpha",
|
||||
"onetexture_blend",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
constexpr u32 numBuiltInMaterials =
|
||||
sizeof(sBuiltInMaterialTypeNames) / sizeof(char *) - 1;
|
||||
|
@ -19,8 +19,7 @@ enum E_VERTEX_ATTRIBUTES
|
||||
};
|
||||
|
||||
//! Array holding the built in vertex attribute names
|
||||
const char *const sBuiltInVertexAttributeNames[] =
|
||||
{
|
||||
const char *const sBuiltInVertexAttributeNames[] = {
|
||||
"inVertexPosition",
|
||||
"inVertexNormal",
|
||||
"inVertexColor",
|
||||
@ -28,7 +27,8 @@ const char *const sBuiltInVertexAttributeNames[] =
|
||||
"inTexCoord1",
|
||||
"inVertexTangent",
|
||||
"inVertexBinormal",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
} // end namespace video
|
||||
} // end namespace irr
|
||||
|
@ -40,8 +40,7 @@ enum E_BONE_SKINNING_SPACE
|
||||
};
|
||||
|
||||
//! Names for bone animation modes
|
||||
const c8 *const BoneAnimationModeNames[] =
|
||||
{
|
||||
const c8 *const BoneAnimationModeNames[] = {
|
||||
"automatic",
|
||||
"animated",
|
||||
"unanimated",
|
||||
|
@ -41,8 +41,7 @@ enum ECURSOR_ICON
|
||||
};
|
||||
|
||||
//! Names for ECURSOR_ICON
|
||||
const c8 *const GUICursorIconNames[ECI_COUNT + 1] =
|
||||
{
|
||||
const c8 *const GUICursorIconNames[ECI_COUNT + 1] = {
|
||||
"normal",
|
||||
"cross",
|
||||
"hand",
|
||||
@ -56,7 +55,8 @@ const c8 *const GUICursorIconNames[ECI_COUNT + 1] =
|
||||
"sizens",
|
||||
"sizewe",
|
||||
"sizeup",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
//! structure used to set sprites as cursors.
|
||||
struct SCursorSprite
|
||||
|
@ -45,8 +45,7 @@ enum EGUI_BUTTON_STATE
|
||||
};
|
||||
|
||||
//! Names for gui button state icons
|
||||
const c8 *const GUIButtonStateNames[EGBS_COUNT + 1] =
|
||||
{
|
||||
const c8 *const GUIButtonStateNames[EGBS_COUNT + 1] = {
|
||||
"buttonUp",
|
||||
"buttonDown",
|
||||
"buttonMouseOver",
|
||||
@ -54,7 +53,7 @@ const c8 *const GUIButtonStateNames[EGBS_COUNT + 1] =
|
||||
"buttonFocused",
|
||||
"buttonNotFocused",
|
||||
"buttonDisabled",
|
||||
0 // count
|
||||
0, // count
|
||||
};
|
||||
|
||||
//! State of buttons used for drawing texture images.
|
||||
@ -87,8 +86,7 @@ enum EGUI_BUTTON_IMAGE_STATE
|
||||
};
|
||||
|
||||
//! Names for gui button image states
|
||||
const c8 *const GUIButtonImageStateNames[EGBIS_COUNT + 1] =
|
||||
{
|
||||
const c8 *const GUIButtonImageStateNames[EGBIS_COUNT + 1] = {
|
||||
"Image", // not "ImageUp" as it otherwise breaks serialization of old files
|
||||
"ImageUpOver",
|
||||
"ImageUpFocused",
|
||||
@ -98,7 +96,7 @@ const c8 *const GUIButtonImageStateNames[EGBIS_COUNT + 1] =
|
||||
"ImageDownFocused",
|
||||
"ImageDownFocusedOver",
|
||||
"ImageDisabled",
|
||||
0 // count
|
||||
0, // count
|
||||
};
|
||||
|
||||
//! GUI Button interface.
|
||||
|
@ -45,8 +45,7 @@ enum EGUI_SKIN_TYPE
|
||||
};
|
||||
|
||||
//! Names for gui element types
|
||||
const c8 *const GUISkinTypeNames[EGST_COUNT + 1] =
|
||||
{
|
||||
const c8 *const GUISkinTypeNames[EGST_COUNT + 1] = {
|
||||
"windowsClassic",
|
||||
"windowsMetallic",
|
||||
"burning",
|
||||
@ -114,8 +113,7 @@ enum EGUI_DEFAULT_COLOR
|
||||
};
|
||||
|
||||
//! Names for default skin colors
|
||||
const c8 *const GUISkinColorNames[EGDC_COUNT + 1] =
|
||||
{
|
||||
const c8 *const GUISkinColorNames[EGDC_COUNT + 1] = {
|
||||
"3DDarkShadow",
|
||||
"3DShadow",
|
||||
"3DFace",
|
||||
@ -200,8 +198,7 @@ enum EGUI_DEFAULT_SIZE
|
||||
};
|
||||
|
||||
//! Names for default skin sizes
|
||||
const c8 *const GUISkinSizeNames[EGDS_COUNT + 1] =
|
||||
{
|
||||
const c8 *const GUISkinSizeNames[EGDS_COUNT + 1] = {
|
||||
"ScrollBarSize",
|
||||
"MenuHeight",
|
||||
"WindowButtonWidth",
|
||||
@ -225,7 +222,8 @@ const c8 *const GUISkinSizeNames[EGDS_COUNT + 1] =
|
||||
"ButtonPressedTextOffsetY",
|
||||
"ButtonPressedSpriteOffsetX",
|
||||
"ButtonPressedSpriteOffsetY",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
enum EGUI_DEFAULT_TEXT
|
||||
{
|
||||
@ -251,8 +249,7 @@ enum EGUI_DEFAULT_TEXT
|
||||
};
|
||||
|
||||
//! Names for default skin sizes
|
||||
const c8 *const GUISkinTextNames[EGDT_COUNT + 1] =
|
||||
{
|
||||
const c8 *const GUISkinTextNames[EGDT_COUNT + 1] = {
|
||||
"MessageBoxOkay",
|
||||
"MessageBoxCancel",
|
||||
"MessageBoxYes",
|
||||
@ -261,7 +258,8 @@ const c8 *const GUISkinTextNames[EGDT_COUNT + 1] =
|
||||
"WindowButtonMaximize",
|
||||
"WindowButtonMinimize",
|
||||
"WindowButtonRestore",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
//! Customizable symbols for GUI
|
||||
enum EGUI_DEFAULT_ICON
|
||||
@ -318,8 +316,7 @@ enum EGUI_DEFAULT_ICON
|
||||
EGDI_COUNT
|
||||
};
|
||||
|
||||
const c8 *const GUISkinIconNames[EGDI_COUNT + 1] =
|
||||
{
|
||||
const c8 *const GUISkinIconNames[EGDI_COUNT + 1] = {
|
||||
"windowMaximize",
|
||||
"windowRestore",
|
||||
"windowClose",
|
||||
@ -343,7 +340,8 @@ const c8 *const GUISkinIconNames[EGDI_COUNT + 1] =
|
||||
"collapse",
|
||||
"file",
|
||||
"directory",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
// Customizable fonts
|
||||
enum EGUI_DEFAULT_FONT
|
||||
@ -363,14 +361,14 @@ enum EGUI_DEFAULT_FONT
|
||||
EGDF_COUNT
|
||||
};
|
||||
|
||||
const c8 *const GUISkinFontNames[EGDF_COUNT + 1] =
|
||||
{
|
||||
const c8 *const GUISkinFontNames[EGDF_COUNT + 1] = {
|
||||
"defaultFont",
|
||||
"buttonFont",
|
||||
"windowFont",
|
||||
"menuFont",
|
||||
"tooltipFont",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
//! A skin modifies the look of the GUI elements.
|
||||
class IGUISkin : virtual public IReferenceCounted
|
||||
|
@ -107,12 +107,12 @@ enum E_FOG_TYPE
|
||||
EFT_FOG_EXP2
|
||||
};
|
||||
|
||||
const c8 *const FogTypeNames[] =
|
||||
{
|
||||
const c8 *const FogTypeNames[] = {
|
||||
"FogExp",
|
||||
"FogLinear",
|
||||
"FogExp2",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
//! Interface to driver which is able to perform 2d and 3d graphics functions.
|
||||
/** This interface is one of the most important interfaces of
|
||||
|
@ -31,12 +31,12 @@ enum E_VERTEX_TYPE
|
||||
};
|
||||
|
||||
//! Array holding the built in vertex type names
|
||||
const char *const sBuiltInVertexTypeNames[] =
|
||||
{
|
||||
const char *const sBuiltInVertexTypeNames[] = {
|
||||
"standard",
|
||||
"2tcoords",
|
||||
"tangents",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
//! standard vertex used by the Irrlicht engine.
|
||||
struct S3DVertex
|
||||
|
@ -88,8 +88,7 @@ enum ECOLOR_FORMAT
|
||||
};
|
||||
|
||||
//! Names for ECOLOR_FORMAT types
|
||||
const c8 *const ColorFormatNames[ECF_UNKNOWN + 2] =
|
||||
{
|
||||
const c8 *const ColorFormatNames[ECF_UNKNOWN + 2] = {
|
||||
"A1R5G5B5",
|
||||
"R5G6B5",
|
||||
"R8G8B8",
|
||||
@ -108,7 +107,8 @@ const c8 *const ColorFormatNames[ECF_UNKNOWN + 2] =
|
||||
"D32",
|
||||
"D24S8",
|
||||
"UNKNOWN",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
//! Creates a 16 bit A1R5G5B5 color
|
||||
inline u16 RGBA16(u32 r, u32 g, u32 b, u32 a = 0xFF)
|
||||
|
@ -219,11 +219,11 @@ enum E_COLOR_MATERIAL
|
||||
};
|
||||
|
||||
//! Names for polygon offset direction
|
||||
const c8 *const PolygonOffsetDirectionNames[] =
|
||||
{
|
||||
const c8 *const PolygonOffsetDirectionNames[] = {
|
||||
"Back",
|
||||
"Front",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
//! For SMaterial.ZWriteEnable
|
||||
enum E_ZWRITE
|
||||
@ -243,12 +243,12 @@ enum E_ZWRITE
|
||||
};
|
||||
|
||||
//! Names for E_ZWRITE
|
||||
const c8 *const ZWriteNames[] =
|
||||
{
|
||||
const c8 *const ZWriteNames[] = {
|
||||
"Off",
|
||||
"Auto",
|
||||
"On",
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
//! Maximum number of texture an SMaterial can have.
|
||||
/** SMaterial might ignore some textures in most function, like assignment and comparison,
|
||||
|
@ -11,8 +11,7 @@ namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
const u8 BuiltInFontData[] =
|
||||
{
|
||||
const u8 BuiltInFontData[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
|
||||
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80,
|
||||
0x04, 0x03, 0x00, 0x00, 0x00, 0x31, 0x10, 0x7c, 0xf8, 0x00, 0x00, 0x00,
|
||||
@ -128,7 +127,8 @@ const u8 BuiltInFontData[] =
|
||||
0x70, 0x71, 0x01, 0x06, 0x22, 0x10, 0x90, 0x3d, 0x47, 0x82, 0x48, 0xa6,
|
||||
0x23, 0x13, 0x8c, 0x02, 0x00, 0xe7, 0xfb, 0x84, 0x1b, 0xf9, 0x8e, 0xc0,
|
||||
0x23, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60,
|
||||
0x82};
|
||||
0x82
|
||||
};
|
||||
|
||||
const u32 BuiltInFontDataSize = sizeof(BuiltInFontData);
|
||||
} // end namespace gui
|
||||
|
@ -784,8 +784,7 @@ struct blitterTable
|
||||
tExecuteBlit func;
|
||||
};
|
||||
|
||||
static const blitterTable blitTable[] =
|
||||
{
|
||||
static const blitterTable blitTable[] = {
|
||||
{BLITTER_TEXTURE, -2, -2, executeBlit_TextureCopy_x_to_x},
|
||||
{BLITTER_TEXTURE, video::ECF_A1R5G5B5, video::ECF_A8R8G8B8, executeBlit_TextureCopy_32_to_16},
|
||||
{BLITTER_TEXTURE, video::ECF_A1R5G5B5, video::ECF_R8G8B8, executeBlit_TextureCopy_24_to_16},
|
||||
@ -809,7 +808,8 @@ static const blitterTable blitTable[] =
|
||||
{BLITTER_TEXTURE_COMBINE_ALPHA, video::ECF_A1R5G5B5, video::ECF_A1R5G5B5, executeBlit_TextureCombineColor_16_to_16},
|
||||
{BLITTER_TEXTURE_COMBINE_ALPHA, video::ECF_A1R5G5B5, video::ECF_R8G8B8, executeBlit_TextureCopy_24_to_16},
|
||||
{BLITTER_TEXTURE_COMBINE_ALPHA, video::ECF_R8G8B8, video::ECF_A1R5G5B5, executeBlit_TextureCombineColor_16_to_24},
|
||||
{BLITTER_INVALID, -1, -1, 0}};
|
||||
{BLITTER_INVALID, -1, -1, 0},
|
||||
};
|
||||
|
||||
static inline tExecuteBlit getBlitter2(eBlitter operation, const video::IImage *dest, const video::IImage *source)
|
||||
{
|
||||
|
@ -182,8 +182,7 @@ EGLConfig CEGLManager::chooseConfig(EConfigStyle confStyle)
|
||||
}
|
||||
|
||||
if (confStyle == ECS_EGL_CHOOSE_FIRST_LOWER_EXPECTATIONS) {
|
||||
EGLint Attribs[] =
|
||||
{
|
||||
EGLint Attribs[] = {
|
||||
EGL_RED_SIZE, 8,
|
||||
EGL_GREEN_SIZE, 8,
|
||||
EGL_BLUE_SIZE, 8,
|
||||
@ -197,7 +196,8 @@ EGLConfig CEGLManager::chooseConfig(EConfigStyle confStyle)
|
||||
#ifdef EGL_VERSION_1_3
|
||||
EGL_RENDERABLE_TYPE, eglOpenGLBIT,
|
||||
#endif
|
||||
EGL_NONE, 0};
|
||||
EGL_NONE, 0,
|
||||
};
|
||||
|
||||
EGLint numConfigs = 0;
|
||||
u32 steps = 5;
|
||||
@ -488,12 +488,12 @@ bool CEGLManager::generateContext()
|
||||
break;
|
||||
}
|
||||
|
||||
EGLint ContextAttrib[] =
|
||||
{
|
||||
EGLint ContextAttrib[] = {
|
||||
#ifdef EGL_VERSION_1_3
|
||||
EGL_CONTEXT_CLIENT_VERSION, OpenGLESVersion,
|
||||
#endif
|
||||
EGL_NONE, 0};
|
||||
EGL_NONE, 0,
|
||||
};
|
||||
|
||||
EglContext = eglCreateContext(EglDisplay, EglConfig, EGL_NO_CONTEXT, ContextAttrib);
|
||||
|
||||
|
@ -41,8 +41,7 @@ CGLXManager::CGLXManager(const SIrrlichtCreationParameters ¶ms, const SExpos
|
||||
if (major == 1 && minor > 2 && glxChooseFBConfig) {
|
||||
os::Printer::log("GLX >= 1.3", ELL_DEBUG);
|
||||
// attribute array for the draw buffer
|
||||
int visualAttrBuffer[] =
|
||||
{
|
||||
int visualAttrBuffer[] = {
|
||||
GLX_RENDER_TYPE,
|
||||
GLX_RGBA_BIT,
|
||||
GLX_RED_SIZE,
|
||||
@ -77,7 +76,7 @@ CGLXManager::CGLXManager(const SIrrlichtCreationParameters ¶ms, const SExpos
|
||||
#endif
|
||||
GLX_STEREO,
|
||||
Params.Stereobuffer ? True : False,
|
||||
None
|
||||
None,
|
||||
};
|
||||
|
||||
GLXFBConfig *configList = 0;
|
||||
@ -180,8 +179,7 @@ CGLXManager::CGLXManager(const SIrrlichtCreationParameters ¶ms, const SExpos
|
||||
#endif
|
||||
{
|
||||
// attribute array for the draw buffer
|
||||
int visualAttrBuffer[] =
|
||||
{
|
||||
int visualAttrBuffer[] = {
|
||||
GLX_RGBA, GLX_USE_GL,
|
||||
GLX_RED_SIZE, 4,
|
||||
GLX_GREEN_SIZE, 4,
|
||||
@ -194,7 +192,8 @@ CGLXManager::CGLXManager(const SIrrlichtCreationParameters ¶ms, const SExpos
|
||||
// GLX_USE_GL, which is silently ignored by glXChooseVisual
|
||||
Params.Doublebuffer ? GLX_DOUBLEBUFFER : GLX_USE_GL, // 14
|
||||
Params.Stereobuffer ? GLX_STEREO : GLX_USE_GL, // 15
|
||||
None};
|
||||
None,
|
||||
};
|
||||
|
||||
VisualInfo = glXChooseVisual(display, screennr, visualAttrBuffer);
|
||||
if (!VisualInfo) {
|
||||
|
@ -533,8 +533,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
irr::s32 irrMessage;
|
||||
};
|
||||
|
||||
static messageMap mouseMap[] =
|
||||
{
|
||||
static messageMap mouseMap[] = {
|
||||
{0, WM_LBUTTONDOWN, irr::EMIE_LMOUSE_PRESSED_DOWN},
|
||||
{1, WM_LBUTTONUP, irr::EMIE_LMOUSE_LEFT_UP},
|
||||
{0, WM_RBUTTONDOWN, irr::EMIE_RMOUSE_PRESSED_DOWN},
|
||||
@ -543,7 +542,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{1, WM_MBUTTONUP, irr::EMIE_MMOUSE_LEFT_UP},
|
||||
{2, WM_MOUSEMOVE, irr::EMIE_MOUSE_MOVED},
|
||||
{3, WM_MOUSEWHEEL, irr::EMIE_MOUSE_WHEEL},
|
||||
{-1, 0, 0}};
|
||||
{-1, 0, 0},
|
||||
};
|
||||
|
||||
// handle grouped events
|
||||
messageMap *m = mouseMap;
|
||||
|
@ -46,8 +46,7 @@ bool CNSOGLManager::generateSurface()
|
||||
if (Params.WithAlphaChannel && Params.Bits == 32)
|
||||
alphaSize = 8;
|
||||
|
||||
NSOpenGLPixelFormatAttribute Attribs[] =
|
||||
{
|
||||
NSOpenGLPixelFormatAttribute Attribs[] = {
|
||||
NSOpenGLPFANoRecovery,
|
||||
NSOpenGLPFAAccelerated,
|
||||
NSOpenGLPFADoubleBuffer,
|
||||
@ -58,7 +57,8 @@ bool CNSOGLManager::generateSurface()
|
||||
NSOpenGLPFASamples, Params.AntiAlias,
|
||||
NSOpenGLPFAStencilSize, static_cast<NSOpenGLPixelFormatAttribute>(Params.Stencilbuffer ? 1 : 0),
|
||||
// NSOpenGLPFAFullScreen,
|
||||
0};
|
||||
0,
|
||||
};
|
||||
|
||||
u32 Steps = 6;
|
||||
|
||||
|
@ -90,8 +90,7 @@ protected:
|
||||
const char *getFeatureString(size_t index) const
|
||||
{
|
||||
// One for each EOGLESFeatures
|
||||
static const char *const OGLESFeatureStrings[IRR_OGLES_Feature_Count] =
|
||||
{
|
||||
static const char *const OGLESFeatureStrings[IRR_OGLES_Feature_Count] = {
|
||||
"GL_APPLE_texture_2D_limited_npot",
|
||||
"GL_APPLE_texture_format_BGRA8888",
|
||||
"GL_EXT_blend_minmax",
|
||||
|
@ -846,12 +846,12 @@ void COGLES1Driver::draw2DImage(const video::ITexture *texture, const core::rect
|
||||
sourceRect.LowerRightCorner.X * invW,
|
||||
(isRTT ? sourceRect.UpperLeftCorner.Y : sourceRect.LowerRightCorner.Y) * invH);
|
||||
|
||||
const video::SColor temp[4] =
|
||||
{
|
||||
const video::SColor temp[4] = {
|
||||
0xFFFFFFFF,
|
||||
0xFFFFFFFF,
|
||||
0xFFFFFFFF,
|
||||
0xFFFFFFFF};
|
||||
0xFFFFFFFF,
|
||||
};
|
||||
|
||||
const video::SColor *const useColor = colors ? colors : temp;
|
||||
|
||||
@ -2209,8 +2209,7 @@ core::dimension2du COGLES1Driver::getMaxTextureSize() const
|
||||
|
||||
GLenum COGLES1Driver::getGLBlend(E_BLEND_FACTOR factor) const
|
||||
{
|
||||
static GLenum const blendTable[] =
|
||||
{
|
||||
static GLenum const blendTable[] = {
|
||||
GL_ZERO,
|
||||
GL_ONE,
|
||||
GL_DST_COLOR,
|
||||
@ -2221,7 +2220,8 @@ GLenum COGLES1Driver::getGLBlend(E_BLEND_FACTOR factor) const
|
||||
GL_ONE_MINUS_SRC_ALPHA,
|
||||
GL_DST_ALPHA,
|
||||
GL_ONE_MINUS_DST_ALPHA,
|
||||
GL_SRC_ALPHA_SATURATE};
|
||||
GL_SRC_ALPHA_SATURATE,
|
||||
};
|
||||
|
||||
return blendTable[factor];
|
||||
}
|
||||
|
@ -1133,12 +1133,12 @@ void COpenGLDriver::draw2DImage(const video::ITexture *texture, const core::rect
|
||||
sourceRect.LowerRightCorner.X * invW,
|
||||
sourceRect.LowerRightCorner.Y * invH);
|
||||
|
||||
const video::SColor temp[4] =
|
||||
{
|
||||
const video::SColor temp[4] = {
|
||||
0xFFFFFFFF,
|
||||
0xFFFFFFFF,
|
||||
0xFFFFFFFF,
|
||||
0xFFFFFFFF};
|
||||
0xFFFFFFFF,
|
||||
};
|
||||
|
||||
const video::SColor *const useColor = colors ? colors : temp;
|
||||
|
||||
|
@ -198,8 +198,7 @@ bool CWGLManager::initialize(const SIrrlichtCreationParameters ¶ms, const SE
|
||||
Params.AntiAlias = 32;
|
||||
|
||||
f32 fAttributes[] = {0.0, 0.0};
|
||||
s32 iAttributes[] =
|
||||
{
|
||||
s32 iAttributes[] = {
|
||||
WGL_DRAW_TO_WINDOW_ARB, 1,
|
||||
WGL_SUPPORT_OPENGL_ARB, 1,
|
||||
WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
|
||||
@ -221,7 +220,8 @@ bool CWGLManager::initialize(const SIrrlichtCreationParameters ¶ms, const SE
|
||||
WGL_SAMPLE_BUFFERS_3DFX, (Params.AntiAlias > 0) ? 1 : 0,
|
||||
#endif
|
||||
// WGL_DEPTH_FLOAT_EXT, 1,
|
||||
0, 0, 0, 0};
|
||||
0, 0, 0, 0,
|
||||
};
|
||||
int iAttrSize = sizeof(iAttributes) / sizeof(int);
|
||||
if (!multi_sample_supported) {
|
||||
memmove(&iAttributes[20], &iAttributes[24], sizeof(int) * (iAttrSize - 24));
|
||||
@ -349,12 +349,12 @@ bool CWGLManager::generateContext()
|
||||
if (wglCreateContextAttribs_ARB) {
|
||||
// with 3.0 all available profiles should be usable, higher versions impose restrictions
|
||||
// we need at least 1.1
|
||||
const int iAttribs[] =
|
||||
{
|
||||
const int iAttribs[] = {
|
||||
WGL_CONTEXT_MAJOR_VERSION_ARB, 1,
|
||||
WGL_CONTEXT_MINOR_VERSION_ARB, 1,
|
||||
// WGL_CONTEXT_FLAGS_ARB, WGL_CONTEXT_DEBUG_BIT_ARB, // enable to get a debug context (depends on driver if that does anything)
|
||||
0};
|
||||
0,
|
||||
};
|
||||
hrc = wglCreateContextAttribs_ARB(HDc, 0, iAttribs);
|
||||
} else
|
||||
#endif
|
||||
|
@ -802,12 +802,12 @@ void COpenGL3DriverBase::draw2DImage(const video::ITexture *texture, const core:
|
||||
sourceRect.LowerRightCorner.X * invW,
|
||||
(isRTT ? sourceRect.UpperLeftCorner.Y : sourceRect.LowerRightCorner.Y) * invH);
|
||||
|
||||
const video::SColor temp[4] =
|
||||
{
|
||||
const video::SColor temp[4] = {
|
||||
0xFFFFFFFF,
|
||||
0xFFFFFFFF,
|
||||
0xFFFFFFFF,
|
||||
0xFFFFFFFF};
|
||||
0xFFFFFFFF,
|
||||
};
|
||||
|
||||
const video::SColor *const useColor = colors ? colors : temp;
|
||||
|
||||
@ -1939,8 +1939,7 @@ core::dimension2du COpenGL3DriverBase::getMaxTextureSize() const
|
||||
|
||||
GLenum COpenGL3DriverBase::getGLBlend(E_BLEND_FACTOR factor) const
|
||||
{
|
||||
static GLenum const blendTable[] =
|
||||
{
|
||||
static GLenum const blendTable[] = {
|
||||
GL_ZERO,
|
||||
GL_ONE,
|
||||
GL_DST_COLOR,
|
||||
@ -1951,7 +1950,8 @@ GLenum COpenGL3DriverBase::getGLBlend(E_BLEND_FACTOR factor) const
|
||||
GL_ONE_MINUS_SRC_ALPHA,
|
||||
GL_DST_ALPHA,
|
||||
GL_ONE_MINUS_DST_ALPHA,
|
||||
GL_SRC_ALPHA_SATURATE};
|
||||
GL_SRC_ALPHA_SATURATE,
|
||||
};
|
||||
|
||||
return blendTable[factor];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user