[pspgl + sdl] psp hangs up

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
lego
Posts: 43
Joined: Fri Oct 17, 2008 1:09 am

[pspgl + sdl] psp hangs up

Post by lego »

Hi all.

I have a trouble with pspgl on my psp. I tried to convert my program from sdl to sdl+pspgl. So, when my program reachs first gl function ( glMatrixMode(GL_PROJECTION) ), psp hangs up.

my example code:

Code: Select all

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <SDL/SDL.h>
#include <SDL/SDL_ttf.h>
#include <SDL/SDL_opengl.h>
/*
#include <GL/gl.h>
#include <GL/glu.h>
*/
#include <math.h>
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspthreadman.h>
#include <pspdisplay.h>
#include <pspnet_inet.h>
#include <pspnet.h>
#include <psputility.h>


PSP_MAIN_THREAD_ATTR&#40;THREAD_ATTR_USER&#41;;

#define printf pspDebugScreenPrintf


/*
  Convert a HSV color to a RGB color.
  hsv_h must be from 0 to 360.
  hsv_s and hsv_v must be from 0 to 100.
  r_out, g_out and b_out will be set to a value from 0 to 255.
*/
void hsv_to_rgb&#40;float hsv_h, float hsv_s, float hsv_v,
                float *const r_out,
                float *const g_out,
                float *const b_out&#41;
&#123;
  float f, p, q, t;
  float r = 0, g = 0, b = 0;


  /* Convert to a number in a 0..1 range. */
  hsv_s /= 100;
  hsv_v /= 100;

  f = hsv_h/60 - floor&#40;hsv_h/60&#41;;
  p = hsv_v * &#40;1.0 - hsv_s&#41;;
  q = hsv_v * &#40;1.0 - f*hsv_s&#41;;
  t = hsv_v * &#40;1.0 - &#40;1.0 - f&#41;*hsv_s&#41;;

  switch &#40;&#40;unsigned int&#41;floor&#40;hsv_h/60&#41; % 6&#41; &#123;
  case 0&#58;
    r = hsv_v; g = t; b = p;
    break;
  case 1&#58;
    r = q; g = hsv_v; b = p;
    break;
  case 2&#58;
    r = p; g = hsv_v; b = t;
    break;
  case 3&#58;
    r = p; g = q; b = hsv_v;
    break;
  case 4&#58;
    r = t; g = p; b = hsv_v;
    break;
  case 5&#58;
    r = hsv_v; g = p; b = q;
    break;
  &#125;
  *r_out = r;
  *g_out = g;
  *b_out = b;
&#125;


void draw_win&#40;unsigned int x, unsigned int y,
                unsigned int w, unsigned int h,
              unsigned int hsv_h, unsigned int hsv_s_in&#41;
&#123;
  float r, g, b;
  float hsv_s, hsv_s_step, hsv_v, hsv_v_step;
  /* A hsv_s zero value position. */
  float const hsv_s_zp = &#40;float&#41;3/4;
  float const white_line_w = 0.05*w;
  float const hsv_s_dh = &#40;1.0 - hsv_s_zp&#41;*&#40;&#40;float&#41;w - white_line_w&#41;;
  int Xi, Yi;


  w = &#40;int&#41;&#40;&#40;float&#41;hsv_s_zp*w&#41; - white_line_w;
  hsv_v_step = &#40;float&#41;100/powf&#40;w, 2&#41;;
  hsv_s_step = &#40;float&#41;hsv_s_in/powf&#40;hsv_s_dh, 2&#41;;
  w += x;
  h += y;

  glBegin&#40;GL_LINE_STRIP&#41;;

  hsv_s = hsv_s_in;
  for&#40;Xi = x, hsv_v = 0;
    Xi < w;
      //    Xi++, hsv_v = hsv_v_step*powf&#40;Xi - x, 2&#41;&#41; &#123;
    Xi++, hsv_v = 100 - hsv_v_step*powf&#40;w - Xi, 2&#41;&#41; &#123;
    if &#40; &#40;Xi - x&#41; > &#40;w - x - hsv_s_dh&#41;&#41; &#123;
      //hsv_s = hsv_s_step*powf&#40;w - Xi, 2&#41;;
      hsv_s = &#40;float&#41;hsv_s_in - hsv_s_step*powf&#40;Xi - &#40;w - x - hsv_s_dh&#41; - x, 2&#41;;
    &#125;
    hsv_to_rgb&#40;&#40;double&#41;hsv_h, hsv_s, hsv_v, &r, &g, &b&#41;;

    glColor3f&#40;r, g, b&#41;;

    for&#40;Yi = y; Yi < h; Yi++&#41; &#123;
      glVertex3i&#40;Xi, Yi, 0&#41;;
    &#125;
  &#125;


  w += white_line_w;
  hsv_to_rgb&#40;&#40;double&#41;hsv_h, 0, 100, &r, &g, &b&#41;;
  glColor3f&#40;r, g, b&#41;;
  for&#40;; Xi < w; Xi++&#41; &#123;
    for&#40;Yi = y; Yi < h; Yi++&#41; &#123;
      glVertex3i&#40;Xi, Yi, 0&#41;;
    &#125;
  &#125;


  hsv_s_step = &#40;float&#41;&#40;hsv_s_in*2/3&#41;/powf&#40;hsv_s_dh, 2&#41;;
  w += hsv_s_dh;
  for&#40;; Xi < w; Xi++&#41; &#123;
    hsv_s = &#40;float&#41;hsv_s_in*2/3 - hsv_s_step*powf&#40;w - Xi, 2&#41;;
    hsv_to_rgb&#40;&#40;double&#41;hsv_h, hsv_s, hsv_v, &r, &g, &b&#41;;

    glColor3f&#40;r, g, b&#41;;

    for&#40;Yi = y; Yi < h; Yi++&#41; &#123;
      glVertex3i&#40;Xi, Yi, 0&#41;;
    &#125;
  &#125;

  glEnd&#40;&#41;;
&#125;

void initgl&#40;void&#41;
&#123;
  glMatrixMode&#40;GL_PROJECTION&#41;;
  glLoadIdentity&#40;&#41;;
  glOrtho&#40;0.0, 480, 0, 272, -1, 1&#41;;
  //glFrustum&#40;0, 480, 0, 272, 0.9999, 100.0&#41;;


  glMatrixMode&#40;GL_MODELVIEW&#41;;
  glLoadIdentity&#40;&#41;;

  glViewport&#40;0, 0, 480, 272&#41;;

  glClearColor&#40;0.0, 0.0, 0.0, 0.0&#41;;
&#125;

int SDL_main&#40;void&#41;
&#123;
  SDL_Surface *scrn;
  but_t *but1, *but2;


  if &#40; SDL_Init&#40;SDL_INIT_VIDEO&#41; &#41; &#123;
    fprintf&#40;stderr, "Error&#58; %s\n", SDL_GetError&#40;&#41;&#41;;
    return 1;
  &#125;
  if &#40; TTF_Init&#40;&#41; &#41; &#123;
    fprintf&#40;stderr, "TTF Error&#58; %s\n", TTF_GetError&#40;&#41;&#41;;
    exit&#40;1&#41;;
  &#125;
  atexit&#40;SDL_Quit&#41;;
  atexit&#40;TTF_Quit&#41;;

  if &#40; !&#40;scrn = SDL_SetVideoMode&#40;480, 272, 32, SDL_OPENGL&#41;&#41; &#41; &#123;
    fprintf&#40;stderr, "Set video Error&#58; %s\n", SDL_GetError&#40;&#41;&#41;;
    return 2;
  &#125;

  initgl&#40;&#41;;

  glClear&#40;GL_COLOR_BUFFER_BIT&#41;;


  draw_win&#40;50, 100, 200 - 4, 100 - 4, 284, 92&#41;;


  SDL_GL_SwapBuffers&#40;&#41;;

  sceKernelSleepThreadCB&#40;&#41;;

  return 0;
&#125;
Makefile:

Code: Select all

.PHONY&#58; myclean

MOUNTDIR &#58;= /media/usbflash
DESTDIR &#58;= $&#40;MOUNTDIR&#41;/psp/game380/ogl_test
TARGET = ogl.c 
OBJS = ogl.o
PSP-PREF = $&#40;shell psp-config --psp-prefix&#41;

MEM_CONTROL = 2
MEM_CONTROL_LOG = 0
DEBUG = 0

ifeq &#40;$&#40;DEBUG&#41;,1&#41;
CFLAGS += -DDEBUG -g3 -ggdb
endif

CFLAGS += -O2 -G0 -Wall -I$&#40;PSP-PREF&#41;/include \
         $&#40;shell $&#40;PSP-PREF&#41;/bin/sdl-config --cflags&#41; \
        -DMEM_CONTROL=$&#40;MEM_CONTROL&#41; -DMEM_CONTROL_LOG=$&#40;MEM_CONTROL_LOG&#41;
LDFLAGS &#58;=
LIBS =  -L$&#40;PSP-PREF&#41;/lib -L$&#40;shell psp-config --pspsdk-path&#41;/lib \
        -lconfig \
        -lSDL_ttf -lSDLmain -lSDL -lglut -lGLU -lGL \
        -lfreetype -lpspvfpu -lm -lpspgu -lpspaudio -lpspwlan \
        -lpsphprm -lpsprtc 
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;

PSP_FW_VERSION = 380

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = ogl test

PSPSDK=$&#40;shell psp-config --pspsdk-path&#41;
include $&#40;PSPSDK&#41;/lib/build.mak

myclean&#58;
        rm -f *~

install&#58; all
        mount $&#40;MOUNTDIR&#41;
        mkdir -p $&#40;DESTDIR&#41; || true
        cp EBOOT.PBP $&#40;DESTDIR&#41;/
        mkdir $&#40;DESTDIR&#41;/fonts && \
          cp /usr/share/fonts/truetype/freefont/Free&#123;Sans,Serif&#125;.ttf \
            $&#40;DESTDIR&#41;/fonts/ || \
          true
        umount $&#40;MOUNTDIR&#41;
pspsdk - rev 2473

sdl configure command: ./configure --host psp --prefix= $(psp-config --psp-prefix) --with-sdl-prefix=$(psp-config --psp-prefix) --enable-video-opengl

Firmware 3.90
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

PSPGL uses the vfpu. Add THREAD_ATTR_VFPU to the thread attributes.
iceman755
Posts: 30
Joined: Mon Jul 21, 2008 1:12 am

Post by iceman755 »

I had to make a lot of changes to compile this, so I don't know if this is the solution for you, but it doesn't worked until I add PSP_HEAP_SIZE_KB(-1024);

I think I'm using a newer SDK than yours, in the main.c changes aren't a lot, but the makefile is completely different:

Code: Select all

#include <stdlib.h> 
#include <stdio.h> 
#include <unistd.h> 
#include <signal.h> 
#include <SDL/SDL.h> 
#include <SDL/SDL_ttf.h> 
#include <SDL/SDL_opengl.h> 
/* 
#include <GL/gl.h> 
#include <GL/glu.h> 
*/ 
#include <math.h> 
#include <pspkernel.h> 
#include <pspdebug.h> 
#include <pspthreadman.h> 
#include <pspdisplay.h> 
#include <pspnet_inet.h> 
#include <pspnet.h> 
#include <psputility.h> 

PSP_MODULE_INFO&#40;"zOpenGL",THREAD_ATTR_USER, 3, 5&#41;; //added
//PSP_MAIN_THREAD_ATTR&#40;THREAD_ATTR_USER&#41;; 		//comented
PSP_HEAP_SIZE_KB&#40;-1024&#41;;						//added

#define printf pspDebugScreenPrintf 


/* 
  Convert a HSV color to a RGB color. 
  hsv_h must be from 0 to 360. 
  hsv_s and hsv_v must be from 0 to 100. 
  r_out, g_out and b_out will be set to a value from 0 to 255. 
*/ 
void hsv_to_rgb&#40;float hsv_h, float hsv_s, float hsv_v, 
                float *const r_out, 
                float *const g_out, 
                float *const b_out&#41; 
&#123; 
  float f, p, q, t; 
  float r = 0, g = 0, b = 0; 


  /* Convert to a number in a 0..1 range. */ 
  hsv_s /= 100; 
  hsv_v /= 100; 

  f = hsv_h/60 - floor&#40;hsv_h/60&#41;; 
  p = hsv_v * &#40;1.0 - hsv_s&#41;; 
  q = hsv_v * &#40;1.0 - f*hsv_s&#41;; 
  t = hsv_v * &#40;1.0 - &#40;1.0 - f&#41;*hsv_s&#41;; 

  switch &#40;&#40;unsigned int&#41;floor&#40;hsv_h/60&#41; % 6&#41; &#123; 
  case 0&#58; 
    r = hsv_v; g = t; b = p; 
    break; 
  case 1&#58; 
    r = q; g = hsv_v; b = p; 
    break; 
  case 2&#58; 
    r = p; g = hsv_v; b = t; 
    break; 
  case 3&#58; 
    r = p; g = q; b = hsv_v; 
    break; 
  case 4&#58; 
    r = t; g = p; b = hsv_v; 
    break; 
  case 5&#58; 
    r = hsv_v; g = p; b = q; 
    break; 
  &#125; 
  *r_out = r; 
  *g_out = g; 
  *b_out = b; 
&#125; 


void draw_win&#40;unsigned int x, unsigned int y, 
                unsigned int w, unsigned int h, 
              unsigned int hsv_h, unsigned int hsv_s_in&#41; 
&#123; 
  float r, g, b; 
  float hsv_s, hsv_s_step, hsv_v, hsv_v_step; 
  /* A hsv_s zero value position. */ 
  float const hsv_s_zp = &#40;float&#41;3/4; 
  float const white_line_w = 0.05*w; 
  float const hsv_s_dh = &#40;1.0 - hsv_s_zp&#41;*&#40;&#40;float&#41;w - white_line_w&#41;; 
  int Xi, Yi; 


  w = &#40;int&#41;&#40;&#40;float&#41;hsv_s_zp*w&#41; - white_line_w; 
  hsv_v_step = &#40;float&#41;100/powf&#40;w, 2&#41;; 
  hsv_s_step = &#40;float&#41;hsv_s_in/powf&#40;hsv_s_dh, 2&#41;; 
  w += x; 
  h += y; 

  glBegin&#40;GL_LINE_STRIP&#41;; 

  hsv_s = hsv_s_in; 
  for&#40;Xi = x, hsv_v = 0; 
    Xi < w; 
      //    Xi++, hsv_v = hsv_v_step*powf&#40;Xi - x, 2&#41;&#41; &#123; 
    Xi++, hsv_v = 100 - hsv_v_step*powf&#40;w - Xi, 2&#41;&#41; &#123; 
    if &#40; &#40;Xi - x&#41; > &#40;w - x - hsv_s_dh&#41;&#41; &#123; 
      //hsv_s = hsv_s_step*powf&#40;w - Xi, 2&#41;; 
      hsv_s = &#40;float&#41;hsv_s_in - hsv_s_step*powf&#40;Xi - &#40;w - x - hsv_s_dh&#41; - x, 2&#41;; 
    &#125; 
    hsv_to_rgb&#40;&#40;double&#41;hsv_h, hsv_s, hsv_v, &r, &g, &b&#41;; 

    glColor3f&#40;r, g, b&#41;; 

    for&#40;Yi = y; Yi < h; Yi++&#41; &#123; 
      glVertex3i&#40;Xi, Yi, 0&#41;; 
    &#125; 
  &#125; 


  w += white_line_w; 
  hsv_to_rgb&#40;&#40;double&#41;hsv_h, 0, 100, &r, &g, &b&#41;; 
  glColor3f&#40;r, g, b&#41;; 
  for&#40;; Xi < w; Xi++&#41; &#123; 
    for&#40;Yi = y; Yi < h; Yi++&#41; &#123; 
      glVertex3i&#40;Xi, Yi, 0&#41;; 
    &#125; 
  &#125; 


  hsv_s_step = &#40;float&#41;&#40;hsv_s_in*2/3&#41;/powf&#40;hsv_s_dh, 2&#41;; 
  w += hsv_s_dh; 
  for&#40;; Xi < w; Xi++&#41; &#123; 
    hsv_s = &#40;float&#41;hsv_s_in*2/3 - hsv_s_step*powf&#40;w - Xi, 2&#41;; 
    hsv_to_rgb&#40;&#40;double&#41;hsv_h, hsv_s, hsv_v, &r, &g, &b&#41;; 

    glColor3f&#40;r, g, b&#41;; 

    for&#40;Yi = y; Yi < h; Yi++&#41; &#123; 
      glVertex3i&#40;Xi, Yi, 0&#41;; 
    &#125; 
  &#125; 

  glEnd&#40;&#41;; 
&#125; 

void initgl&#40;void&#41; 
&#123; 
  glMatrixMode&#40;GL_PROJECTION&#41;; 
  glLoadIdentity&#40;&#41;; 
  glOrtho&#40;0.0, 480, 0, 272, -1, 1&#41;; 
  //glFrustum&#40;0, 480, 0, 272, 0.9999, 100.0&#41;; 


  glMatrixMode&#40;GL_MODELVIEW&#41;; 
  glLoadIdentity&#40;&#41;; 

  glViewport&#40;0, 0, 480, 272&#41;; 

  glClearColor&#40;0.0, 0.0, 0.0, 0.0&#41;; 
&#125; 

int main&#40;void&#41; //changed from SDL_main to main
&#123; 
  SDL_Surface *scrn; 
  //but_t *but1, *but2; //comented


  if &#40; SDL_Init&#40;SDL_INIT_VIDEO&#41; &#41; &#123; 
    fprintf&#40;stderr, "Error&#58; %s\n", SDL_GetError&#40;&#41;&#41;; 
    return 1; 
  &#125; 
  if &#40; TTF_Init&#40;&#41; &#41; &#123; 
    fprintf&#40;stderr, "TTF Error&#58; %s\n", TTF_GetError&#40;&#41;&#41;; 
    exit&#40;1&#41;; 
  &#125; 
  atexit&#40;SDL_Quit&#41;; 
  atexit&#40;TTF_Quit&#41;; 

  if &#40; !&#40;scrn = SDL_SetVideoMode&#40;480, 272, 32, SDL_OPENGL&#41;&#41; &#41; &#123; 
    fprintf&#40;stderr, "Set video Error&#58; %s\n", SDL_GetError&#40;&#41;&#41;; 
    return 2; 
  &#125; 

  initgl&#40;&#41;; 

  glClear&#40;GL_COLOR_BUFFER_BIT&#41;; 


  draw_win&#40;50, 100, 200 - 4, 100 - 4, 284, 92&#41;; 


  SDL_GL_SwapBuffers&#40;&#41;; 

  sceKernelSleepThreadCB&#40;&#41;; 

  return 0; 
&#125;
And the makefile:

Code: Select all

TARGET = zgl
OBJS = main.o 

PSPSDK=$&#40;shell psp-config --pspsdk-path&#41;
PSPBIN = $&#40;shell psp-config —psp-prefix&#41;/bin
CFLAGS = -O2 -G0 -Wall -g
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti 
ASFLAGS = $&#40;CFLAGS&#41; 

LIBS = -lSDL_ttf -lfreetype -lSDL_gfx -lSDL_image -ljpeg -lpng -lz -lm  -lSDL -lGL -lpspvfpu -lpsphprm -lpspaudio -lpspgu

LDFLAGS =
BUILD_PRX =1
PSP_FW_VERSION = 500
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = OpenGL
PSP_LARGE_MEMORY = 1
include $&#40;PSPSDK&#41;/lib/build.mak
"Libera eas de ore leonis, ne absorbeat eas tartarus, ne cadant in obscurum"
lego
Posts: 43
Joined: Fri Oct 17, 2008 1:09 am

Post by lego »

J.F. wrote:PSPGL uses the vfpu. Add THREAD_ATTR_VFPU to the thread attributes.
Still hangs up...
lego
Posts: 43
Joined: Fri Oct 17, 2008 1:09 am

Post by lego »

iceman755 wrote:I had to make a lot of changes to compile this, so I don't know if this is the solution for you, but it doesn't worked until I add PSP_HEAP_SIZE_KB(-1024);

I think I'm using a newer SDK than yours, in the main.c changes aren't a lot, but the makefile is completely different:
I have the latest sdk from the svn. I've updated my firmware to 5.00M33-6 and compile your code. So, psp hangs up the same way as with my code.

:-(
lego
Posts: 43
Joined: Fri Oct 17, 2008 1:09 am

Post by lego »

Some new information. Pure OpenGL programs are compiled nice.
lego
Posts: 43
Joined: Fri Oct 17, 2008 1:09 am

Post by lego »

I've tried to debug the program. This is a gdb output:

Code: Select all

&#40;gdb&#41; continue 
Continuing.
&#91;New Thread 77048945&#93;

Program received signal SIGBUS, Bus error.
&#91;Switching to Thread 77048945&#93;
__pspgl_matrix_select &#40;c=0x0, s=0x5c0&#41; at pspgl_matrix.c&#58;52
52              struct pspgl_matrix_stack *stk = c->current_matrix_stack;
&#40;gdb&#41; backtrace 
#0  __pspgl_matrix_select &#40;c=0x0, s=0x5c0&#41; at pspgl_matrix.c&#58;52
#1  0x088042f4 in initgl &#40;&#41; at ogl.c&#58;211
#2  0x08804f40 in main &#40;&#41; at ogl.c&#58;257
&#40;gdb&#41;
Will this help :-)?
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Looks like the pspgl context wasn't initialized. As far as I know SDL should do that setup if it was built properly. Are you sure it was built with pspgl support? The output of "nm /usr/local/pspdev/psp/lib/libSDL.a | grep GL" should show if it was. Also, try compiling other SDL OpenGL PSP apps that you know work, that will let you know your build system is OK.
lego
Posts: 43
Joined: Fri Oct 17, 2008 1:09 am

Post by lego »

jimparis wrote:Looks like the pspgl context wasn't initialized. As far as I know SDL should do that setup if it was built properly. Are you sure it was built with pspgl support? The output of "nm /usr/local/pspdev/psp/lib/libSDL.a | grep GL" should show if it was.

Code: Select all

~$ nm ../pspdev/psp/lib/libSDL.a | grep GL   
00000ad8 T SDL_GL_GetAttribute
00000c30 T SDL_GL_GetProcAddress
00000c94 T SDL_GL_LoadLibrary
00000088 T SDL_GL_Lock
00000b2c T SDL_GL_SetAttribute
00000aa8 T SDL_GL_SwapBuffers
00000090 T SDL_GL_Unlock
00000080 T SDL_GL_UpdateRects
00000078 T SDL_GL_UpdateRectsLock
jimparis wrote:Also, try compiling other SDL OpenGL PSP apps that you know work, that will let you know your build system is OK.
I have not such application yet :-). So, I searched this and other forums, I found several similar unresolved problems with running SDL + pspgl programs. Looks like a bug in pspgl or sdl psp port.

Thank for the reply!
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Your SDL was not built properly. You should see:

Code: Select all

00000008 T PSP_GL_GetAttribute
00000290 T PSP_GL_GetProcAddress
00000010 T PSP_GL_Init
00000248 T PSP_GL_MakeCurrent
00000238 T PSP_GL_SwapBuffers
000010f8 T SDL_GL_GetAttribute
00001250 T SDL_GL_GetProcAddress
000012b4 T SDL_GL_LoadLibrary
00000388 T SDL_GL_Lock
0000114c T SDL_GL_SetAttribute
000010c8 T SDL_GL_SwapBuffers
00000600 T SDL_GL_Unlock
00000078 T SDL_GL_UpdateRects
0000067c T SDL_GL_UpdateRectsLock
         U PSP_GL_GetAttribute
         U PSP_GL_GetProcAddress
         U PSP_GL_Init
         U PSP_GL_MakeCurrent
         U PSP_GL_SwapBuffers
Rebuild SDL and pay attention to the configure output.
lego
Posts: 43
Joined: Fri Oct 17, 2008 1:09 am

Post by lego »

jimparis wrote:Your SDL was not built properly. You should see:

Code: Select all

00000008 T PSP_GL_GetAttribute
00000290 T PSP_GL_GetProcAddress
00000010 T PSP_GL_Init
00000248 T PSP_GL_MakeCurrent
00000238 T PSP_GL_SwapBuffers
000010f8 T SDL_GL_GetAttribute
00001250 T SDL_GL_GetProcAddress
000012b4 T SDL_GL_LoadLibrary
00000388 T SDL_GL_Lock
0000114c T SDL_GL_SetAttribute
000010c8 T SDL_GL_SwapBuffers
00000600 T SDL_GL_Unlock
00000078 T SDL_GL_UpdateRects
0000067c T SDL_GL_UpdateRectsLock
         U PSP_GL_GetAttribute
         U PSP_GL_GetProcAddress
         U PSP_GL_Init
         U PSP_GL_MakeCurrent
         U PSP_GL_SwapBuffers
Rebuild SDL and pay attention to the configure output.
Thanks!

I tried to configure with --enable-video-psp option and this functions had appeared in the lib.
But this option is documented neither in the README.PSP nor in the ./configure --help output.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Post the output of the configure script here. It will tell you if it found PSPGL.
lego
Posts: 43
Joined: Fri Oct 17, 2008 1:09 am

Post by lego »

jimparis wrote:Post the output of the configure script here. It will tell you if it found PSPGL.
Sorry. Everything fine. There is no option --enable-video-psp :-). I have understood why my SDL was without PSPGL functions. First, my pspsdk was built without pspgl. After I built pspgl, I configured sdl and called make without make clean. Stupid error.

Thank you for the help!
Post Reply