endianess chekc for texture gneration


			
			
				devs/devilhorns/wayland_egl
			
			
		
Carsten Haitzler 23 years ago
parent aaf7e4ffb9
commit 5c0c1289d6
  1. 1
      legacy/evas/configure.in
  2. 8
      legacy/evas/src/Makefile.am
  3. 8
      legacy/evas/src/evas_gl_routines.c
  4. 2
      legacy/evas/test/Makefile.am

@ -1,6 +1,7 @@
AC_INIT(src/Evas.h)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(evas, 0.0.1)
AC_C_BIGENDIAN
AC_PROG_CC
AM_PROG_CC_STDC
AM_WITH_DMALLOC

@ -7,18 +7,18 @@ MAINTAINERCLEANFILES = Makefile.in
LIBS_X = @x_ldflags@ @x_libs@
LIBS_IMLIB2 = -lImlib2 -lttf -ldl -lm
LIBS_DB = -ledb
#LIBS_DB = -ledb
LIBS_GL = -lGLU -lGL
LIBS_EXTRA = -L/usr/local/lib
CFLAGS_X = @x_cflags@
CFLAGS_IMLIB2 =
CFLAGS_DB =
#CFLAGS_DB =
CFLAGS_GL = @gl_includes@
CFLAGS_EXTRA = -I$(includedir) -I$(top_srcdir) -I/usr/local/include
LIBS_ALL = $(LIBS_X) $(LIBS_IMLIB2) $(LIBS_DB) $(LIBS_GL) $(LIBS_EXTRA)
CFLGAS_ALL = $(CFLAGS_X) $(CFLAGS_IMLIB2) $(CFLAGS_DB) $(CFLAGS_GL) $(CFLAGS_EXTRA)
LIBS_ALL = $(LIBS_X) $(LIBS_IMLIB2) $(LIBS_GL) $(LIBS_EXTRA)
CFLGAS_ALL = $(CFLAGS_X) $(CFLAGS_IMLIB2) $(CFLAGS_GL) $(CFLAGS_EXTRA)
INCLUDES = $(CFLGAS_ALL) \
-DLIBDIR=\"$(libdir)\" \

@ -128,11 +128,19 @@ __evas_gl_image_copy_image_rect_to_texture(Evas_GL_Image *im, int x, int y,
p2 = data + (ty * tw);
for (tx = 0; tx < w; tx++)
{
#ifndef WORDS_BIGENDIAN
*p2 =
((*p1 & 0xff000000)) |
((*p1 & 0x00ff0000) >> 16) |
((*p1 & 0x0000ff00)) |
((*p1 & 0x000000ff) << 16);
#else
*p2 =
((*p1 & 0xff000000) >> 24) |
((*p1 & 0x00ff0000) << 8) |
((*p1 & 0x0000ff00) << 8) |
((*p1 & 0x000000ff) << 8);
#endif
p2++; p1++;
}
if (tx < tw)

@ -1,7 +1,7 @@
CFLAGS_X = @x_cflags@
CFLAGS_EXTRA = -I$(includedir) -I$(top_srcdir) -I$(top_srcdir)/src -I/usr/local/include
CFLGAS_ALL = $(CFLAGS_X) $(CFLAGS_IMLIB2) $(CFLAGS_DB) $(CFLAGS_GL) $(CFLAGS_EXTRA)
CFLGAS_ALL = $(CFLAGS_X) $(CFLAGS_EXTRA)
INCLUDES = $(CFLGAS_ALL)

Loading…
Cancel
Save