Re: [PD] [GEM-dev] gl stack underflow

2010-01-02 Thread Matteo Sisti Sette
IOhannes m zmölnig escribió: use rectangle textures ([rectangle 1( to [pix_texture]). But the help patch for pix_texture says: Inlet 1: rectangle 0|1 : use rectangle-texturing when available (default=1) So sending [rectangle 1( to it should have no effect since it is the default value

Re: [PD] [GEM-dev] gl stack underflow

2010-01-02 Thread IOhannes m zmölnig
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matteo Sisti Sette wrote: IOhannes m zmölnig escribió: use rectangle textures ([rectangle 1( to [pix_texture]). But the help patch for pix_texture says: Inlet 1: rectangle 0|1 : use rectangle-texturing when available (default=1) hmm, i

Re: [PD] [GEM-dev] gl stack underflow

2010-01-02 Thread Matteo Sisti Sette
IOhannes m zmölnig escribió: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matteo Sisti Sette wrote: IOhannes m zmölnig escribió: use rectangle textures ([rectangle 1( to [pix_texture]). But the help patch for pix_texture says: Inlet 1: rectangle 0|1 : use rectangle-texturing when

Re: [PD] [GEM-dev] gl stack underflow

2010-01-02 Thread Matteo Sisti Sette
IOhannes m zmölnig escribió: use rectangle textures ([rectangle 1( to [pix_texture]). Do I have to set it to all the [pix_texture] objects that create the textures, or only to the one using the shader? That is, having [gemhead] | (...something...) | | [texunit 1( |/ [pix_texture]

Re: [PD] [GEM-dev] gl stack underflow

2010-01-02 Thread chris clepper
2010/1/2 Matteo Sisti Sette matteosistise...@gmail.com And I have to use texture2DRec instead of texture2D, don't I? Yes, that is very important to understand. All of the texture objects have to use the same mode. As already pointed out, once you use shaders the automagic selection of these

Re: [PD] [GEM-dev] gl stack underflow

2010-01-02 Thread Matteo Sisti Sette
chris clepper escribió: 2010/1/2 Matteo Sisti Sette matteosistise...@gmail.com mailto:matteosistise...@gmail.com And I have to use texture2DRec instead of texture2D, don't I? Yes, that is very important to understand. All of the texture objects have to use the same mode. Ok thank

Re: [PD] [GEM-dev] gl stack underflow

2010-01-02 Thread Matteo Sisti Sette
Regarding the stack overflow and underflow error messages, I get these continuously (once per frame at least) if I send [texunit( messages to [pix_texture]s and I don't get them if I don't They start when a [pix_snap] takes a snapshot. Any idea? thanks m. -- Matteo Sisti Sette

Re: [PD] [GEM-dev] gl stack underflow

2010-01-02 Thread cyrille henry
Matteo Sisti Sette a écrit : A copy of the GLSL 'Orange Book' might come in handy too. Yeah I think I'll buy it soon. And the red one also, no? read the red book before the orange book! Would you recommend me the blue book too, or is that too much? that will be useful when you'll start

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread cyrille henry
Matteo Sisti Sette a écrit : Hi, I know the question is pretty generic, but hopefully there's some common cause of this kind of error or something: Basically the short version is, what can cause a GL stack UNDERflow error??? you try to get value from the stack when it is empty. you can

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread Matteo Sisti Sette
cyrille henry escribió: you try to get value from the stack when it is empty. you can have such error when using glPopMatrix without using glPushMatrix... First of all thank you for helping. I never explicitly use these functions, that is, I never use [GEMglPopMatrix] nor

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread cyrille henry
Matteo Sisti Sette a écrit : cyrille henry escribió: you try to get value from the stack when it is empty. you can have such error when using glPopMatrix without using glPushMatrix... First of all thank you for helping. I never explicitly use these functions, that is, I never use

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread Matteo Sisti Sette
By the way is there any trick to track a GL error to find the object triggering it? (apart deleting objects until you find the one) cyrille henry escribió: Matteo Sisti Sette a écrit : cyrille henry escribió: you try to get value from the stack when it is empty. you can have such error

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread chris clepper
On Fri, Jan 1, 2010 at 11:32 AM, Matteo Sisti Sette matteosistise...@gmail.com wrote: By the way is there any trick to track a GL error to find the object triggering it? (apart deleting objects until you find the one) The GL error comes from the driver, and GEM just asks the driver once per

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread Matteo Sisti Sette
chris clepper escribió: On Fri, Jan 1, 2010 at 11:32 AM, Matteo Sisti Sette matteosistise...@gmail.com mailto:matteosistise...@gmail.com wrote: By the way is there any trick to track a GL error to find the object triggering it? (apart deleting objects until you find the one) The GL

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread Matteo Sisti Sette
Wow wow wow!!! It seems my underflow problem (now I was getting both underflows and overflows) is in some way related to the use of texunits AND [gemframebuffer]s. I still have to understand how exactly the texunit thingie works (the texunit message to [pix_texture] is not even documented

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread cyrille henry
there is an exemple of how to use multiple texture / textunit in the gem exemple folder, in directory 10.GLSL Matteo Sisti Sette a écrit : Wow wow wow!!! It seems my underflow problem (now I was getting both underflows and overflows) is in some way related to the use of texunits AND

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread Matteo Sisti Sette
cyrille henry escribió: there is an exemple of how to use multiple texture / textunit in the gem exemple folder, in directory 10.GLSL You mean 05.multitexture.pd? Yes I've seen it (it is thanks to that example that I have been able to do something - btw iirc it is yours, so thank you).

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread cyrille henry
Matteo Sisti Sette a écrit : cyrille henry escribió: there is an exemple of how to use multiple texture / textunit in the gem exemple folder, in directory 10.GLSL You mean 05.multitexture.pd? Yes I've seen it (it is thanks to that example that I have been able to do something - btw

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread cyrille henry
why do you use pix_snap? you don't need a pix_snap with a frambuffer since you can directly send the content of a framebuffer to a pix_texture (and then using it with multitexture) c Matteo Sisti Sette a écrit : Thank you for pointing me to the examples, but it definitely seems there is some

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread Matteo Sisti Sette
cyrille henry escribió: why do you use pix_snap? you don't need a pix_snap with a frambuffer since you can directly send the content of a framebuffer to a pix_texture (and then using it with multitexture) Every once in a while (NOT at every frame) I need to take a snapshot of what you

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread Matteo Sisti Sette
chris clepper escribió: pix_snap is probably using texunit 0 which is the default for any texturing call. pix_snap actually uses a function called glReadPixels(), and that might use texture units internally to grab the frame and store it before read back to main memory. Uh, so I guess I

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread IOhannes m zmölnig
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matteo Sisti Sette wrote: chris clepper escribió: On Fri, Jan 1, 2010 at 11:32 AM, Matteo Sisti Sette matteosistise...@gmail.com mailto:matteosistise...@gmail.com wrote: By the way is there any trick to track a GL error to find the

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread Matteo Sisti Sette
IOhannes m zmölnig escribió: but you can do it manually by inserting [GEMglReportError] after the objects where you expect a problem to appear. WOW Great!! That will help a lot. Thanks m. -- Matteo Sisti Sette matteosistise...@gmail.com http://www.matteosistisette.com

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread IOhannes m zmölnig
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matteo Sisti Sette wrote: chris clepper escribió: pix_snap is probably using texunit 0 which is the default for any texturing call. pix_snap actually uses a function called glReadPixels(), and that might use texture units internally to grab the

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread Matteo Sisti Sette
Well it seems that: - by avoiding texunit 0 and (probably unnecessarily) 1, I have actually resolved the weird interactions with [pix_snap] - I still have stack underflows and overflows printed at each frame which I'll investigate but it's probably not causing any visible issue - What was

Re: [PD] [GEM-dev] gl stack underflow

2010-01-01 Thread IOhannes m zmölnig
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Matteo Sisti Sette wrote: Well it seems that: - by avoiding texunit 0 and (probably unnecessarily) 1, I have actually resolved the weird interactions with [pix_snap] - I still have stack underflows and overflows printed at each frame which I'll