Questions for Jenova (from IRC Channel) - Ref LibGL

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
strider
Posts: 10
Joined: Mon Jul 12, 2004 4:40 am

Questions for Jenova (from IRC Channel) - Ref LibGL

Post by strider »

Jenova,

Sorry I missed you, following are the questions I had. I can't get back onto the IRC channel this morning, for some reason, to follow up. I'm hoping you get this.

1) I am having problems getting textures to work properly in libgl. Scanning the library there seems to be extensive code supporting textures so I don't know if I'm doing something wrong. Can you give any insight.

2) Possibly related to (1), your demonstration did not come with any Makefile so I had to make one up. Its possible I got this wrong and its causing a problem (though I did get demo to run properly). Do you have a good Makefile, or perhaps some additional demos to work from.

3) LibGL seems very comprehensive in its OpenGL function support. Having not been able to exercise it much due to (1) and (2) can you give me any idea how far along libgl is in its functionality versus standard OpenGL 1.1? Are there key areas still under development or unstable that I should avoid?

Thanks in advance!

Strider
jenova0
Posts: 2
Joined: Thu May 06, 2004 6:26 am
Location: Toronto, ON, CA
Contact:

Post by jenova0 »

i'm not sure why the texture mapping is not working for you at all in the version of LIBGL you have. i currently rebuilt LIBGL from the ground up and am currently working on the vertex programs for including textures. if you're around tonite we can work on testing. and this version uses Makefiles so much easier.
strider
Posts: 10
Joined: Mon Jul 12, 2004 4:40 am

Post by strider »

Jenova,

Thanks for the response. I will try to be around tonight, but am on the West coast so might be a little late. Will get on as soon as possible after work.

The experience I get when compiling with textures (bear in mind the Makefile I have may be in error as it was manually constructed) is that the surface simply goes dark blue. Originally I thought there was a mapping anomaly for the texture as my texture was dark blue, but after swapping out textures the behavior remained consistent.

On a single pass of the code I got a wierd barely perceivable artifact on the surface which might have matched a pattern in the texture, but I only saw this on a single version of the test code (since lost) . At this stage I thought there might be a color/texture wash causing the problem, but was not able to replicate again.

Just a few additional notes on my testing, I utilized multiple textures, most early testing was based on the bmp2c loading of textures, and as a last resort I constructed my own single pixel texture to eliminate any possible mapping or formatting possibilities. All of the texturing attempts were performed against the cube in your cube and pyramid sample.

The work in this area was performed almost a month ago so it will take me a few minutes to get everything back up and compileable. The inability to access IRC during the lock-down delayed my contacting you.

Thanks again for the help and see you tonight.

Strider
mharris
Posts: 155
Joined: Sun Jan 25, 2004 2:26 pm
Location: Annapolis, MD, USA

Post by mharris »

strider wrote:On a single pass of the code I got a wierd barely perceivable artifact on the surface which might have matched a pattern in the texture, but I only saw this on a single version of the test code (since lost) . At this stage I thought there might be a color/texture wash causing the problem, but was not able to replicate again.
Is it possible that you're using the wrong color mapping for your texture?

E.g., instead of RGBA_8_8_8_8 you're providing RGB_4_4_4 (I forget all the actual OpenGL constant names, but I think you know where I'm going with this). In other words, you're telling GL that you're stuffing one format in, but instead you're providing a different one. Especially if it's tinged towards the blue end -- in RGB, blue is in the least-significant bits, and the upper ones would be all zeros.

Or you're using one of the color index modes but not setting the palette correctly?

Just some things that popped into my head, you've probably checked all this out already...
strider
Posts: 10
Joined: Mon Jul 12, 2004 4:40 am

Post by strider »

Thanks for the feedback and sorry it took so long to get back to you. I can confirm after both visual review and technical re-check that the the color mapping is correct. I'm using single byte color values and using RGBA pattern colors. I've also tested in RGB mode just to eliminate any possible problems with the Alpha channel.

In a fairly exhaustive check I built a Windows/PS2 capable file (based on a published example) that I was able to compile to both platforms (with the obvious screen initialization differences). I've been using this to test a series of adjustments to the options and in every case the texture simply refuses to show up on the PS2 version but works fine on the Windows version.

I was able to definitively eliminate the color as being related to the texture after some additional testing.

I will post this sample file for additional comments and review, but I have to work out one unrelated compiler anomaly that will just be annoying to anyone attempting to use this code.

Thanks again,

Strider
strider
Posts: 10
Joined: Mon Jul 12, 2004 4:40 am

Post by strider »

Jenova,

Also wanted to apologize for not being able to hook up due to my schedule. As mentioned in my previous message, I should have some test code for you in a couple of days that I can send back for your review. I based the code on NeHe's lesson six as it was a published sample involving a simple cube and composed of a single file. I extended this sample so that it was compatible with the PS2 to make side by side comparisons easier.

Thanks again,

Strider
Post Reply