mirror of https://github.com/buggins/dlangui.git
xcb/glx fixes
This commit is contained in:
parent
0f43f73bd9
commit
31fbca74a1
|
@ -57,7 +57,7 @@ version(linux) {
|
||||||
uint mask;
|
uint mask;
|
||||||
uint values[3];
|
uint values[3];
|
||||||
|
|
||||||
_enableOpengl = false;
|
//_enableOpengl = false;
|
||||||
/* create black graphics context */
|
/* create black graphics context */
|
||||||
if (!_enableOpengl) {
|
if (!_enableOpengl) {
|
||||||
_g = xcb_generate_id(_xcbconnection);
|
_g = xcb_generate_id(_xcbconnection);
|
||||||
|
@ -88,7 +88,8 @@ version(linux) {
|
||||||
//values[0] = _xcbscreen.white_pixel;
|
//values[0] = _xcbscreen.white_pixel;
|
||||||
values[0] = eventmask;
|
values[0] = eventmask;
|
||||||
values[1] = _colormap;
|
values[1] = _colormap;
|
||||||
visualId = _visualID;
|
visualId = _xcbscreen.root_visual;
|
||||||
|
//visualId = _visualID;
|
||||||
} else {
|
} else {
|
||||||
mask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK;
|
mask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK;
|
||||||
values[0] = _xcbscreen.white_pixel;
|
values[0] = _xcbscreen.white_pixel;
|
||||||
|
@ -241,8 +242,11 @@ version(linux) {
|
||||||
void redraw() {
|
void redraw() {
|
||||||
|
|
||||||
if (_enableOpengl) {
|
if (_enableOpengl) {
|
||||||
|
glXMakeContextCurrent(_display, _drawable, _drawable, _context);
|
||||||
glClearColor(0.2, 0.4, 0.9, 1.0);
|
glClearColor(0.2, 0.4, 0.9, 1.0);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
glXSwapBuffers(_display, _drawable);
|
||||||
|
//glXMakeContextCurrent(_display, _drawable, _drawable, null);
|
||||||
} else {
|
} else {
|
||||||
if (!_drawbuf)
|
if (!_drawbuf)
|
||||||
_drawbuf = new ColorDrawBuf(_dx, _dy);
|
_drawbuf = new ColorDrawBuf(_dx, _dy);
|
||||||
|
|
Loading…
Reference in New Issue