Changeset 820


Ignore:
Timestamp:
Aug 12, 2011, 6:33:15 PM (8 years ago)
Author:
sam
Message:

ps3: until we know how to retrieve and change the screen resolution from
within the Video class, just store what the GL context tells us and stick
to that.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ps3app.cpp

    r758 r820  
    1414
    1515#if defined __CELLOS_LV2__
     16#   include <sys/ppu_thread.h> /* sys_ppu_thread_get_stack_information */
    1617#   include <sys/spu_initialize.h>
    1718#   include <sys/paths.h> /* SYS_HOST_ROOT */
     
    7980    psglInit(&psglio);
    8081
     82#if 0
     83    sys_ppu_thread_stack_t stack;
     84    sys_ppu_thread_get_stack_information(&stack);
     85    printf("stack starts at %p, ends at %p\n", stack.pst_addr,
     86           (uint8_t *)stack.pst_addr + stack.pst_size);
     87#endif
     88
    8189    PSGLdevice* psgl = psglCreateDeviceAuto(GL_ARGB_SCE, GL_DEPTH_COMPONENT24,
    8290                                       GL_MULTISAMPLING_4X_SQUARE_ROTATED_SCE);
    8391    GLuint w, h;
    8492    psglGetDeviceDimensions(psgl, &w, &h);
     93    res = vec2i(w, h);
    8594
    8695    PSGLcontext *ctx = psglCreateContext();
  • trunk/src/video.cpp

    r808 r820  
    3434private:
    3535    static mat4 proj_matrix, view_matrix;
    36 #if defined ANDROID_NDK
     36#if defined ANDROID_NDK || defined __CELLOS_LV2__
    3737    static vec2i saved_viewport;
    3838#endif
     
    4242mat4 VideoData::view_matrix;
    4343
    44 #if defined ANDROID_NDK
     44#if defined ANDROID_NDK || defined __CELLOS_LV2__
    4545vec2i VideoData::saved_viewport = 0;
    4646#endif
     
    6565    glViewport(0, 0, size.x, size.y);
    6666
    67 #if defined ANDROID_NDK
     67#if defined ANDROID_NDK || defined __CELLOS_LV2__
    6868    VideoData::saved_viewport = size;
    6969#endif
     
    183183#elif defined __CELLOS_LV2__
    184184    // FIXME: use psglCreateDeviceAuto && psglGetDeviceDimensions
    185     return vec2i(1920, 1080);
     185    return VideoData::saved_viewport;
    186186#else
    187187    GLint v[4];
Note: See TracChangeset for help on using the changeset viewer.