Thread: [Plib-devel] desperate plea for help
Brought to you by:
sjbaker
From: Curtis L. O. <cu...@in...> - 2000-03-04 03:23:58
Attachments:
tux.tar.gz
|
Ok, I've been beating my brains on this for the last 48 hours and I'm about ready to give up (except I can't, so I keep bashing my head on it.) I'm hoping that some kind soul will have pity on me and help me out. I'm sure I'm doing something stupid someplace, but for the life of me I can find out what that is. My ultimate goal is to build a nice generic sky with sun, moon, stars, haze at the horizon, etc. all within the structure of ssg. I'm doing this for the FlightGear project, but I'm hoping that when I'm done this could be a quick easy drop in for others who want to add a decent/realistic sky quickly to their ssg-based projects. (with the possibility of having all the astronomical objects placed correctly for time and view position.) Every one needs this because even indoor worlds have windows, right? :-) I'm a good ways along with this effort, but I've hit a problem with texturing. I've tried to boil this problem down to an example that is as simple as I can get it. What I've done is try to build a simple object (square), texture it with the "wood.rgb" texture for now, and add it into the sky in the plib "tux" example program. I'm attaching my changes to the "tux" example program (from the plib_examples-1.1.8 distribution). It's about 4k compressed (4 small files) so hopefully I'm not blatantly violating list ettiquete. This includes a replacement Makefile.am, a replacement tux_example.cxx and two new files: skysun.cxx and skysun.hxx. Just untar this over top the examples/ssg/tux directory and you should be able to build it. You should see a wood textured square in the sky, but you don't. This is the problem. Instead, you'll see a solid white square in the sky. If anyone can tell me why the texture isn't getting applied and what I can change to make this work, I will owe you a virtual beer ... no make that a virtual 6 pack. By tomorrow I may be handing out first born sons. I'm guessing this problem is centered around a screwed up opengl state configuration, but I'm stuck ... I've tried everything I can think of. The worst part is that I've gotten all kinds of texturing to work in the FlightGear project ... I just can't get it to work in this simple example. Help! Curt. -- Curtis Olson University of MN, ME Dept. Flight Gear Project Twin Cities cu...@me... cu...@fl... Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org |
From: Norman V. <nh...@ca...> - 2000-03-04 06:10:40
|
Curtis L. Olson writes: > >Ok, I've been beating my brains on this for the last 48 hours and I'm >about ready to give up (except I can't, so I keep bashing my head on >it.) I'm hoping that some kind soul will have pity on me and help me >out. Ouch that has gotta hurt. Since the grandmaster is out of ear shot I'll do my best :). > >I'm sure I'm doing something stupid someplace, but for the life of me >I can find out what that is. Try moving the current_sun.initialize(); call to someplace after ssgInit(); like the end of BTW You should look into using the new ssgContext class. Hope this helps you get some sleep :) Norman |
From: Curtis L. O. <cu...@in...> - 2000-03-04 20:05:11
|
Norman Vine writes: > Curtis L. Olson writes: > > > >Ok, I've been beating my brains on this for the last 48 hours and I'm > >about ready to give up (except I can't, so I keep bashing my head on > >it.) I'm hoping that some kind soul will have pity on me and help me > >out. > > Ouch that has gotta hurt. > Since the grandmaster is out of ear shot > I'll do my best :). > > > > >I'm sure I'm doing something stupid someplace, but for the life of me > >I can find out what that is. > > Try moving the current_sun.initialize(); call > to someplace after ssgInit(); > like the end of Ahh, yes that helped tons ... thanks! > BTW > You should look into using the new ssgContext class. > > Hope this helps you get some sleep :) Ok ... I'll take a look at that. Regards, Curt. -- Curtis Olson University of MN, ME Dept. Flight Gear Project Twin Cities cu...@me... cu...@fl... Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org |
From: Dave M. <dp...@ef...> - 2000-03-04 19:33:48
|
Curt wrote: >My ultimate goal is to build a nice generic sky with sun, moon, stars, >haze at the horizon, etc. all within the structure of ssg. I'm doing >this for the FlightGear project, but I'm hoping that when I'm done >this could be a quick easy drop in for others who want to add a >decent/realistic sky quickly to their ssg-based projects. (with the >possibility of having all the astronomical objects placed correctly >for time and view position.) Every one needs this because even indoor >worlds have windows, right? :-) I'm a good ways along with this >effort, but I've hit a problem with texturing. a worthy goal. indeed, a clean solution would be of interest to everyone. perhaps you should get it all working using straight glut/opengl first and then integrate with ssg so you keep it simple until it works. the best tutorial on creating skyboxes can be found at http://www.gamasutra.com/features/visual_arts/19981023/skybox_01.htm also, i saw that crystal space http://crystal.linuxgames.com just added some skybox code they claim works --mcdave |
From: Curtis L. O. <cu...@in...> - 2000-03-04 20:10:40
|
Dave McClurg writes: > a worthy goal. indeed, a clean solution would be of interest to > everyone. perhaps you should get it all working using straight > glut/opengl first and then integrate with ssg so you keep it simple > until it works. Actually it is all pretty much working with hand crafted opengl. My problem is struggling with ssg and state handling ... or maybe mixing ssg's state handling with random hard coded state changes sprinkled throughout the code. This is what I'm trying to clean up. > the best tutorial on creating skyboxes can be found at > http://www.gamasutra.com/features/visual_arts/19981023/skybox_01.htm > > also, i saw that crystal space http://crystal.linuxgames.com just added > some skybox code they claim works Right now I'm implimenting a sky dome (this is for a flight simulator.) But it would be interesting to add a skybox option sometime as well. Regards, Curt. -- Curtis Olson University of MN, ME Dept. Flight Gear Project Twin Cities cu...@me... cu...@fl... Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org |
From: Steve B. <sjb...@ai...> - 2000-03-18 13:34:25
|
"Curtis L. Olson" wrote: > Right now I'm implimenting a sky dome (this is for a flight > simulator.) But it would be interesting to add a skybox option > sometime as well. This sounds like a way cool thing that ought to be distributed with PLIB somehow since a large fraction of SSG programs must need this kind of thing. For example, my Tux game 'draws' the sky with a simple screen clear - it would be cool if it could have clouds and stars and stuff too - but not cool enough to make me want to go out and write the code to do it! If there were a simple couple-of-lines setup command to build a sky and then a one line per-frame update command, it would be something I could imagine nearly everyone using. It seems somehow wrong to bloat the SSG core library with this kind of thing - perhaps an SSG utility library is needed to collect such useful things. I've been having thoughts of playing with other handy 'utility' modules such as the movement/collision code in Tux_AQFH. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |