Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
100 user(s) are online (69 user(s) are browsing Forums)

Members: 0
Guests: 100

more...

Headlines

Forum Index


Board index » All Posts (thellier)




CompositeTags and simple transparency problem
Not too shy to talk
Not too shy to talk


Hello

I have a very simple problem : I want to apply an uniform alpha value to a bitmap that is NOT transparent ( A=255 for all pixels)

Is it not possible ? or am I doing it wrong ?
[I am using VertexArray because the "sprite" may be flipped]

Thanks

Alain Thellier


if(DoBlend)
{

SrcA=((float)G->Blend.B.RGBA[3])/255.0;
SrcAfix=(SrcA*65536.0);
DstA=1.0-SrcA;
DstAfix=(DstA*65536.0);

CompMode=COMPOSITE_Src_Over_Dest;
flags= COMPFLAG_SrcFilter|COMPFLAG_IgnoreDestAlpha;

error = CompositeTags(CompMode,
srcbm,dstbm,
COMPTAG_VertexArray, P,
COMPTAG_VertexFormat,COMPVF_STW0_Present,
COMPTAG_NumTriangles,2,
COMPTAG_DestX,sx,
COMPTAG_DestY,sy,
COMPTAG_SrcAlpha ,SrcAfix,
COMPTAG_DestAlpha ,DstAfix,
COMPTAG_DestWidth ,slarge,
COMPTAG_DestHeight,shigh,
COMPTAG_Flags, flags ,
TAG_DONE);

}

Go to top


Re: Compositing and color modulation
Not too shy to talk
Not too shy to talk


Note3:
Also the 2x2 pixels may be different colors so used with filtering may serve to create color gradients

Alain Thellier

Go to top


Re: Game creators for SDL2
Not too shy to talk
Not too shy to talk


I am coding GMAP the Game Make Amiga Player
http://aminet.net/package/misc/emu/GMAP

When GMAP will works better it certainly will allow to program games on GameMakerStudio PC that will works on Amiga

I mean GMAP dont implement fully the GameMaker api but just the most common functions (the ones used in the Malditta Castilla game) so if you design a game that use only those functions ... it may works

For the moment I am debugging various things in GMAP but i hope to make a new working release soon
Also I have ported GMAP to Aros (yeeees... ) so it have slowed down me a few....

Alain Thellier - GMAP



Go to top


Re: Compositing and color modulation
Not too shy to talk
Not too shy to talk


As Hans wrote color modulation dont works
The only way to obtain a similar effect is to have a small bitmap (say 4*4 pixels) that you fill with your color then do a transparent CompositeTags to apply this translucent colored rectangle to the area you want to color-modulate
This may works for rectangular surface (ie highlight a button) but for a "sprite" it may be complicated to exclude the transparent parts (=it will need a buffer bitmap and one more CompositeTags )


Alain Thellier

Note: using a (say) 4*4 pixels bitmap will avoid problems with filtering "catching" surrounding (black, non existents) pixels that will happen if you use a 1x1 pixel bitmap.

Note2: I mean use a 4x4 bitmap but composite on the 2x2 inner

Go to top


Re: Detecting if a 68k prog is running on os4 ?
Not too shy to talk
Not too shy to talk


salass00 method allow me to add a fix
So case is closed

Thanks to all

Alain Thellier

Go to top


Re: Detecting if a 68k prog is running on os4 ?
Not too shy to talk
Not too shy to talk


@colinw

No no structures seems ok

Go to top


Re: Detecting if a 68k prog is running on os4 ?
Not too shy to talk
Not too shy to talk


@salass00
Thanks

>Way do you want to run less efficient 68k version on a powerpc cpu?
1) Because the GMAP users try also the os3 version and complain "os3 version dont works on os4"
2) Because I want it to be fixed and not release bugged softwares
3) Because you CAN run the os3 version...

>Trying to write apps that need to use work-arounds

In fact the problem is NOT in my code but within the PNG datatype used

I use the same
bpa.MethodID = PDTM_READPIXELARRAY;
bpa.pbpa_PixelData = T->pixels;
bpa.pbpa_PixelFormat = PBPAFMT_ARGB;
[...]
on os3 and os4
But GMAP-os3 running on OS4 dont give the RGB pixels with background color where pixels are transparent but the transparent color itself
I mean if the "sprites" are surrounded with a purple transparent color then I obtain purple not the workbench grey

This is very strange as it only happen in this case
I mean:
GMAP-os3 run well on OS3
GMAP-os4 run well on OS4

Alain Thellier




Go to top


Detecting if a 68k prog is running on os4 ?
Not too shy to talk
Not too shy to talk


Hello

I have made a program GMAP for both OS3 68k and OS4 ppc

GMAP-os3 run well on OS3
GMAP-os4 run well on OS4

but GMAP-os3 got a bug when running on OS4

I can easily fix this bug if I can detect that this 68k prog is now running on OS4....
But how to detect that ?

Alain Thellier

Go to top


Re: New stuff from the French guys
Not too shy to talk
Not too shy to talk


Perhaps this may help:

from include/interfaces/docky.h
BOOL *DockyGet(struct DockyIFace *Self, uint32 msgType, uint32 * msgData);
BOOL *DockySet(struct DockyIFace *Self, uint32 msgType, uint32 msgData);
BOOL *DockyProcess(struct DockyIFace *Self, uint32 turnCount, uint32 * msgType, uint32 * msgData, BOOL * anotherTurn);


from include/libraries/docky.h
/*
** --- Docky Init Sequence ---
**
** The following steps are the typical sequence how AmiDock opens a docky.
**
** DockyGet(DOCKYGET_Version, ...);
** DockySet(DOCKYSET_DockyFileName, ...); -> not done for an AppDocky
** DockySet(DOCKYSET_DockyAttention, ...);
** DockySet(DOCKYSET_DockyPrefs, ...);
** DockySet(DOCKYSET_Screen, ...);
** DockySet(DOCKYSET_Window, ...);
** DockySet(DOCKYSET_DockTypeChange, ...);
** DockySet(DOCKYSET_DockOrientationChange, ...);
** DockyGet(DOCKYGET_InvisibleProcess, ...);
** DockyGet(DOCKYGET_Notifications, ...);
** DockyGet(DOCKYGET_FrameDelay, ...);
** [- future expansion -]
** DockySet(DOCKYSET_DockFontChange, ...);
** DockyGet(DOCKYGET_RenderMode, ...);
** DockyGet(DOCKYGET_GetSize, ...);
** DockyGet(DOCKYSET_RenderDestination, ...);
*/

Go to top


Re: Bug in Milky-Tracker :-(
Not too shy to talk
Not too shy to talk


@Varthall

Please make available Milky-Tracker sources (especially Amiga changes & makefile) if you dont have time to code it anymore

Thanks Thanks Thanks

Alain Thellier

Go to top


Re: Descent Freespace is no longer compatible with the latest Radeon, Warp3D, minigl and AOS4.1FE
Not too shy to talk
Not too shy to talk


Warp3D V5.x from OS4.x is not truly compatible with Warp3D V4.x from OS3.x
So 3D stuff made before Warp3D V5 may have problems

Have you tried this:
http://aminet.net/package/driver/video/PatchWarp3D

Alain Thellier

Go to top


Re: Microbe3D - two instances on OS4Depot
Not too shy to talk
Not too shy to talk


Hello

I agree with samo79 : "uploader" is very helpfull
This is only a small error : In fact the small archive was
the old early demo and the big archive is the latest full package with .library,include,sources,objects,etc..
The only thing that is truly misleading is to give them the same name


Alain Thellier - Microbe3D

Go to top


Re: Optimize SDL blitting routine
Not too shy to talk
Not too shy to talk


Hello

Abbaye des morts for Linux use SDL
https://code.google.com/p/abbaye-for-linux/

But dont release it for Amiga as it already exists as pure Amiga port

Alain

Go to top


Reading "double" values from an Intel file
Not too shy to talk
Not too shy to talk


Hello

I am having some trouble to read a file coming from an PC application (so a binary with Intel ordering)
Some data are stored as "double" 64 bits but they dont seems to be the same as "double" in Motorola world

I have tested several byte-ordering without success ...
Any example code for converting that ??

Alain Thellier

Go to top


Using OggVorbis in programs ?
Not too shy to talk
Not too shy to talk


Hello

I am trying to port a game
This game use .wav and oggvorbis for musics

So what is the better way to implement oggvorbis support ? (both OS3 & OS4)

Currently I am using oggdec for converting oggvorbis as a supported format (=slow)

Alain Thellier

Go to top


Re: Optimize SDL blitting routine
Not too shy to talk
Not too shy to talk


Hello

I agree "Abbaye des morts" currently dont use SDL at all
SDL calls in original sources have been replaced with AmigaOS equivalent for the Amiga port
So there is now a function for drawing rectangular "sprite" that works the same ways as SDL but use CompositeTags
>uses the vertex mode of CompositeTags()
Yes but that is not a problem as it used to draw a rectangular "sprite" but let you the freedom to rotate/resize it if needed (like CompositePoc)

Alain Thellier


Go to top


Re: Screen rotation
Not too shy to talk
Not too shy to talk


>using compositing to rotate the data.

Something like that ?
http://aminet.net/package/dev/src/CloneWindow

Go to top


Re: What parts of AmigaOS4 graphics are hardware accelerated?
Not too shy to talk
Not too shy to talk


@Hans

Hello
>you can use DoHookClipRects() with CompositeTags()
very interesting : do you have a piece of code that show how to do that ?

BTW Are there other OS functions (I mean not CompositeTags()) that can do a simple draw draw with alpha ? (I mean alpha 0 is transp / other solid)

Thanks

Alain Thellier

Go to top


Re: My MiniGL experiments,recompilation,tips,etc...
Not too shy to talk
Not too shy to talk


@shadowsun
@all

Please do not use the minigl.library that I have build:
It is not faster with Quake even slower
It got some bugs that I introduced with the modifications I made (lines and others stuff in Glexcess..)

My sources and binary are only given as an example of "a modification that may have accelerated minigl but that didnt"

Alain Thellier





Go to top


Re: My MiniGL experiments,recompilation,tips,etc...
Not too shy to talk
Not too shy to talk


In fact I have only studied/modified hclip.c light.c texture.c and especially draw.c

>Is there any part that can optimized by using AltiVec?
Yes but Altivec code is already here
>Is there any complex switches can be replaced table lookups?
Not in the parts I looked
>Is there any loops that can be unrolled?
Already compiled -O3 so pointless (unrolling )
>Is there any useless memory copy operations?
I think no
>Is there any unneeded indirect table lookups.
I think no
>Is there any code that can use macros instead of functions (less braches).
Already compiled -O3 so pointless (inlining)
>Is there any dynamic list that can be replaced by static arrays, normally faster to loop entries when you do not need to step into the list.
Not in the parts I looked
>Is there any integers, that can be replaced by unsigned integers, unsigned integers should be faster I read somewhere.
? dont know
>Is there any malloc() / free(), that are called too often, maybe there is way's workaround it.
Definitely no
>Data being uneasily being copied as parameters, when they can be global, parameter passing does generate extra store operations.
I think not
>Are there any sort operations that can be made faster.
That is the problem
In fact several operations are not optimal but not used often.

Alain Thellier




Go to top



TopTop
« 1 ... 4 5 6 (7) 8 9 10 ... 14 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project