Cleaning for opengl rendering prep.

This commit is contained in:
James Grogan 2022-11-14 11:19:51 +00:00
parent 402f381d10
commit 7c6a92f4ec
58 changed files with 570 additions and 533 deletions

View file

@ -4,6 +4,7 @@
#include "Window.h"
#include "XcbWindow.h"
#include "Image.h"
class XcbImage
{
@ -11,9 +12,9 @@ public:
XcbImage(xcb_connection_t* connection, mt::Window* window, xcb_screen_t* screen)
{
mPixmap = xcb_generate_id(connection);
auto hwnd = dynamic_cast<XcbWindow*>(window->GetPlatformWindow())->getHandle();
const auto w = window->GetWidth();
const auto h = window->GetHeight();
auto hwnd = dynamic_cast<XcbWindow*>(window->getPlatformWindow())->getHandle();
const auto w = window->getWidth();
const auto h = window->getHeight();
xcb_create_pixmap(connection, screen->root_depth, mPixmap, hwnd, w, h);
}
@ -21,10 +22,10 @@ public:
{
if (!mXImage)
{
auto backing_image = window->getBackingImage();
auto backing_image = window->getImage();
const auto w = window->GetWidth();
const auto h = window->GetHeight();
const auto w = window->getWidth();
const auto h = window->getHeight();
//auto data = const_cast<unsigned char*>(backing_image->getDataPtr());
auto data = backing_image->getData();