llwindowmesaheadless.h

Go to the documentation of this file.
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         /*virtual*/ void show() {};
00045         /*virtual*/ void hide() {};
00046         /*virtual*/ void close() {};
00047         /*virtual*/ BOOL getVisible() {return FALSE;};
00048         /*virtual*/ BOOL getMinimized() {return FALSE;};
00049         /*virtual*/ BOOL getMaximized() {return FALSE;};
00050         /*virtual*/ BOOL maximize() {return FALSE;};
00051         /*virtual*/ BOOL getFullscreen() {return FALSE;};
00052         /*virtual*/ BOOL getPosition(LLCoordScreen *position) {return FALSE;};
00053         /*virtual*/ BOOL getSize(LLCoordScreen *size) {return FALSE;};
00054         /*virtual*/ BOOL getSize(LLCoordWindow *size) {return FALSE;};
00055         /*virtual*/ BOOL setPosition(LLCoordScreen position) {return FALSE;};
00056         /*virtual*/ BOOL setSize(LLCoordScreen size) {return FALSE;};
00057         /*virtual*/ BOOL switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp = NULL) {return FALSE;};
00058         /*virtual*/ BOOL setCursorPosition(LLCoordWindow position) {return FALSE;};
00059         /*virtual*/ BOOL getCursorPosition(LLCoordWindow *position) {return FALSE;};
00060         /*virtual*/ void showCursor() {};
00061         /*virtual*/ void hideCursor() {};
00062         /*virtual*/ void showCursorFromMouseMove() {};
00063         /*virtual*/ void hideCursorUntilMouseMove() {};
00064         /*virtual*/ BOOL isCursorHidden() {return FALSE;};
00065         /*virtual*/ void setCursor(ECursorType cursor) {};
00066         //virtual ECursorType getCursor() { return mCurrentCursor; };
00067         /*virtual*/ void captureMouse() {};
00068         /*virtual*/ void releaseMouse() {};
00069         /*virtual*/ void setMouseClipping( BOOL b ) {};
00070         /*virtual*/ BOOL isClipboardTextAvailable() {return FALSE; };
00071         /*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst) {return FALSE; };
00072         /*virtual*/ BOOL copyTextToClipboard(const LLWString &src) {return FALSE; };
00073         /*virtual*/ void flashIcon(F32 seconds) {};
00074         /*virtual*/ F32 getGamma() {return 1.0f; };
00075         /*virtual*/ BOOL setGamma(const F32 gamma) {return FALSE; }; // Set the gamma
00076         /*virtual*/ BOOL restoreGamma() {return FALSE; };       // Restore original gamma table (before updating gamma)
00077         /*virtual*/ void setFSAASamples(const U32 fsaa_samples) { /* FSAA not supported yet on Mesa headless.*/ }
00078         /*virtual*/ U32  getFSAASamples() { return 0; }
00079         //virtual ESwapMethod getSwapMethod() { return mSwapMethod; }
00080         /*virtual*/ void gatherInput() {};
00081         /*virtual*/ void delayInputProcessing() {};
00082         /*virtual*/ void swapBuffers();
00083 
00084         /*virtual*/ LLString getTempFileName() {return LLString(""); };
00085         /*virtual*/ void deleteFile( const char* file_name ) {};
00086         /*virtual*/ S32 stat( const char* file_name, struct stat* stat_info ) {return 0; };
00087         /*virtual*/ 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         // handy coordinate space conversion routines
00091         /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordWindow *to) { return FALSE; };
00092         /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordScreen *to) { return FALSE; };
00093         /*virtual*/ BOOL convertCoords(LLCoordWindow from, LLCoordGL *to) { return FALSE; };
00094         /*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordWindow *to) { return FALSE; };
00095         /*virtual*/ BOOL convertCoords(LLCoordScreen from, LLCoordGL *to) { return FALSE; };
00096         /*virtual*/ BOOL convertCoords(LLCoordGL from, LLCoordScreen *to) { return FALSE; };
00097 
00098         /*virtual*/ LLWindowResolution* getSupportedResolutions(S32 &num_resolutions) { return NULL; };
00099         /*virtual*/ F32 getNativeAspectRatio() { return 1.0f; };
00100         /*virtual*/ F32 getPixelAspectRatio() { return 1.0f; };
00101         /*virtual*/ void setNativeAspectRatio(F32 ratio) {}
00102 
00103         /*virtual*/ void *getPlatformWindow() { return 0; };
00104         /*virtual*/ 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         /*virtual*/ void showImpl() {};
00123         /*virtual*/ void updateImpl(const char* mesg) {};
00124         /*virtual*/ void hideImpl() {};
00125 
00126 };
00127 
00128 #endif
00129 
00130 #endif //LL_LLWINDOWMESAHEADLESS_H

Generated on Fri May 16 08:33:03 2008 for SecondLife by  doxygen 1.5.5