00001
00032 #ifndef LL_LLWINDOWMESAHEADLESS_H
00033 #define LL_LLWINDOWMESAHEADLESS_H
00034
00035 #if LL_MESA_HEADLESS
00036
00037 #include "llwindow.h"
00038 #include "GL/glu.h"
00039 #include "GL/osmesa.h"
00040
00041 class LLWindowMesaHeadless : public LLWindow
00042 {
00043 public:
00044 void show() {};
00045 void hide() {};
00046 void close() {};
00047 BOOL getVisible() {return FALSE;};
00048 BOOL getMinimized() {return FALSE;};
00049 BOOL getMaximized() {return FALSE;};
00050 BOOL maximize() {return FALSE;};
00051 BOOL getFullscreen() {return FALSE;};
00052 BOOL getPosition(LLCoordScreen *position) {return FALSE;};
00053 BOOL getSize(LLCoordScreen *size) {return FALSE;};
00054 BOOL getSize(LLCoordWindow *size) {return FALSE;};
00055 BOOL setPosition(LLCoordScreen position) {return FALSE;};
00056 BOOL setSize(LLCoordScreen size) {return FALSE;};
00057 BOOL switchContext(BOOL fullscreen, LLCoordScreen size, BOOL disable_vsync) {return FALSE;};
00058 BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
00059 BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
00060 void showCursor() {};
00061 void hideCursor() {};
00062 void showCursorFromMouseMove() {};
00063 void hideCursorUntilMouseMove() {};
00064 BOOL isCursorHidden() {return FALSE;};
00065 void setCursor(ECursorType cursor) {};
00066
00067 void captureMouse() {};
00068 void releaseMouse() {};
00069 void setMouseClipping( BOOL b ) {};
00070 BOOL isClipboardTextAvailable() {return FALSE; };
00071 BOOL pasteTextFromClipboard(LLWString &dst) {return FALSE; };
00072 BOOL copyTextToClipboard(const LLWString &src) {return FALSE; };
00073 void flashIcon(F32 seconds) {};
00074 F32 getGamma() {return 1.0f; };
00075 BOOL setGamma(const F32 gamma) {return FALSE; };
00076 BOOL restoreGamma() {return FALSE; };
00077
00078 void gatherInput() {};
00079 void delayInputProcessing() {};
00080 void swapBuffers();
00081
00082 LLString getTempFileName() {return LLString(""); };
00083 void deleteFile( const char* file_name ) {};
00084 S32 stat( const char* file_name, struct stat* stat_info ) {return 0; };
00085 BOOL sendEmail(const char* address,const char* subject,const char* body_text,const char* attachment=NULL, const char* attachment_displayed_name=NULL) { return FALSE; };
00086
00087
00088
00089 BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
00090 BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) { return FALSE; };
00091 BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) { return FALSE; };
00092 BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) { return FALSE; };
00093 BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) { return FALSE; };
00094 BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) { return FALSE; };
00095
00096 LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) { return NULL; };
00097 F32 getNativeAspectRatio() { return 1.0f; };
00098 F32 getPixelAspectRatio() { return 1.0f; };
00099 void setNativeAspectRatio(F32 ratio) {}
00100
00101 void *getPlatformWindow() { return 0; };
00102 void bringToFront() {};
00103
00104 LLWindowMesaHeadless(char *title, char *name, S32 x, S32 y, S32 width, S32 height,
00105 U32 flags, BOOL fullscreen, BOOL clearBg,
00106 BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth, S32 stereo_mode);
00107 ~LLWindowMesaHeadless();
00108
00109 private:
00110 OSMesaContext mMesaContext;
00111 unsigned char * mMesaBuffer;
00112 };
00113
00114 class LLSplashScreenMesaHeadless : public LLSplashScreen
00115 {
00116 public:
00117 LLSplashScreenMesaHeadless() {};
00118 virtual ~LLSplashScreenMesaHeadless() {};
00119
00120 void showImpl() {};
00121 void updateImpl(const char* mesg) {};
00122 void hideImpl() {};
00123
00124 };
00125
00126 #endif
00127
00128 #endif //LL_LLWINDOWMESAHEADLESS_H