You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-16 14:00:40 +00:00
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
This commit is contained in:
@@ -46,22 +46,18 @@
|
||||
typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display *, GLXFBConfig, GLXContext, Bool, const int *);
|
||||
|
||||
struct ContextGL_X11_Private {
|
||||
|
||||
::GLXContext glx_context;
|
||||
};
|
||||
|
||||
void ContextGL_X11::release_current() {
|
||||
|
||||
glXMakeCurrent(x11_display, None, nullptr);
|
||||
}
|
||||
|
||||
void ContextGL_X11::make_current() {
|
||||
|
||||
glXMakeCurrent(x11_display, x11_window, p->glx_context);
|
||||
}
|
||||
|
||||
void ContextGL_X11::swap_buffers() {
|
||||
|
||||
glXSwapBuffers(x11_display, x11_window);
|
||||
}
|
||||
|
||||
@@ -85,7 +81,6 @@ static void set_class_hint(Display *p_display, Window p_window) {
|
||||
}
|
||||
|
||||
Error ContextGL_X11::initialize() {
|
||||
|
||||
//const char *extensions = glXQueryExtensionsString(x11_display, DefaultScreen(x11_display));
|
||||
|
||||
GLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (GLXCREATECONTEXTATTRIBSARBPROC)glXGetProcAddress((const GLubyte *)"glXCreateContextAttribsARB");
|
||||
@@ -167,7 +162,6 @@ Error ContextGL_X11::initialize() {
|
||||
|
||||
switch (context_type) {
|
||||
case GLES_2_0_COMPATIBLE: {
|
||||
|
||||
p->glx_context = glXCreateNewContext(x11_display, fbconfig, GLX_RGBA_TYPE, 0, true);
|
||||
ERR_FAIL_COND_V(!p->glx_context, ERR_UNCONFIGURED);
|
||||
} break;
|
||||
@@ -192,7 +186,6 @@ Error ContextGL_X11::initialize() {
|
||||
}
|
||||
|
||||
int ContextGL_X11::get_window_width() {
|
||||
|
||||
XWindowAttributes xwa;
|
||||
XGetWindowAttributes(x11_display, x11_window, &xwa);
|
||||
|
||||
@@ -235,13 +228,11 @@ void ContextGL_X11::set_use_vsync(bool p_use) {
|
||||
use_vsync = p_use;
|
||||
}
|
||||
bool ContextGL_X11::is_using_vsync() const {
|
||||
|
||||
return use_vsync;
|
||||
}
|
||||
|
||||
ContextGL_X11::ContextGL_X11(::Display *p_x11_display, ::Window &p_x11_window, const OS::VideoMode &p_default_video_mode, ContextType p_context_type) :
|
||||
x11_window(p_x11_window) {
|
||||
|
||||
default_video_mode = p_default_video_mode;
|
||||
x11_display = p_x11_display;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user