SDL_ttf & pspgl

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

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
sherpya
Posts: 61
Joined: Mon Oct 03, 2005 5:49 pm

SDL_ttf & pspgl

Post by sherpya »

Since pspgl doesn't supports all of opengl api, sdl_ttf configure incorrectly detects opengl support but compilation fails since pspsgl misses some function.
This patch solves the problem, and it will activate GL support in SDL_ttf when pspgl will implement these functions:

Code: Select all

Index: configure.in
===================================================================
--- configure.in        (revision 1425)
+++ configure.in        (working copy)
@@ -139,7 +139,7 @@
         ;;
     *-psp-*)
         MATHLIB="-lm"
-        SYS_GL_LIBS=""
+        SYS_GL_LIBS="-lGL -lpsprtc"
         ;;
     *)
         MATHLIB="-lm"
@@ -153,16 +153,9 @@
         fi
         ;;
 esac
-AC_MSG_CHECKING(for OpenGL support)
+
 have_opengl=no
-AC_TRY_COMPILE([
- #include "SDL_opengl.h"
-],[
- GLuint texture;
-],[
-have_opengl=yes
-])
-AC_MSG_RESULT($have_opengl)
+AC_CHECK_LIB(GL, [glPushAttrib, glPopAttrib, glColor3fv], [have_opengl=yes])
 if test x$have_opengl = xyes; then
     CFLAGS="$CFLAGS -DHAVE_OPENGL"
     GL_LIBS="$SYS_GL_LIBS"
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Re: Yes!

Post by jimparis »

fowl416 wrote:I could not agree with you more.
This was fixed in r1514. Give details if you're still having problems.
http://svn.ps2dev.org/log.php?repname=p ... %2FSDL_ttf
jsgf
Posts: 254
Joined: Tue Jul 12, 2005 11:02 am
Contact:

Re: SDL_ttf & pspgl

Post by jsgf »

sherpya wrote:

Code: Select all

+AC_CHECK_LIB(GL, [glPushAttrib, glPopAttrib, glColor3fv], [have_opengl=yes])
I'm implementing glPush/PopAttrib at the moment, and glColor3fv should be trivial.
User avatar
sherpya
Posts: 61
Joined: Mon Oct 03, 2005 5:49 pm

Post by sherpya »

yes it works, it would be nice to add a switch to disable opengl at all
Post Reply