 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Durante
Joined: 02 Oct 2005 Posts: 65 Location: Austria
|
Posted: Sun Oct 23, 2005 2:18 am Post subject: Strange pspgl (goop version) color problem |
|
|
I have a very strange problem with pspgl: texturing and clearing the screen to a specific color works perfectly, but whenever I use glColor(i/ub/f/..) to draw some colored primitive (lines, triangles), only the red and alpha components have any effect. (i.e. I can only draw various shades of red at varying degrees of transparency). I double checked and even logged the values I pass to the functions, so that's not the problem.
I've tried to find the cause of this for a while now and am still pretty much where I started, so does anyone have an idea what could cause this behaviour? Any help would be greatly appreciated.
[edit]
Of course, following the universal rule of programming that states that you find the answer to a problem that has been driving you nuts for hours mere minutes after asking for help, I just found a workaround:
If I disable 2D texturing (glDisable(GL_TEXTURE_2D)) before I draw primitives everything works as expected. Still, can anyone tell me the cause of the original behaviour and wether it is correct? |
|
| Back to top |
|
 |
ReKleSS

Joined: 18 Jun 2005 Posts: 73 Location: Melbourne, Australia
|
Posted: Sun Oct 23, 2005 10:35 am Post subject: |
|
|
The top left pixel of the active texture (or whatever the active texcoord is...) wouldn't happen to be #FF0000 would it? I believe it's applying the texture, but since you didn't specify texcoords, only a single pixel of it is being used, and that's affecting the rest of your drawing.
-ReK |
|
| Back to top |
|
 |
Durante
Joined: 02 Oct 2005 Posts: 65 Location: Austria
|
Posted: Tue Oct 25, 2005 6:55 am Post subject: |
|
|
| ReKleSS wrote: | | The top left pixel of the active texture (or whatever the active texcoord is...) wouldn't happen to be #FF0000 would it? I believe it's applying the texture, but since you didn't specify texcoords, only a single pixel of it is being used, and that's affecting the rest of your drawing. |
Exactly. You win! I figured it out as well but didn't want to update the post again and highlight my stupidity ;) |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|