Corrected gdk_draw_bitmap thing.

Corrected wrong libGL.so dependence of libwx_gtk.so.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2000-06-05 16:13:53 +00:00
parent 09efdbdbdd
commit 758ac86c09
10 changed files with 48 additions and 22 deletions

11
configure vendored
View File

@@ -12455,7 +12455,7 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
OPENGL_LINK="-lGL"
OPENGL_LINK="-lGL -lGLU"
else
echo "$ac_t""no" 1>&6
@@ -12496,7 +12496,7 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
OPENGL_LINK="-lMesaGL"
OPENGL_LINK="-lMesaGL -lMesaGLU"
else
echo "$ac_t""no" 1>&6
@@ -14331,7 +14331,8 @@ EOF
GUILIBS="$GUI_TK_LIBRARY $OPENGL_LINK $TOOLKIT_LINK"
GUILIBS="$GUI_TK_LIBRARY $TOOLKIT_LINK"
OPENGL_LIBS="$OPENGL_LINK"
EXTRA_LIBS="$LIBS $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK $ZLIB_LINK -lm"
if test "$wxUSE_GUI" = "yes"; then
@@ -14454,10 +14455,11 @@ SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:14461: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:14463: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -14745,6 +14747,7 @@ s%@DOCS_SUBDIRS@%$DOCS_SUBDIRS%g
s%@SAMPLES_SUBDIRS@%$SAMPLES_SUBDIRS%g
s%@USER_SUBDIRS@%$USER_SUBDIRS%g
s%@EXTRA_LIBS@%$EXTRA_LIBS%g
s%@OPENGL_LIBS@%$OPENGL_LIBS%g
s%@EXTRADEFS@%$EXTRADEFS%g
s%@LD_LIBS@%$LD_LIBS%g
s%@RCINPUTSWITCH@%$RCINPUTSWITCH%g

View File

@@ -2841,10 +2841,10 @@ if test "$wxUSE_OPENGL" = "yes"; then
AC_DEFINE(wxUSE_OPENGL)
AC_DEFINE(wxUSE_GLCANVAS)
AC_CHECK_LIB(GL, glFlush, [
OPENGL_LINK="-lGL"
OPENGL_LINK="-lGL -lGLU"
],[
AC_CHECK_LIB(MesaGL, glFlush, [
OPENGL_LINK="-lMesaGL"
OPENGL_LINK="-lMesaGL -lMesaGLU"
],)
],)
],wxUSE_OPENGL=0)
@@ -3704,7 +3704,8 @@ dnl ---------------------------------------------------------------------------
dnl Output the makefiles and such from the results found above
dnl ---------------------------------------------------------------------------
GUILIBS="$GUI_TK_LIBRARY $OPENGL_LINK $TOOLKIT_LINK"
GUILIBS="$GUI_TK_LIBRARY $TOOLKIT_LINK"
OPENGL_LIBS="$OPENGL_LINK"
dnl all additional libraries (except wxWindows itself) we link with
dnl
@@ -3846,6 +3847,7 @@ AC_SUBST(USER_SUBDIRS)
dnl additional libraries and linker settings
AC_SUBST(LDFLAGS)
AC_SUBST(EXTRA_LIBS)
AC_SUBST(OPENGL_LIBS)
AC_SUBST(EXTRADEFS)
AC_SUBST(LIBS)
AC_SUBST(LD_LIBS)

View File

@@ -15,7 +15,7 @@ program_dir = samples/opengl/cube
PROGRAM=cube
LIBRARIES=-lMesaGL -lMesaGLU ../../../lib/libwx_gtk_gl.so
LIBRARIES=$(OPENGLLIBS) ../../../lib/libwx_gtk_gl.so
OBJECTS=$(PROGRAM).o

View File

@@ -17,7 +17,7 @@ DATAFILES = isosurf.dat.gz
PROGRAM=isosurf
LIBRARIES=-lMesaGL -lMesaGLU ../../../lib/libwx_gtk_gl.so
LIBRARIES=$(OPENGLLIBS) ../../../lib/libwx_gtk_gl.so
OBJECTS=$(PROGRAM).o

View File

@@ -17,7 +17,7 @@ DATAFILES = penguin.lwo
PROGRAM=penguin
LIBRARIES=-lMesaGL -lMesaGLU ../../../lib/libwx_gtk_gl.so
LIBRARIES=$(OPENGLLIBS) ../../../lib/libwx_gtk_gl.so
OBJECTS=$(PROGRAM).o lw.o trackball.o

View File

@@ -20,6 +20,16 @@
#include <gdk/gdk.h>
#include <gtk/gtk.h>
extern void gdk_wx_draw_bitmap (GdkDrawable *drawable,
GdkGC *gc,
GdkDrawable *src,
gint xsrc,
gint ysrc,
gint xdest,
gint ydest,
gint width,
gint height);
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
@@ -180,7 +190,7 @@ bool wxMask::Create( const wxBitmap& bitmap )
GdkGC *gc = gdk_gc_new( m_bitmap );
gdk_draw_bitmap( m_bitmap, gc, bitmap.GetBitmap(), 0, 0, 0, 0, bitmap.GetWidth(), bitmap.GetHeight() );
gdk_wx_draw_bitmap( m_bitmap, gc, bitmap.GetBitmap(), 0, 0, 0, 0, bitmap.GetWidth(), bitmap.GetHeight() );
gdk_gc_unref( gc );
@@ -422,7 +432,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
else
{
GdkGC *gc = gdk_gc_new( ret.GetBitmap() );
gdk_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height );
gdk_wx_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height );
gdk_gc_destroy( gc );
}
@@ -432,7 +442,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
mask->m_bitmap = gdk_pixmap_new( wxRootWindow->window, rect.width, rect.height, 1 );
GdkGC *gc = gdk_gc_new( mask->m_bitmap );
gdk_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, 0, 0, rect.x, rect.y, rect.width, rect.height );
gdk_wx_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, 0, 0, rect.x, rect.y, rect.width, rect.height );
gdk_gc_destroy( gc );
ret.SetMask( mask );

View File

@@ -68,7 +68,7 @@ static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; }
#include "gdk/gdkprivate.h"
void gdk_draw_bitmap (GdkDrawable *drawable,
void gdk_wx_draw_bitmap (GdkDrawable *drawable,
GdkGC *gc,
GdkDrawable *src,
gint xsrc,
@@ -912,7 +912,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
/* Draw XPixmap or XBitmap, depending on what the wxBitmap contains. For
drawing a mono-bitmap (XBitmap) we use the current text GC */
if (is_mono)
gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), 0, 0, xx, yy, -1, -1 );
gdk_wx_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), 0, 0, xx, yy, -1, -1 );
else
gdk_draw_pixmap( m_window, m_penGC, use_bitmap.GetPixmap(), 0, 0, xx, yy, -1, -1 );
@@ -1098,7 +1098,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he
drawing a mono-bitmap (XBitmap) we use the current text GC */
if (is_mono)
gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh );
gdk_wx_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh );
else
gdk_draw_pixmap( m_window, m_penGC, use_bitmap.GetPixmap(), xsrc, ysrc, xx, yy, ww, hh );

View File

@@ -20,6 +20,16 @@
#include <gdk/gdk.h>
#include <gtk/gtk.h>
extern void gdk_wx_draw_bitmap (GdkDrawable *drawable,
GdkGC *gc,
GdkDrawable *src,
gint xsrc,
gint ysrc,
gint xdest,
gint ydest,
gint width,
gint height);
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
@@ -180,7 +190,7 @@ bool wxMask::Create( const wxBitmap& bitmap )
GdkGC *gc = gdk_gc_new( m_bitmap );
gdk_draw_bitmap( m_bitmap, gc, bitmap.GetBitmap(), 0, 0, 0, 0, bitmap.GetWidth(), bitmap.GetHeight() );
gdk_wx_draw_bitmap( m_bitmap, gc, bitmap.GetBitmap(), 0, 0, 0, 0, bitmap.GetWidth(), bitmap.GetHeight() );
gdk_gc_unref( gc );
@@ -422,7 +432,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
else
{
GdkGC *gc = gdk_gc_new( ret.GetBitmap() );
gdk_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height );
gdk_wx_draw_bitmap( ret.GetBitmap(), gc, GetBitmap(), rect.x, rect.y, 0, 0, rect.width, rect.height );
gdk_gc_destroy( gc );
}
@@ -432,7 +442,7 @@ wxBitmap wxBitmap::GetSubBitmap( const wxRect& rect) const
mask->m_bitmap = gdk_pixmap_new( wxRootWindow->window, rect.width, rect.height, 1 );
GdkGC *gc = gdk_gc_new( mask->m_bitmap );
gdk_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, 0, 0, rect.x, rect.y, rect.width, rect.height );
gdk_wx_draw_bitmap( mask->m_bitmap, gc, M_BMPDATA->m_mask->m_bitmap, 0, 0, rect.x, rect.y, rect.width, rect.height );
gdk_gc_destroy( gc );
ret.SetMask( mask );

View File

@@ -68,7 +68,7 @@ static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; }
#include "gdk/gdkprivate.h"
void gdk_draw_bitmap (GdkDrawable *drawable,
void gdk_wx_draw_bitmap (GdkDrawable *drawable,
GdkGC *gc,
GdkDrawable *src,
gint xsrc,
@@ -912,7 +912,7 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
/* Draw XPixmap or XBitmap, depending on what the wxBitmap contains. For
drawing a mono-bitmap (XBitmap) we use the current text GC */
if (is_mono)
gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), 0, 0, xx, yy, -1, -1 );
gdk_wx_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), 0, 0, xx, yy, -1, -1 );
else
gdk_draw_pixmap( m_window, m_penGC, use_bitmap.GetPixmap(), 0, 0, xx, yy, -1, -1 );
@@ -1098,7 +1098,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he
drawing a mono-bitmap (XBitmap) we use the current text GC */
if (is_mono)
gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh );
gdk_wx_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh );
else
gdk_draw_pixmap( m_window, m_penGC, use_bitmap.GetPixmap(), xsrc, ysrc, xx, yy, ww, hh );

View File

@@ -12,6 +12,7 @@
# see comment near LDFLAGS at the end of file
EXTRALIBS = @LDFLAGS@ @EXTRA_LIBS@
OPENGLLIBS = @OPENGL_LIBS@
LDLIBS = $(APPEXTRALIBS) ${top_builddir}/lib/@WX_TARGET_LIBRARY@ $(EXTRALIBS)
TOOLKIT = @TOOLKIT@