oglwindow.hpp
来自「用于GPU通用计算的编程语言BrookGPU 0.4」· HPP 代码 · 共 71 行
HPP
71 行
// oglwindow.hpp#ifndef OGLWINDOW_HPP#define OGLWINDOW_HPP#ifdef WIN32#include <windows.h>#else#include <X11/Xlib.h>#include <GL/glx.h>#endif#include "oglfunc.hpp"namespace brook { class OGLWindow { public: OGLWindow(); ~OGLWindow(); void initPbuffer( const int (*viAttribList)[4][64], const float (*vfAttribList)[4][16], const int (*vpiAttribList)[4][16]); bool bindPbuffer(unsigned int width, unsigned int height, unsigned int numOutputs, unsigned int numComponents); private: #ifdef WIN32 HGLRC hglrc; HGLRC hglrc_window; HPBUFFERARB hpbuffer; HWND hwnd; HDC hwindowdc; HDC hpbufferdc; int pixelformat[4][4]; int piAttribList[4][16];#else /* See note in oglwindow.cpp for why things are static */ static Display *pDisplay; static int iScreen; static Window glxWindow; static Colormap cmap; static XVisualInfo *visual; static GLXFBConfig *glxConfig[4]; static GLXPbuffer glxPbuffer; static GLXContext glxContext; static int piAttribList[4][16]; static bool static_window_created; static bool static_pbuffers_initialized;#endif unsigned int currentPbufferComponents; unsigned int currentPbufferOutputs; unsigned int currentPbufferWidth; unsigned int currentPbufferHeight; };}#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?