|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OpenEQ::Development Development discussion for OpenEQ. Do not post for support. |
11-28-2004, 05:20 AM
|
Hill Giant
|
|
Join Date: Mar 2003
Location: UK
Posts: 242
|
|
I got it to ignore items 212 and 213 in the list, both of which caused problems and now I get this :
Which is big progress but missing all the placable items.
I like your mouse control by the way.... Got to get that working on mine
|
11-28-2004, 05:24 AM
|
Discordant
|
|
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
|
|
Ok, first things first, comment out line 127 of draw.cpp (glEnable(GL_CULL_FACE)) as it causes walls to disappear on new-style zones (fucking sony doesn't organize their vertices properly lol)
Second, it's quite possible I broke placeable objects, and I'm checking into it now. I've been changing the draw code a lot while playing with the octree, so it's _highly_ probable I did something stupid
I'll update you in a moment.
|
11-28-2004, 05:27 AM
|
Discordant
|
|
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
|
|
Ok, placeable objects work (well, as much as they've ever worked in OpenEQ lol) here.
I wonder if your video card doesn't support OpenGL display lists or something simple like that...
What video card are you using?
|
11-28-2004, 05:32 AM
|
Hill Giant
|
|
Join Date: Mar 2003
Location: UK
Posts: 242
|
|
I'm using a Geforce FX9500XT which does support display lists for sure. I'll try it on my laptop (Radeon mobility 9800) and see if it works on there.
|
11-28-2004, 05:35 AM
|
Discordant
|
|
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
|
|
Quote:
Originally Posted by jbb
I'm using a Geforce FX9500XT which does support display lists for sure. I'll try it on my laptop (Radeon mobility 9800) and see if it works on there.
|
Lol, yea, I'd say so... I was kinda worried that you were using an ANCIENT (it'd have to be to not support display lists in opengl) card for dev, but instead you beat the shit out of my card, a measly geforce 4 mx440 Lol.
Anyway, hopefully it won't work on the radeon... it's a lot harder to debug hardware-specific bugs
|
11-28-2004, 05:44 AM
|
Hill Giant
|
|
Join Date: Mar 2003
Location: UK
Posts: 242
|
|
No, doesn't work on the laptop either.
Well, that's to say it does work in exactly the same way.
I'll do a bit of debugging. Looks like a windows portability issue maybe.
|
11-28-2004, 05:58 AM
|
Hill Giant
|
|
Join Date: Mar 2003
Location: UK
Posts: 242
|
|
From Draw::InitLists
Code:
this->model_lists = new GLuint[this->model_data->model_count];
for(j = 0; j < this->model_data->model_count; ++j) {
glNewList(this->model_lists[j], GL_COMPILE);
This looks suspect to me.
glNewList's first paramater is an integer 'name' you pass in to tell it which display list to use. But you're passing in an uninitialized value as far as I can tell. Also my reference implies that you need to use glGenLists to reserve the "names" you want to use for your display lists (And says that it might work if you dont but won't be reliable on all hardware/driver combinations)
Unless I've missed something.
|
11-28-2004, 06:02 AM
|
Discordant
|
|
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
|
|
Quote:
Originally Posted by jbb
From Draw::InitLists
Code:
this->model_lists = new GLuint[this->model_data->model_count];
for(j = 0; j < this->model_data->model_count; ++j) {
glNewList(this->model_lists[j], GL_COMPILE);
This looks suspect to me.
glNewList's first paramater is an integer 'name' you pass in to tell it which display list to use. But you're passing in an uninitialized value as far as I can tell. Also my reference implies that you need to use glGenLists to reserve the "names" you want to use for your display lists (And says that it might work if you dont but won't be reliable on all hardware/driver combinations)
Unless I've missed something.
|
Ack... I forgot all about that...
Add this->model_lists[j] = glGenLists(1); before the glNewList() line.
I rewrote that code at 4am yesterday and I kinda looked over that... thanks
|
|
|
|
11-28-2004, 06:05 AM
|
Hill Giant
|
|
Join Date: Mar 2003
Location: UK
Posts: 242
|
|
I also changed it to say
Code:
for(j = 0; j < this->model_data->model_count; ++j) {
model_lists[j] = j;
glNewList(this->model_lists[j], GL_COMPILE);
and now I get the placable objects. Although they are all in the wrong places
Now I can look at the actual problem you were having... After I've eaten my pizza!
|
11-28-2004, 06:08 AM
|
Discordant
|
|
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
|
|
Quote:
Originally Posted by jbb
I also changed it to say
Code:
for(j = 0; j < this->model_data->model_count; ++j) {
model_lists[j] = j;
glNewList(this->model_lists[j], GL_COMPILE);
and now I get the placable objects. Although they are all in the wrong places
Now I can look at the actual problem you were having... After I've eaten my pizza!
|
Fantastic
I do suggest, however, that you use glGenLists() as it could cause problems with some things if you don't.
Either way, thanks for taking a look... hopefully you'll find something hehe
|
11-28-2004, 06:50 AM
|
Hill Giant
|
|
Join Date: Mar 2003
Location: UK
Posts: 242
|
|
Unless I'm mistaken you're drawing the main zone object in a different way from the placable objects and not taking into account that the main zone object may also be rotated. I seem to have a rotation on my main zone object too in my renderer, maybe that's the difference unless I've missed something in your code.
I'll try to "hack" in a quick additional rotation to undo the rotation of the main object to confirm that theory.
|
11-28-2004, 07:01 AM
|
Hill Giant
|
|
Join Date: Mar 2003
Location: UK
Posts: 242
|
|
Er, no sorry. My renderer also ignores the rotation on the main object too.
|
11-28-2004, 07:35 AM
|
Hill Giant
|
|
Join Date: Mar 2003
Location: UK
Posts: 242
|
|
I'm well confused now.
The good news is that I've stepped through your code and my code with a breakpoint on the code which draws each object and the (x, y, z) and (rx, ry, rz) is identical in every case. You're trying to draw *exactly* the same thing right down to the low level drawing code.
The bad news is that it looks right on mine and wrong on yours still.
The only thing I can think of is that opengl has a right handed coordinate system and direct 3d a left handed (by default). Maybe it's something to do with that.
My brain hurts now so I'm taking a break.
|
|
|
|
11-28-2004, 07:38 AM
|
Discordant
|
|
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
|
|
Quote:
Originally Posted by jbb
I'm well confused now.
The good news is that I've stepped through your code and my code with a breakpoint on the code which draws each object and the (x, y, z) and (rx, ry, rz) is identical in every case. You're trying to draw *exactly* the same thing right down to the low level drawing code.
The bad news is that it looks right on mine and wrong on yours still.
The only thing I can think of is that opengl has a right handed coordinate system and direct 3d a left handed (by default). Maybe it's something to do with that.
My brain hurts now so I'm taking a break.
|
Well, at least we now know that there's nothing completely off-the-wall happening here
Thanks for giving it a shot and giving me some confirmation that I'm not doing something horrendously stupid
I'll look into a bit more later today, but right now I'm trying to finish frustum culling... it's not cooperating lol
|
|
|
|
11-28-2004, 10:38 AM
|
Hill Giant
|
|
Join Date: Mar 2003
Location: UK
Posts: 242
|
|
Will look at this again when I've had some more sleep.
I must be missing something obvious.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 03:18 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|