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, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {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 void setFSAASamples(const U32 fsaa_samples) { }
00078 U32 getFSAASamples() { return 0; }
00079
00080 void gatherInput() {};
00081 void delayInputProcessing() {};
00082 void swapBuffers();
00083
00084 LLString getTempFileName() {return LLString(""); };
00085 void deleteFile( const char* file_name ) {};
00086 S32 stat( const char* file_name, struct stat* stat_info ) {return 0; };
00087 BOOL sendEmail(const char* address,const char* subject,const char* body_text,const char* attachment=NULL, const char* attachment_displayed_name=NULL) { return FALSE; };
00088
00089
00090
00091 BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
00092 BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) { return FALSE; };
00093 BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) { return FALSE; };
00094 BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) { return FALSE; };
00095 BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) { return FALSE; };
00096 BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) { return FALSE; };
00097
00098 LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) { return NULL; };
00099 F32 getNativeAspectRatio() { return 1.0f; };
00100 F32 getPixelAspectRatio() { return 1.0f; };
00101 void setNativeAspectRatio(F32 ratio) {}
00102
00103 void *getPlatformWindow() { return 0; };
00104 void bringToFront() {};
00105
00106 LLWindowMesaHeadless(char *title, char *name, S32 x, S32 y, S32 width, S32 height,
00107 U32 flags, BOOL fullscreen, BOOL clearBg,
00108 BOOL disable_vsync, BOOL use_gl, BOOL ignore_pixel_depth);
00109 ~LLWindowMesaHeadless();
00110
00111 private:
00112 OSMesaContext mMesaContext;
00113 unsigned char * mMesaBuffer;
00114 };
00115
00116 class LLSplashScreenMesaHeadless : public LLSplashScreen
00117 {
00118 public:
00119 LLSplashScreenMesaHeadless() {};
00120 virtual ~LLSplashScreenMesaHeadless() {};
00121
00122 void showImpl() {};
00123 void updateImpl(const char* mesg) {};
00124 void hideImpl() {};
00125
00126 };
00127
00128 #endif
00129
00130 #endif //LL_LLWINDOWMESAHEADLESS_H