Compare commits
2 Commits
9ae0d23561
...
1ea55036a3
Author | SHA1 | Date |
---|---|---|
George Sokianos | 1ea55036a3 | |
George Sokianos | c020f3b426 |
|
@ -0,0 +1 @@
|
||||||
|
*.o
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
CXX = g++
|
CXX = g++
|
||||||
CXXFLAGS = -mcrt=clib2 -O3 -Iinclude -Igpc -Ifont_freetype
|
CXXFLAGS = -mcrt=clib2 -O3 -Iinclude -Igpc -Ifont_freetype
|
||||||
CXXLIBS = -Llib -lagg
|
CXXLIBS = -Llib -lagg -athread=native
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -mcrt=clib2 -O3 -Igpc
|
CFLAGS = -mcrt=clib2 -O3 -Igpc
|
||||||
AR = ar
|
AR = ar
|
||||||
|
@ -170,7 +170,9 @@ freetype: lib $(FREETYPE_EXAMPLES)
|
||||||
clean:
|
clean:
|
||||||
-@Delete *>NIL: FORCE QUIET examples/#?.o
|
-@Delete *>NIL: FORCE QUIET examples/#?.o
|
||||||
-@Delete *>NIL: FORCE QUIET $(PLATFORM_OBJ) $(FREETYPE_OBJ) $(LIB_OBJ) $(SVG_OBJ)
|
-@Delete *>NIL: FORCE QUIET $(PLATFORM_OBJ) $(FREETYPE_OBJ) $(LIB_OBJ) $(SVG_OBJ)
|
||||||
|
-@copy CLONE ALL bin/#?.cmake#? T:agg_tmp
|
||||||
-@Delete *>NIL: FORCE QUIET ALL lib bin
|
-@Delete *>NIL: FORCE QUIET ALL lib bin
|
||||||
|
-@copy CLONE T:agg_tmp/#? bin
|
||||||
|
|
||||||
install: lib
|
install: lib
|
||||||
-@Copy CLONE $(LIBNAME) SDK:Local/clib2/lib
|
-@Copy CLONE $(LIBNAME) SDK:Local/clib2/lib
|
||||||
|
|
|
@ -171,7 +171,9 @@ freetype: lib $(FREETYPE_EXAMPLES)
|
||||||
clean:
|
clean:
|
||||||
-@Delete *>NIL: FORCE QUIET examples/#?.o
|
-@Delete *>NIL: FORCE QUIET examples/#?.o
|
||||||
-@Delete *>NIL: FORCE QUIET $(PLATFORM_OBJ) $(FREETYPE_OBJ) $(LIB_OBJ) $(SVG_OBJ)
|
-@Delete *>NIL: FORCE QUIET $(PLATFORM_OBJ) $(FREETYPE_OBJ) $(LIB_OBJ) $(SVG_OBJ)
|
||||||
|
-@copy CLONE ALL bin/#?.cmake#? T:agg_tmp
|
||||||
-@Delete *>NIL: FORCE QUIET ALL lib bin
|
-@Delete *>NIL: FORCE QUIET ALL lib bin
|
||||||
|
-@copy CLONE T:agg_tmp/#? bin
|
||||||
|
|
||||||
install: lib
|
install: lib
|
||||||
-@Copy CLONE $(LIBNAME) SDK:Local/newlib/lib
|
-@Copy CLONE $(LIBNAME) SDK:Local/newlib/lib
|
||||||
|
|
|
@ -49,6 +49,10 @@ KeymapIFace* IKeymap = 0;
|
||||||
Class* RequesterClass = 0;
|
Class* RequesterClass = 0;
|
||||||
Class* WindowClass = 0;
|
Class* WindowClass = 0;
|
||||||
|
|
||||||
|
struct RenderInfo {
|
||||||
|
APTR Memory;
|
||||||
|
UWORD BytesPerRow;
|
||||||
|
};
|
||||||
|
|
||||||
namespace agg
|
namespace agg
|
||||||
{
|
{
|
||||||
|
@ -68,7 +72,7 @@ namespace agg
|
||||||
bool make_bitmap();
|
bool make_bitmap();
|
||||||
public:
|
public:
|
||||||
platform_support& m_support;
|
platform_support& m_support;
|
||||||
RGBFTYPE m_ftype;
|
enPixelFormat m_ftype;
|
||||||
pix_format_e m_format;
|
pix_format_e m_format;
|
||||||
unsigned m_bpp;
|
unsigned m_bpp;
|
||||||
BitMap* m_bitmap;
|
BitMap* m_bitmap;
|
||||||
|
@ -89,7 +93,7 @@ namespace agg
|
||||||
platform_specific::platform_specific(platform_support& support,
|
platform_specific::platform_specific(platform_support& support,
|
||||||
pix_format_e format, bool flip_y) :
|
pix_format_e format, bool flip_y) :
|
||||||
m_support(support),
|
m_support(support),
|
||||||
m_ftype(RGBFB_NONE),
|
m_ftype(PIXF_NONE),
|
||||||
m_format(format),
|
m_format(format),
|
||||||
m_bpp(0),
|
m_bpp(0),
|
||||||
m_bitmap(0),
|
m_bitmap(0),
|
||||||
|
@ -110,35 +114,35 @@ namespace agg
|
||||||
// Not supported.
|
// Not supported.
|
||||||
break;
|
break;
|
||||||
case pix_format_rgb555:
|
case pix_format_rgb555:
|
||||||
m_ftype = RGBFB_R5G5B5;
|
m_ftype = PIXF_R5G5B5;
|
||||||
m_bpp = 15;
|
m_bpp = 15;
|
||||||
break;
|
break;
|
||||||
case pix_format_rgb565:
|
case pix_format_rgb565:
|
||||||
m_ftype = RGBFB_R5G6B5;
|
m_ftype = PIXF_R5G6B5;
|
||||||
m_bpp = 16;
|
m_bpp = 16;
|
||||||
break;
|
break;
|
||||||
case pix_format_rgb24:
|
case pix_format_rgb24:
|
||||||
m_ftype = RGBFB_R8G8B8;
|
m_ftype = PIXF_R8G8B8;
|
||||||
m_bpp = 24;
|
m_bpp = 24;
|
||||||
break;
|
break;
|
||||||
case pix_format_bgr24:
|
case pix_format_bgr24:
|
||||||
m_ftype = RGBFB_B8G8R8;
|
m_ftype = PIXF_B8G8R8;
|
||||||
m_bpp = 24;
|
m_bpp = 24;
|
||||||
break;
|
break;
|
||||||
case pix_format_bgra32:
|
case pix_format_bgra32:
|
||||||
m_ftype = RGBFB_B8G8R8A8;
|
m_ftype = PIXF_B8G8R8A8;
|
||||||
m_bpp = 32;
|
m_bpp = 32;
|
||||||
break;
|
break;
|
||||||
case pix_format_abgr32:
|
case pix_format_abgr32:
|
||||||
m_ftype = RGBFB_A8B8G8R8;
|
m_ftype = PIXF_A8B8G8R8;
|
||||||
m_bpp = 32;
|
m_bpp = 32;
|
||||||
break;
|
break;
|
||||||
case pix_format_argb32:
|
case pix_format_argb32:
|
||||||
m_ftype = RGBFB_A8R8G8B8;
|
m_ftype = PIXF_A8R8G8B8;
|
||||||
m_bpp = 32;
|
m_bpp = 32;
|
||||||
break;
|
break;
|
||||||
case pix_format_rgba32:
|
case pix_format_rgba32:
|
||||||
m_ftype = RGBFB_R8G8B8A8;
|
m_ftype = PIXF_R8G8B8A8;
|
||||||
m_bpp = 32;
|
m_bpp = 32;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -236,12 +240,12 @@ namespace agg
|
||||||
|
|
||||||
bool supported = false;
|
bool supported = false;
|
||||||
|
|
||||||
RGBFTYPE ftype = static_cast<RGBFTYPE>(IGraphics->GetBitMapAttr(
|
enPixelFormat ftype = static_cast<enPixelFormat>(IGraphics->GetBitMapAttr(
|
||||||
src_bitmap, BMA_PIXELFORMAT));
|
src_bitmap, BMA_PIXELFORMAT));
|
||||||
|
|
||||||
switch ( ftype )
|
switch ( ftype )
|
||||||
{
|
{
|
||||||
case RGBFB_R8G8B8:
|
case PIXF_R8G8B8:
|
||||||
supported = true;
|
supported = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -492,7 +496,7 @@ namespace agg
|
||||||
bool platform_support::init(unsigned width, unsigned height,
|
bool platform_support::init(unsigned width, unsigned height,
|
||||||
unsigned flags)
|
unsigned flags)
|
||||||
{
|
{
|
||||||
if( m_specific->m_ftype == RGBFB_NONE )
|
if( m_specific->m_ftype == PIXF_NONE )
|
||||||
{
|
{
|
||||||
message("Unsupported mode requested.");
|
message("Unsupported mode requested.");
|
||||||
return false;
|
return false;
|
||||||
|
@ -551,14 +555,14 @@ namespace agg
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
RGBFTYPE ftype = static_cast<RGBFTYPE>(IGraphics->GetBitMapAttr(
|
enPixelFormat ftype = static_cast<enPixelFormat>(IGraphics->GetBitMapAttr(
|
||||||
m_specific->m_window->RPort->BitMap, BMA_PIXELFORMAT));
|
m_specific->m_window->RPort->BitMap, BMA_PIXELFORMAT));
|
||||||
|
|
||||||
switch ( ftype )
|
switch ( ftype )
|
||||||
{
|
{
|
||||||
case RGBFB_A8R8G8B8:
|
case PIXF_A8R8G8B8:
|
||||||
case RGBFB_B8G8R8A8:
|
case PIXF_B8G8R8A8:
|
||||||
case RGBFB_R5G6B5PC:
|
case PIXF_R5G6B5PC:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
message("Unsupported screen mode.\n");
|
message("Unsupported screen mode.\n");
|
||||||
|
|
Loading…
Reference in New Issue