All pastes #53704 Raw Edit

Someone

public text v1 · immutable
#53704 ·published 2006-05-05 09:59 UTC
rendered paste body
Hi.
Some time ago I spoke with you and you suggested me docementing fucntion glBlendFunc.
I have done some RTFM :) And here are my questions I hope you will read this mail till the very and
and answer them :). You said, that first I have to draw a triangle. Is this way correct:

glColor3f(1.0f, 0.0f, 0.0f);

	glBegin(GL_TRIANGLES);

	glVertex3f(-1.0f, -0.5f, -4.0f);    // A
	glVertex3f( 1.0f, -0.5f, -4.0f);    // B
	glVertex3f( 0.0f,  0.5f, -4.0f);    // C

	glEnd();

affter this I have to do
              glBegin(GL_BLEND);
              glBlendFucn(somethingh,something);
              glEnd();
              dump_after();
Here is the list of valid parametters I have found about glBlendFunc:
C SPECIFICATION

void glBlendFunc(GLenum sfactor,

                 GLenum dfactor)

PARAMETERS

sfactor
    Specifies how the red, green, blue and alpha source blending factors are computed. Nine symbolic constants are accepted: GL_ZERO, GL_ONE, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_COLOR, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, and GL_SRC_ALPHA_SATURATE.

dfactor
    Specifies how the red, green, blue and alpha destination blending factors are computed. Eight symbolic constants are accepted: GL_ZERO, GL_ONE, GL_SCR_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_COLOR, GL_DST_ALPHA, and GL_ONE_MINUS_DST_ALPHA. 

If I am correct I just have to add it in correct place to "renewal" code and RE in which registers they are represented and in what way :D I hope you will tell where have I made mistakes and give me a few pieces of advices :)

Regards. Michael Majchrowicz.


Odpowiedz	Przekaż
	
		
		
Stephane Marchesin 	
do mnie
	 Więcej opcji	  29.04 (6 dni temu)
Michał Majchrowicz wrote:
> Hi.
- Wyświetl cytowany tekst -
Hi,

> Some time ago I spoke with you and you suggested me docementing
> fucntion glBlendFunc.
> I have done some RTFM :) And here are my questions I hope you will
> read this mail till the very and
> and answer them :). You said, that first I have to draw a triangle. Is
> this way correct:
> glColor3f(1.0f, 0.0f, 0.0f);
>
>       glBegin(GL_TRIANGLES);
>
>       glVertex3f(-1.0f, -0.5f, -4.0f);    // A
>       glVertex3f( 1.0f, -0.5f, -4.0f);    // B
>       glVertex3f( 0.0f,  0.5f, -4.0f);    // C
>
>       glEnd();
>
> affter this I have to do
> *              *glBegin(*GL_BLEND);
>               *glBlendFucn(somethingh,something);
> *              *glEnd();
>               dump_after();
> Here is the list of valid parametters I have found about glBlendFunc:
>
>
>       C SPECIFICATION
>
> void *glBlendFunc*(GLenum /sfactor/,
>
>                  GLenum /dfactor/)
>
>
>
>       PARAMETERS
>
> /sfactor/
>     Specifies how the red, green, blue and alpha source blending
>     factors are computed. Nine symbolic constants are accepted:
>     *GL_ZERO*, *GL_ONE*, *GL_DST_COLOR*, *GL_ONE_MINUS_DST_COLOR*,
>     *GL_SRC_ALPHA*, *GL_ONE_MINUS_SRC_COLOR*, *GL_DST_ALPHA*,
>     *GL_ONE_MINUS_DST_ALPHA*, and *GL_SRC_ALPHA_SATURATE*.
>
> /dfactor/
>     Specifies how the red, green, blue and alpha destination blending
>     factors are computed. Eight symbolic constants are accepted:
>     *GL_ZERO*, *GL_ONE*, *GL_SCR_COLOR*, *GL_ONE_MINUS_SRC_COLOR*,
>     *GL_SRC_ALPHA*, *GL_ONE_MINUS_SRC_COLOR*, *GL_DST_ALPHA*, and
>     *GL_ONE_MINUS_DST_ALPHA*.
>
> If I am correct I just have to add it in correct place to "renewal"
> code and RE in which registers they are represented and in what way :D
> I hope you will tell where have I made mistakes and give me a few
> pieces of advices :)
>
Yes, you have to put these values as glBlendFunc parameters. Howerver,
each change must be validated by drawing a triangle. So you need
something like :

**               dump_before();
*              *glBlendFunc(somethingh,something);

       glBegin(GL_TRIANGLES);

       glVertex3f(-1.0f, -0.5f, -4.0f);    // A
       glVertex3f( 1.0f, -0.5f, -4.0f);    // B
       glVertex3f( 0.0f,  0.5f, -4.0f);    // C

*              *glEnd();
             dump_after();

Stephane



Odpowiedz	Przekaż	Zaproś Stephane do korzystania z Gmaila
	
		
		
Michał Majchrowicz 	
do Stephane
	 Więcej opcji	  29.04 (6 dni temu)
Ido dump_before after glBegin(GL_BLEND);
or before? Since I suppose the whole part should be:
*glBegin(*GL_BLEND);
>               *glBlendFucn(somethingh,something);
> *              *glEnd();
Sorry for aksing(even im oppinion :)) so many lame question, but, since it is my first time, I wan to be sure, that I do everything correct :)
Regards.

2006/4/29, Stephane Marchesin <marchesin@icps.u-strasbg.fr>:
- Wy&#347;wietl cytowany tekst -

    Micha&#322; Majchrowicz wrote:
    > Hi.
    Hi,

    > Some time ago I spoke with you and you suggested me docementing
    > fucntion glBlendFunc.
    > I have done some RTFM :) And here are my questions I hope you will
    > read this mail till the very and
    > and answer them :). You said, that first I have to draw a triangle. Is
    > this way correct:
    > glColor3f(1.0f, 0.0f, 0.0f);
    >
    >       glBegin(GL_TRIANGLES);
    >
    >       glVertex3f(-1.0f, -0.5f, -4.0f);    // A
    >       glVertex3f( 1.0f, -0.5f, -4.0f);    // B
    >       glVertex3f( 0.0f,  0.5f, -4.0f);    // C
    >
    >       glEnd();
    >
    > affter this I have to do
    > *              *glBegin(*GL_BLEND);
    >               *glBlendFucn(somethingh,something);
    > *              *glEnd();
    >               dump_after();
    > Here is the list of valid parametters I have found about glBlendFunc:
    >
    >
    >       C SPECIFICATION
    >
    > void *glBlendFunc*(GLenum /sfactor/,
    >
    >                  GLenum /dfactor/)
    >
    >
    >
    >       PARAMETERS
    >
    > /sfactor/
    >     Specifies how the red, green, blue and alpha source blending
    >     factors are computed. Nine symbolic constants are accepted:
    >     *GL_ZERO*, *GL_ONE*, *GL_DST_COLOR*, *GL_ONE_MINUS_DST_COLOR*,
    >     *GL_SRC_ALPHA*, *GL_ONE_MINUS_SRC_COLOR*, *GL_DST_ALPHA*,
    >     *GL_ONE_MINUS_DST_ALPHA*, and *GL_SRC_ALPHA_SATURATE*.
    >
    > /dfactor/
    >     Specifies how the red, green, blue and alpha destination blending
    >     factors are computed. Eight symbolic constants are accepted:
    >     *GL_ZERO*, *GL_ONE*, *GL_SCR_COLOR*, *GL_ONE_MINUS_SRC_COLOR*,
    >     *GL_SRC_ALPHA*, *GL_ONE_MINUS_SRC_COLOR*, *GL_DST_ALPHA*, and
    >     *GL_ONE_MINUS_DST_ALPHA*.
    >
    > If I am correct I just have to add it in correct place to "renewal"
    > code and RE in which registers they are represented and in what way :D
    > I hope you will tell where have I made mistakes and give me a few
    > pieces of advices :)
    >
    Yes, you have to put these values as glBlendFunc parameters. Howerver,
    each change must be validated by drawing a triangle. So you need
    something like :

    **               dump_before();
    *              *glBlendFunc(somethingh,something);

            glBegin(GL_TRIANGLES);

            glVertex3f(-1.0f, -0.5f, -4.0f);    // A
            glVertex3f( 1.0f, -0.5f, -4.0f);    // B
            glVertex3f( 0.0f,  0.5f, -4.0f);    // C

    *              *glEnd();
                  dump_after();

    Stephane




Odpowiedz	Przeka&#380;
	
		
		
Stephane Marchesin 	
do mnie
	 Wi&#281;cej opcji	  29.04 (6 dni temu)
Micha&#322; Majchrowicz wrote:
> Ido dump_before after glBegin(GL_BLEND);
> or before? Since I suppose the whole part should be:
> *glBegin(*GL_BLEND);
> >               *glBlendFucn(somethingh,something);
> > *              *glEnd();
> Sorry for aksing(even im oppinion :)) so many lame question, but,
> since it is my first time, I wan to be sure, that I do everything
> correct :)
> Regards.
glBegin(GL_BLEND) doesn't exist, you need to use glEnable(GL_BLEND) (and
then you don't need glEnd for GL_BLEND). You can use it after or before,
I don't think it changes anything.

Stephane



Odpowiedz	Przeka&#380;	Zapro&#347; Stephane do korzystania z Gmaila
	
		
		
Micha&#322; Majchrowicz 	
do Stephane
	 Wi&#281;cej opcji	  29.04 (6 dni temu)
06-04-29, Stephane Marchesin <marchesin@icps.u-strasbg.fr> napisa&#322;(a):
- Wy&#347;wietl cytowany tekst -

    Micha&#322; Majchrowicz wrote:
    > Ido dump_before after glBegin(GL_BLEND);
    > or before? Since I suppose the whole part should be:
    > *glBegin(*GL_BLEND);
    > >               *glBlendFucn(somethingh,something);
    > > *              *glEnd();
    > Sorry for aksing(even im oppinion :)) so many lame question, but,
    > since it is my first time, I wan to be sure, that I do everything
    > correct :)
    > Regards.
    glBegin(GL_BLEND) doesn't exist, you need to use glEnable(GL_BLEND) (and
    then you don't need glEnd for GL_BLEND). You can use it after or before,
    I don't think it changes anything.

    Stephane


Yes you are right it was glEnable :) sorry for mistake :)
 I will start to make test afer this weekend since now I am reting on excursion far away from my computer :) I also talked with my few friends and propably I would be also able to  test nv40.
Michael

Odpowiedz	Przeka&#380;
	
		
		
Micha&#322; Majchrowicz 	
do Stephane
	 Wi&#281;cej opcji	  3.05 (2 dni temu)
Hi.
Here are the effect of my researches :D
There are two importent registers one is 2b9 and second is 2ba.
From now on I will call them reg1 and reg2 :)
reg1 is alaways the first parameter of the glBlendFunc, and reg2 is the second.
The values are almost always the same as in GL.h.
Here are the only differences
GL_DST_ALPHA :)
reg1 always = 1 :)
-----------------------------------------------------------------------------
GL_ONE_MINUS_DST_ALPHA :)
reg1 always = 0 :)
-----------------------------------------------------------------------------
GL_ONE_MINUS_DST_ALPHA :)
reg1 always = 0 :)
GL_DST_ALPHA
reg2 always=1;

GL_ONE_MINUS_DST_ALPHA
reg2 always=0;
That would be all, At the end I attach the example data.
I hope this will be useful. If this data is correct, tell
how may I help you more
Regards Michael.

1) glBlendFunc(GL_ZERO,GL_ZERO);
reg1=GL_ZERO; //0;
reg2=GL_ZERO; //0;
2) glBlendFunc(GL_ZERO,GL_ONE);
reg1=GL_ZERO; //0;
reg2=GL_ONE; //1;
2ab   0x00000000   0x00042300   {size: 0x1   channel: 0x1   cmd: NV10_ENABLE_ALPHA_TEST}
2ac   0x00000000   0x00000000  (MACRO: TRUE)
2ad   0x00000000   0x0008233c   {size: 0x2   channel: 0x1   cmd: NV10_ALPHA_FUNC}
2ae   0x00000000   0x00000205
3) glBlendFunc(GL_ZERO,GL_SRC_COLOR);
reg1=GL_ZERO;
reg2=GL_SRC_COLOR; //0x300
4) glBlendFunc(GL_ZERO,GL_ONE_MINUS_SRC_COLOR);
reg1=GL_ZERO;
reg2=GL_ONE_MINUS_SRC_COLOR; //0x301
5) glBlendFunc(GL_ZERO,GL_SRC_ALPHA);
reg1=GL_ZERO;
reg2=GL_SRC_ALPHA; //0x302
6) glBlendFunc(GL_ZERO,GL_ONE_MINUS_SRC_ALPHA);
reg1=GL_ZERO;
reg2=GL_ONE_MINUS_SRC_ALPHA; //0x303
2ab   0x00000000   0x00042300   {size: 0x1   channel: 0x1   cmd: NV10_ENABLE_ALPHA_TEST}
2ac   0x00000000   0x00000000  (MACRO: TRUE)
2ad   0x00000000   0x0008233c   {size: 0x2   channel: 0x1   cmd: NV10_ALPHA_FUNC}
2ae   0x00000000   0x00000205
7) glBlendFunc(GL_ZERO,GL_DST_ALPHA);
GL_DST_ALPHA=0x304
reg1=GL_ZERO;
reg2=1; //?!?;
8) glBlendFunc(GL_ZERO,GL_ONE_MINUS_DST_ALPHA);
GL_ONE_MINUS_DST_ALPHA=0x305
reg1=GL_ZERO;
reg2=0; //?!?;
-----------------------------------------------------------------------------------------
1) glBlendFunc(GL_ONE,GL_ZERO);
reg1=GL_ONE; //1;
reg2=GL_ZERO; //0;
2) glBlendFunc(GL_ONE,GL_ONE);
reg1=GL_ONE; //1;
reg2=GL_ONE; //1;
3) glBlendFunc(GL_ONE,GL_ZERO);
reg1=GL_ONE; //1;
reg2=GL_ZERO; //0;
3) glBlendFunc(GL_ONE,GL_SRC_COLOR);
reg1=GL_ONE;
reg2=GL_SRC_COLOR; //0x300
4) glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_COLOR);
reg1=GL_ONE;
reg2=GL_ONE_MINUS_SRC_COLOR; //0x301
5) glBlendFunc(GL_ONE,GL_SRC_ALPHA);
reg1=GL_ONE;
reg2=GL_SRC_ALPHA; //0x302
6) glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_ALPHA);
reg1=GL_ONE;
reg2=GL_ONE_MINUS_SRC_ALPHA; //0x303
7) glBlendFunc(GL_ONE,GL_DST_ALPHA);
GL_DST_ALPHA=0x304
reg1=GL_ONE;
reg2=1; //?!?;
8) glBlendFunc(GL_ONE,GL_ONE_MINUS_DST_ALPHA);
GL_ONE_MINUS_DST_ALPHA=0x305
reg1=GL_ONE;
reg2=0; //?!?;
-----------------------------------------------------------------------------------------
1) glBlendFunc(GL_DST_COLOR,GL_ZERO);
reg1=GL_DST_COLOR; //0x306;
reg2=GL_ZERO; //0;
2) glBlendFunc(GL_DST_COLOR,GL_ONE);
reg1=GL_DST_COLOR;
reg2=GL_ONE; //1;
3) glBlendFunc(GL_DST_COLOR,GL_ZERO);
reg1=GL_DST_COLOR;
reg2=GL_ZERO; //0;
3) glBlendFunc(GL_DST_COLOR,GL_SRC_COLOR);
reg1=GL_DST_COLOR;
reg2=GL_SRC_COLOR; //0x300
4) glBlendFunc(GL_DST_COLOR,GL_ONE_MINUS_SRC_COLOR);
reg1=GL_DST_COLOR;
reg2=GL_ONE_MINUS_SRC_COLOR; //0x301
5) glBlendFunc(GL_DST_COLOR,GL_SRC_ALPHA);
reg1=GL_DST_COLOR;
reg2=GL_SRC_ALPHA; //0x302
6) glBlendFunc(GL_DST_COLOR,GL_ONE_MINUS_SRC_ALPHA);
reg1=GL_DST_COLOR;
reg2=GL_ONE_MINUS_SRC_ALPHA; //0x303
7) glBlendFunc(GL_DST_COLOR,GL_DST_ALPHA);
reg1=GL_DST_COLOR;
reg2=1; //?!?;
8) glBlendFunc(GL_DST_COLOR,GL_ONE_MINUS_DST_ALPHA);
GL_ONE_MINUS_DST_ALPHA=0x305
reg1=GL_DST_COLOR;
reg2=0; //?!?;
-----------------------------------------------------------------------------------------
1) glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ZERO);
reg1=GL_ONE_MINUS_DST_COLOR; //0x306;
reg2=GL_ZERO; //0;
2) glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ONE);
reg1=GL_ONE_MINUS_DST_COLOR;
reg2=GL_ONE; //1;
3) glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ZERO);
reg1=GL_ONE_MINUS_DST_COLOR;
reg2=GL_ZERO; //0;
3) glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_SRC_COLOR);
reg1=GL_ONE_MINUS_DST_COLOR;
reg2=GL_SRC_COLOR; //0x300
4) glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ONE_MINUS_SRC_COLOR);
reg1=GL_ONE_MINUS_DST_COLOR;
reg2=GL_ONE_MINUS_SRC_COLOR; //0x301
5) glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_SRC_ALPHA);
reg1=GL_ONE_MINUS_DST_COLOR;
reg2=GL_SRC_ALPHA; //0x302
6) glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ONE_MINUS_SRC_ALPHA);
reg1=GL_ONE_MINUS_DST_COLOR;
reg2=GL_ONE_MINUS_SRC_ALPHA; //0x303
7) glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_DST_ALPHA);
reg1=GL_ONE_MINUS_DST_COLOR;
reg2=1; //?!?;
8) glBlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ONE_MINUS_DST_ALPHA);
GL_ONE_MINUS_DST_ALPHA=0x305
reg1=GL_ONE_MINUS_DST_COLOR;
reg2=0; //?!?;
-----------------------------------------------------------------------------------------
1) glBlendFunc(GL_SRC_ALPHA,GL_ZERO);
reg1=GL_SRC_ALPHA; //0x306;
reg2=GL_ZERO; //0;
2) glBlendFunc(GL_SRC_ALPHA,GL_ONE);
reg1=GL_SRC_ALPHA;
reg2=GL_ONE; //1;
3) glBlendFunc(GL_SRC_ALPHA,GL_ZERO);
reg1=GL_SRC_ALPHA;
reg2=GL_ZERO; //0;
3) glBlendFunc(GL_SRC_ALPHA,GL_SRC_COLOR);
reg1=GL_SRC_ALPHA;
reg2=GL_SRC_COLOR; //0x300
4) glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_COLOR);
reg1=GL_SRC_ALPHA;
reg2=GL_ONE_MINUS_SRC_COLOR; //0x301
5) glBlendFunc(GL_SRC_ALPHA,GL_SRC_ALPHA);
reg1=GL_SRC_ALPHA;
reg2=GL_SRC_ALPHA; //0x302
6) glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
2ab   0x00000000   0x00042300   {size: 0x1   channel: 0x1   cmd: NV10_ENABLE_ALPHA_TEST}
2ac   0x00000000   0x00000000  (MACRO: TRUE)
2ad   0x00000000   0x0008233c   {size: 0x2   channel: 0x1   cmd: NV10_ALPHA_FUNC}
2ae   0x00000000   0x00000205
reg1=GL_SRC_ALPHA;
reg2=GL_ONE_MINUS_SRC_ALPHA; //0x303
7) glBlendFunc(GL_SRC_ALPHA,GL_DST_ALPHA);
reg1=GL_SRC_ALPHA;
reg2=1; //?!?;
8) glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_DST_ALPHA);
GL_ONE_MINUS_DST_ALPHA=0x305
reg1=GL_SRC_ALPHA;
reg2=0; //?!?;
-----------------------------------------------------------------------------
GL_ONE_MINUS_SRC_ALPHA :)
Nothing suspicious, I mean no alpha macro change :)
-----------------------------------------------------------------------------
GL_DST_ALPHA :)
reg1 always = 1 :)
-----------------------------------------------------------------------------
GL_ONE_MINUS_DST_ALPHA :)
reg1 always = 0 :)
-----------------------------------------------------------------------------
GL_ONE_MINUS_DST_ALPHA :)
reg1 always = 0 :)


2ab   0x00000000   0x00042300   {size: 0x1   channel: 0x1   cmd: NV10_ENABLE_ALPHA_TEST}
2ac   0x00000000   0x00000000  (MACRO: FALSE)
2ad   0x00000000   0x0008233c   {size: 0x2   channel: 0x1   cmd: NV10_ALPHA_FUNC}
2ae   0x00000000   0x00000207
2af   0x00000000   0x00000000
2b0   0x00000000   0x000422bc   {size: 0x1   channel: 0x1   cmd: 0x000002bc}
2b1   0x00000000   0x00000001
2b2   0x00000000   0x00042304   {size: 0x1   channel: 0x1   cmd: NV10_ENABLE_BLEND}
2b3   0x00000000   0x00000001  (MACRO: TRUE)
2b4   0x00000000   0x00042310   {size: 0x1   channel: 0x1   cmd: NV10_BLEND_FUNC}
2b5   0x00000000   0x00000001
2b6   0x00000000   0x0004232c   {size: 0x1   channel: 0x1   cmd: 0x0000032c}
2b7   0x00000000   0x00000000
2b8   0x00000000   0x00102344   {size: 0x4   channel: 0x1   cmd: 0x00000344}
2b9   0x00000000   0x00000001
2ba   0x00000000   0x00000001
2bb   0x00000000   0x00000000
2bc   0x00000000   0x00008006
2bd   0x00000000   0x001c2360   {size: 0x7   channel: 0x1   cmd: 0x00000360}
2be   0x00000000   0x00000000
2bf   0x00000000   0x00000207
2c0   0x00000000   0x00000000
2c1   0x00000000   0x00000000
2c2   0x00000000   0x00001e00
2c3   0x00000000   0x00001e00
2c4   0x00000000   0x00001e00
2c5   0x00000000   0x00082d40   {size: 0x2   channel: 0x1   cmd: 0x00000d40}
2c6   0x00000000   0x00000000
2c7   0x00000000   0x00001503
2c8   0x00000000   0x00402500   {size: 0x10   channel: 0x1   cmd: 0x00000500}
2c9   0x00000000   0x43800000
2ca   0x00000000   0x00000000
2cb   0x00000000   0x00000000
2cc   0x00000000   0x00000000
2cd   0x00000000   0x80000000
2ce   0x00000000   0xc3800000
2cf   0x00000000   0x80000000
2d0   0x00000000   0x80000000
2d1   0x00000000   0x00000000
2d2   0x00000000   0x00000000
2d3   0x00000000   0x4affffff
2d4   0x00000000   0x00000000
2d5   0x00000000   0x00000000
2d6   0x00000000   0x00000000
2d7   0x00000000   0x00000000
2d8   0x00000000   0x3f800000
2d9   0x00000000   0x001026e8   {size: 0x4   channel: 0x1   cmd: 0x000006e8}
2da   0x00000000   0xc4de7f00
2db   0x00000000   0xc4dfe104
2dc   0x00000000   0x4affffff
2dd   0x00000000   0x00000000
2de   0x00000000   0x00042358   {size: 0x1   channel: 0x1   cmd: 0x00000358}
2df   0x00000000   0x00010101


Odpowiedz	Przeka&#380;
	
		
		
Stephane Marchesin 	
do mnie
	 Wi&#281;cej opcji	  3.05 (2 dni temu)
Micha&#322; Majchrowicz wrote:
> Hi.
> Here are the effect of my researches :D
> There are two importent registers one is 2b9 and second is 2ba.
> From now on I will call them reg1 and reg2 :)
> reg1 is alaways the first parameter of the glBlendFunc, and reg2 is
> the second.
> The values are almost always the same as in GL.h.
> Here are the only differences
> GL_DST_ALPHA :)
> reg1 always = 1 :)
> -----------------------------------------------------------------------------
> GL_ONE_MINUS_DST_ALPHA :)
> reg1 always = 0 :)
> -----------------------------------------------------------------------------
> GL_ONE_MINUS_DST_ALPHA :)
> reg1 always = 0 :)
> GL_DST_ALPHA
> reg2 always=1;
> GL_ONE_MINUS_DST_ALPHA
> reg2 always=0;
> That would be all, At the end I attach the example data.
> I hope this will be useful. If this data is correct, tell
> how may I help you more
> Regards Michael.
>
Hi,

Very nice !
I think everything with DST_ALPHA is unused because your visual doesn't
have an alpha channel, right ?

Do you have a sourceforge.net account ? You should create one, tell me
your id, and then I'll add you to the project. We have one module called
"doc" where we put this kind of documentation. Once you have an account
with commit rights, please create a file describing blending nv nv10
just like the other files.

Stephane



Odpowiedz	Przeka&#380;	Zapro&#347; Stephane do korzystania z Gmaila
	
		
		
Micha&#322; Majchrowicz 	
do Stephane
	 Wi&#281;cej opcji	  3.05 (2 dni temu)
Hi.
my sourceforge.net account is sectroyer. I may also check nvidia GeForce 6600 GT card for these Function.
And one more thing, who changes the cmds.h and cmds.c files? Should I do it now?
Regards Michael. What do you mean by visual? I have Depth set to 24bits. Should I run
the tests again with 32 bit depth?
Regards Michael.


2006/5/3, Stephane Marchesin < marchesin@icps.u-strasbg.fr>:
- Wy&#347;wietl cytowany tekst -

    Micha&#322; Majchrowicz wrote:
    > Hi.
    > Here are the effect of my researches :D
    > There are two importent registers one is 2b9 and second is 2ba.
    > From now on I will call them reg1 and reg2 :)
    > reg1 is alaways the first parameter of the glBlendFunc, and reg2 is
    > the second.
    > The values are almost always the same as in GL.h.
    > Here are the only differences
    > GL_DST_ALPHA :)
    > reg1 always = 1 :)
    > -----------------------------------------------------------------------------
    > GL_ONE_MINUS_DST_ALPHA :)
    > reg1 always = 0 :)
    > -----------------------------------------------------------------------------
    > GL_ONE_MINUS_DST_ALPHA :)
    > reg1 always = 0 :)
    > GL_DST_ALPHA
    > reg2 always=1;
    > GL_ONE_MINUS_DST_ALPHA
    > reg2 always=0;
    > That would be all, At the end I attach the example data.
    > I hope this will be useful. If this data is correct, tell
    > how may I help you more
    > Regards Michael.
    >
    Hi,

    Very nice !
    I think everything with DST_ALPHA is unused because your visual doesn't
    have an alpha channel, right ?

    Do you have a sourceforge.net account ? You should create one, tell me
    your id, and then I'll add you to the project. We have one module called
    "doc" where we put this kind of documentation. Once you have an account
    with commit rights, please create a file describing blending nv nv10
    just like the other files.

    Stephane




Odpowiedz	Przeka&#380;
	
		
		
Stephane Marchesin 	
do mnie
	 Wi&#281;cej opcji	  4.05 (1 dni temu)
Micha&#322; Majchrowicz wrote:
> Hi.
> my sourceforge.net <http://sourceforge.net> account is sectroyer. I
> may also check nvidia GeForce 6600 GT card for these Function.
> And one more thing, who changes the cmds.h and cmds.c files? Should I
> do it now?
Ok, you're added to the project.
Yes, each time you write some documentation, you should add the
corresponding information do cmds.c and cmds.h. The opposite is also true :)

> What do you mean by visual? I have Depth set to 24bits. Should I run
> the tests again with 32 bit depth?
The visual is the pixel format and other attributes used to create the
window. If your window has a visual without an alpha channel, you can't
use DST as a blending factor.
The visual is chosen by the SDL_GL_SetAttribute() calls. Also, glxinfo
lists all the available visuals and their properties at the end.

Stephane



Odpowiedz	Przeka&#380;	Zapro&#347; Stephane do korzystania z Gmaila
	
		
		
Micha&#322; Majchrowicz 	
do Stephane
	 Wi&#281;cej opcji	  4.05 (1 dni temu)
Here is my glxinfo. I used defaulf SDL..... which was in main.c
I would be grateful, if you will send my the exact parameters, that I should
put for the
SDL_GL_SetAttribute(). If I'm correct (affter setting alpha: on (in some way:))) I have to run the test once more for the cases, when the macro with alpha false was executed? The last two test, I mean this where the value of the reg1/reg2 register was different than in GL.h will not change so I don't have to run them again ? And the last thing, Should I test alse the Geforce 6600 GT card, or do you already have it?
Regards Michael.


name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
    GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_swap_control, GLX_NV_float_buffer, GLX_ARB_fbconfig_float
GLX version: 1.3
GLX extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGI_video_sync, GLX_SGI_swap_control,
    GLX_ARB_get_proc_address
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce4 MX 440 with AGP8X/AGP/SSE/3DNOW!
OpenGL version string: 1.5.6 NVIDIA 87.56
OpenGL extensions:
    GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_pixel_buffer_object,
    GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shader_objects,
    GL_ARB_shading_language_100, GL_ARB_texture_compression,
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add,
    GL_ARB_texture_env_combine, GL_ARB_texture_env_dot3,
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_rectangle,
    GL_ARB_transpose_matrix, GL_ARB_vertex_buffer_object,
    GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_window_pos,
    GL_S3_s3tc, GL_EXT_texture_env_add, GL_EXT_abgr, GL_EXT_bgra,
    GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract,
    GL_EXT_clip_volume_hint, GL_EXT_compiled_vertex_array, GL_EXT_Cg_shader,
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
    GL_EXT_packed_pixels, GL_EXT_paletted_texture, GL_EXT_pixel_buffer_object,
    GL_EXT_point_parameters, GL_EXT_rescale_normal, GL_EXT_secondary_color,
    GL_EXT_separate_specular_color, GL_EXT_shared_texture_palette,
    GL_EXT_stencil_wrap, GL_EXT_texture_compression_s3tc,
    GL_EXT_texture_cube_map, GL_EXT_texture_edge_clamp,
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod,
    GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_vertex_array,
    GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,
    GL_KTX_buffer_region, GL_NV_blend_square, GL_NV_fence,
    GL_NV_fog_distance, GL_NV_light_max_exponent, GL_NV_packed_depth_stencil,
    GL_NV_pixel_data_range, GL_NV_point_sprite, GL_NV_register_combiners,
    GL_NV_texgen_reflection, GL_NV_texture_env_combine4,
    GL_NV_texture_rectangle, GL_NV_vertex_array_range,
    GL_NV_vertex_array_range2, GL_NV_vertex_program, GL_NV_vertex_program1_1,
    GL_SGIS_generate_mipmap, GL_SGIS_multitexture, GL_SGIS_texture_lod,
    GL_SUN_slice_accum
glu version: 1.3
glu extensions:
    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x21 24 tc  0 32  0 r  y  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x22 24 dc  0 32  0 r  y  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x23 24 tc  0 32  0 r  y  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x24 24 tc  0 32  0 r  .  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x25 24 tc  0 32  0 r  .  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x26 24 tc  0 32  0 r  y  .  8  8  8  0  4 24  0 16 16 16 16  0 0 None
0x27 24 tc  0 32  0 r  y  .  8  8  8  8  4 24  0 16 16 16 16  0 0 None
0x28 24 tc  0 32  0 r  .  .  8  8  8  0  4 24  0 16 16 16 16  0 0 None
0x29 24 tc  0 32  0 r  .  .  8  8  8  8  4 24  0 16 16 16 16  0 0 None
0x2a 24 tc  0 32  0 r  y  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x2b 24 tc  0 32  0 r  y  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x2c 24 tc  0 32  0 r  .  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x2d 24 tc  0 32  0 r  .  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x2e 24 tc  0 32  0 r  y  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x2f 24 tc  0 32  0 r  y  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None
0x30 24 tc  0 32  0 r  .  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x31 24 tc  0 32  0 r  .  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None
0x32 24 dc  0 32  0 r  y  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x33 24 dc  0 32  0 r  .  .  8  8  8  0  4 24  8 16 16 16 16  0 0 None
0x34 24 dc  0 32  0 r  .  .  8  8  8  8  4 24  8 16 16 16 16  0 0 None
0x35 24 dc  0 32  0 r  y  .  8  8  8  0  4 24  0 16 16 16 16  0 0 None
0x36 24 dc  0 32  0 r  y  .  8  8  8  8  4 24  0 16 16 16 16  0 0 None
0x37 24 dc  0 32  0 r  .  .  8  8  8  0  4 24  0 16 16 16 16  0 0 None
0x38 24 dc  0 32  0 r  .  .  8  8  8  8  4 24  0 16 16 16 16  0 0 None
0x39 24 dc  0 32  0 r  y  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x3a 24 dc  0 32  0 r  y  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x3b 24 dc  0 32  0 r  .  .  8  8  8  0  4 16  0 16 16 16 16  0 0 None
0x3c 24 dc  0 32  0 r  .  .  8  8  8  8  4 16  0 16 16 16 16  0 0 None
0x3d 24 dc  0 32  0 r  y  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x3e 24 dc  0 32  0 r  y  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None
0x3f 24 dc  0 32  0 r  .  .  8  8  8  0  4  0  0 16 16 16 16  0 0 None
0x40 24 dc  0 32  0 r  .  .  8  8  8  8  4  0  0 16 16 16 16  0 0 None

06-05-04, Stephane Marchesin <marchesin@icps.u-strasbg.fr> napisa&#322;(a):
- Wy&#347;wietl cytowany tekst -

    Micha&#322; Majchrowicz wrote:
    > Hi.
    > my sourceforge.net <http://sourceforge.net> account is sectroyer. I
    > may also check nvidia GeForce 6600 GT card for these Function.
    > And one more thing, who changes the cmds.h and cmds.c files? Should I
    > do it now?
    Ok, you're added to the project.
    Yes, each time you write some documentation, you should add the
    corresponding information do cmds.c and cmds.h. The opposite is also true :)

    > What do you mean by visual? I have Depth set to 24bits. Should I run
    > the tests again with 32 bit depth?
    The visual is the pixel format and other attributes used to create the
    window. If your window has a visual without an alpha channel, you can't
    use DST as a blending factor.
    The visual is chosen by the SDL_GL_SetAttribute() calls. Also, glxinfo
    lists all the available visuals and their properties at the end.

    Stephane




Odpowiedz	Przeka&#380;
	
		
		
Micha&#322; Majchrowicz 	
do Stephane
	 Wi&#281;cej opcji	  4.05 (1 dni temu)
And question about this part. NV10_BLEND_FUNC is already declared where as my NV10_BLEND_FUNC is at address 2b8 with value 0x344, should I change the NV10_BLEND_FUNC, or call my new function for instance NV10_SUB_BLEND_FUNC? :)
Regards Michael.
- Wy&#347;wietl cytowany tekst -


2b4   0x00000000   0x00042310   {size: 0x1   channel: 0x1   cmd: NV10_BLEND_FUNC}
2b5   0x00000000   0x00000001
2b6   0x00000000   0x0004232c   {size: 0x1   channel: 0x1   cmd: 0x0000032c}
2b7   0x00000000   0x00000000
2b8   0x00000000   0x00102344   {size: 0x4   channel: 0x1   cmd: 0x00000344}


Odpowiedz	Przeka&#380;
	
		
		
Stephane Marchesin 	
do mnie
	 Wi&#281;cej opcji	  4.05 (1 dni temu)
- Wy&#347;wietl cytowany tekst -
Micha&#322; Majchrowicz wrote:
> And question about this part. NV10_BLEND_FUNC is already declared
> where as my NV10_BLEND_FUNC is at address 2b8 with value 0x344, should
> I change the NV10_BLEND_FUNC, or call my new function for instance
> NV10_SUB_BLEND_FUNC? :)
> Regards Michael.
>
> *2b4   0x00000000   0x00042310   {size: 0x1   channel: 0x1   cmd:
> NV10_BLEND_FUNC}
> 2b5   0x00000000   0x00000001
> 2b6   0x00000000   0x0004232c   {size: 0x1   channel: 0x1   cmd:
> 0x0000032c}
> 2b7   0x00000000   0x00000000
> 2b8   0x00000000   0x00102344   {size: 0x4   channel: 0x1   cmd:
> 0x00000344}
> *
>

Well, the adress doesn't matter, since the commands can be put at
different positions in the fifo. It's really possible that these
commands can be used multiple times for example.

What matters is the command number, though (32c and 344). You should
probably name those NV10_BLEND_FUNC_SRC and NV10_BLEND_FUNC_DST (that's
what they do, right ?).

Stephane



Odpowiedz	Przeka&#380;	Zapro&#347; Stephane do korzystania z Gmaila
	
		
		
Stephane Marchesin 	
do mnie
	 Wi&#281;cej opcji	  4.05 (1 dni temu)
Micha&#322; Majchrowicz wrote:
> Here is my glxinfo. I used defaulf SDL..... which was in main.c
> I would be grateful, if you will send my the exact parameters, that I
> should
> put for the
> SDL_GL_SetAttribute(). If I'm correct (affter setting alpha: on (in
> some way:)))
Yes, you should use SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE,8);

> I have to run the test once more for the cases, when the macro with
> alpha false was executed? The last two test, I mean this where the
> value of the reg1/reg2 register was different than in GL.h will not
> change so I don't have to run them again ?
Yes, any test using the DST_ALPHA value which does not exist until you
use the SDL_GL_SetAttribute command I gave you.

> And the last thing, Should I test alse the Geforce 6600 GT card, or do
> you already have it?
Yes, if you have the occation, please look at how the 6600 works as well.

Stephane



Odpowiedz	Przeka&#380;	Zapro&#347; Stephane do korzystania z Gmaila
	
		
		
Micha&#322; Majchrowicz 	
do Stephane
	 Wi&#281;cej opcji	  4.05 (1 dni temu)
Thank you.
I will do the test, send you the results in the evening :)
Regards.

06-05-04, Stephane Marchesin < marchesin@icps.u-strasbg.fr> napisa&#322;(a):
- Wy&#347;wietl cytowany tekst -

    Micha&#322; Majchrowicz wrote:
    > Here is my glxinfo. I used defaulf SDL..... which was in main.c
    > I would be grateful, if you will send my the exact parameters, that I
    > should
    > put for the
    > SDL_GL_SetAttribute(). If I'm correct (affter setting alpha: on (in
    > some way:)))
    Yes, you should use SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE,8);

    > I have to run the test once more for the cases, when the macro with
    > alpha false was executed? The last two test, I mean this where the
    > value of the reg1/reg2 register was different than in GL.h will not
    > change so I don't have to run them again ?
    Yes, any test using the DST_ALPHA value which does not exist until you
    use the SDL_GL_SetAttribute command I gave you.

    > And the last thing, Should I test alse the Geforce 6600 GT card, or do
    > you already have it?
    Yes, if you have the occation, please look at how the 6600 works as well.

    Stephane




Odpowiedz	Przeka&#380;
	
		
		
Micha&#322; Majchrowicz 	
do Stephane
	 Wi&#281;cej opcji	  4.05 (1 dni temu)
SO there Would be 3 functions right ?
First:
NV10_BLEND_FUNC (0x304)
1 parameter always =1 during my test
Second:
NV10_BLEND_FUNC_SRC(0x32c
1 parameter always =0 during my test
And Third
NV10_BLEND_FUNC_DST(0x344)
reg1, reg2, some constatn, some constant
Is this correct ?
Regards.

2006/5/4, Stephane Marchesin < marchesin@icps.u-strasbg.fr>:
- Wy&#347;wietl cytowany tekst -

    Micha&#322; Majchrowicz wrote:
    > And question about this part. NV10_BLEND_FUNC is already declared
    > where as my NV10_BLEND_FUNC is at address 2b8 with value 0x344, should
    > I change the NV10_BLEND_FUNC, or call my new function for instance
    > NV10_SUB_BLEND_FUNC? :)
    > Regards Michael.
    >
    > *2b4   0x00000000   0x00042310   {size: 0x1   channel: 0x1   cmd:
    > NV10_BLEND_FUNC}
    > 2b5   0x00000000   0x00000001
    > 2b6   0x00000000   0x0004232c   {size: 0x1   channel: 0x1   cmd:
    > 0x0000032c}
    > 2b7   0x00000000   0x00000000
    > 2b8   0x00000000   0x00102344   {size: 0x4   channel: 0x1   cmd:
    > 0x00000344}
    > *
    >

    Well, the adress doesn't matter, since the commands can be put at
    different positions in the fifo. It's really possible that these
    commands can be used multiple times for example.

    What matters is the command number, though (32c and 344). You should
    probably name those NV10_BLEND_FUNC_SRC and NV10_BLEND_FUNC_DST (that's
    what they do, right ?).

    Stephane




Odpowiedz	Przeka&#380;
	
		
		
Micha&#322; Majchrowicz 	
do Stephane
	 Wi&#281;cej opcji	  4.05 (16 godzin temu)
Hi.
After enabling ALPHA on my visual :) reg1/reg2 values are always the same as two
parameters of glBlendFunc. Nevertheless sometimes there is executed this macro which I described before setting the alpha to false. Since this is not the part of my function, I will only mention it in my documentation. I am going to write correct marcros for my function today and add it to cms.c/cmds.h. I am still waiting for your oppinion about the function names :)
Regards Michael.

06-05-04, Micha&#322; Majchrowicz < mmajchrowicz@gmail.com> napisa&#322;(a):
- Ukryj cytowany tekst -

    SO there Would be 3 functions right ?
    First:
    NV10_BLEND_FUNC (0x304)
    1 parameter always =1 during my test
    Second:
    NV10_BLEND_FUNC_SRC(0x32c
    1 parameter always =0 during my test
    And Third
    NV10_BLEND_FUNC_DST(0x344)
    reg1, reg2, some constatn, some constant
    Is this correct ?
    Regards.

    2006/5/4, Stephane Marchesin < marchesin@icps.u-strasbg.fr>:

        Micha&#322; Majchrowicz wrote:
        > And question about this part. NV10_BLEND_FUNC is already declared
        > where as my NV10_BLEND_FUNC is at address 2b8 with value 0x344, should
        > I change the NV10_BLEND_FUNC, or call my new function for instance
        > NV10_SUB_BLEND_FUNC? :)
        > Regards Michael.
        >
        > *2b4   0x00000000   0x00042310   {size: 0x1   channel: 0x1   cmd:
        > NV10_BLEND_FUNC}
        > 2b5   0x00000000   0x00000001
        > 2b6   0x00000000   0x0004232c   {size: 0x1   channel: 0x1   cmd:
        > 0x0000032c}
        > 2b7   0x00000000   0x00000000
        > 2b8   0x00000000   0x00102344   {size: 0x4   channel: 0x1   cmd:
        > 0x00000344}
        > *
        >

        Well, the adress doesn't matter, since the commands can be put at
        different positions in the fifo. It's really possible that these
        commands can be used multiple times for example.

        What matters is the command number, though (32c and 344). You should
        probably name those NV10_BLEND_FUNC_SRC and NV10_BLEND_FUNC_DST (that's
        what they do, right ?).

        Stephane





Odpowiedz	Przeka&#380;
	
		
		
Micha&#322; Majchrowicz 	
do Stephane
	 Wi&#281;cej opcji	  10:56 (1 godzin&#281; temu)
Hi. Sorry for troubleing you but did not know how should I submit this data :(.
so I am sending it tou you. :(
 I attach two diff files for cmds.h and cmds.c. The most important is functi=
 on number 3. The firs two <br>arguments are the same as passed to glBlendFu=
 nc. Nevertheless in some cases, there is executed macro<br>for disabling al=
 pha, don't know why(I am not sure, whether it is important:(&nbsp; This was=
  tested on NV17.=20
On NV11 only third function is executed. Neither seconds or first is us=
 ed.<br>Regards Michael.<br>