HLBSP Roadblock
Moderator: InsideQC Admins
7 posts
• Page 1 of 1
HLBSP Roadblock
I decided to port The HLBSP code in Bakers Proquake into my own engine, and I have hurdled most of the problems so far. I am at point where I am stuck however, And I don't have an answer.
There is this function called GL_LoadPalettedTexture. However, when I compile in Cygwin, it will get to the end and all, But at the end it gets an error. First off, Here is the code:
Now the error says:
normal/psp/video_hardware_model.o: In function 'Mod_LoadTextures(lump_t*)';
..psp/video_hardware_model.cpp: 465: undefined reference to 'GL_LoadPalettedTexture'
Collect2: ld returned 1 exit status
make *** [normal/quake.elf] Error 1
But I defined that in the place I was supposed to (video_hardware.cpp)
Any help? And Baker, do I have to do the thing you did with the Old Palette and things? Or can I leave the default.
Thanks
[/quote]
There is this function called GL_LoadPalettedTexture. However, when I compile in Cygwin, it will get to the end and all, But at the end it gets an error. First off, Here is the code:
- Code: Select all
#if 0
tx->gl_texturenum = GL_LoadTexture (mt->name, tx->width, tx->height, (byte *)(tx_pixels), qtrue, GU_LINEAR, level);
#else
if (loadmodel->bspversion == HL_BSPVERSION) {
byte *data;
if ((data = WAD3_LoadTexture(mt)))
{
tx->gl_texturenum = GL_LoadPalettedTexture (mt->name, tx->width, tx->height, (byte *)data, qtrue, GU_LINEAR, level, mt->palette);
mapTextureNameList.push_back(tx->gl_texturenum);
free(mt->palette);
free(data);
continue;
}
}
else
{
//texture_mode = GL_LINEAR_MIPMAP_NEAREST; //_LINEAR;
tx->gl_texturenum = GL_LoadTexture (mt->name, tx->width, tx->height, (byte *)(tx_pixels), qtrue, GU_LINEAR, level);
mapTextureNameList.push_back(tx->gl_texturenum);
}
#endif
Now the error says:
normal/psp/video_hardware_model.o: In function 'Mod_LoadTextures(lump_t*)';
..psp/video_hardware_model.cpp: 465: undefined reference to 'GL_LoadPalettedTexture'
Collect2: ld returned 1 exit status
make *** [normal/quake.elf] Error 1
But I defined that in the place I was supposed to (video_hardware.cpp)
Any help? And Baker, do I have to do the thing you did with the Old Palette and things? Or can I leave the default.
Thanks
[/quote]
-

Mexicouger - Posts: 514
- Joined: Sat May 01, 2010 10:12 pm
Re: HLBSP Roadblock
[/quote]Mexicouger wrote:I decided to port The HLBSP code in Bakers Proquake into my own engine, and I have hurdled most of the problems so far. I am at point where I am stuck however, And I don't have an answer.
There is this function called GL_LoadPalettedTexture. However, when I compile in Cygwin, it will get to the end and all, But at the end it gets an error. First off, Here is the code:
- Code: Select all
#if 0
tx->gl_texturenum = GL_LoadTexture (mt->name, tx->width, tx->height, (byte *)(tx_pixels), qtrue, GU_LINEAR, level);
#else
if (loadmodel->bspversion == HL_BSPVERSION) {
byte *data;
if ((data = WAD3_LoadTexture(mt)))
{
tx->gl_texturenum = GL_LoadPalettedTexture (mt->name, tx->width, tx->height, (byte *)data, qtrue, GU_LINEAR, level, mt->palette);
mapTextureNameList.push_back(tx->gl_texturenum);
free(mt->palette);
free(data);
continue;
}
}
else
{
//texture_mode = GL_LINEAR_MIPMAP_NEAREST; //_LINEAR;
tx->gl_texturenum = GL_LoadTexture (mt->name, tx->width, tx->height, (byte *)(tx_pixels), qtrue, GU_LINEAR, level);
mapTextureNameList.push_back(tx->gl_texturenum);
}
#endif
Now the error says:
normal/psp/video_hardware_model.o: In function 'Mod_LoadTextures(lump_t*)';
..psp/video_hardware_model.cpp: 465: undefined reference to 'GL_LoadPalettedTexture'
Collect2: ld returned 1 exit status
make *** [normal/quake.elf] Error 1
But I defined that in the place I was supposed to (video_hardware.cpp)
Any help? And Baker, do I have to do the thing you did with the Old Palette and things? Or can I leave the default.
Thanks
I have a target date of when I want to get the next version of ProQuake out and I have a lot to do to meet this deadline (Christmas, obviously) with the stuff I have done.
That being said, I can explain the error ... the "GL_LoadPalettedTexture" is being called and you do not have it your source code. Do a search in my source code locating all instances with something like TextPad and then do a search in yours --- you don't have the function in your source.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
The HLBSP code is directly from Proquake psp. And I have that function defined in Video_hardware_draw.cpp, as well as hardware-video.h(Where the other functions are like this)
-

Mexicouger - Posts: 514
- Joined: Sat May 01, 2010 10:12 pm
Alright, I have finished HLBSP. It is in my engine, however, I can see why I need DXT texture compression. My framerate is 24 frames slower(I have a testing spot), and that is in a regular map
-

Mexicouger - Posts: 514
- Joined: Sat May 01, 2010 10:12 pm
The DXT compression is for the most part to save RAM, hence compression, although obviously uploading data to the GU takes less time if there is less of it, but the performance difference isn't all that great- at least with me comparing it from paletted 8-bit -> DXT1 compression. You'd be doing from upsampled 32-bit -> DXT1 compression, so I'm not sure how big the difference is between those two.
-

Downsider - Posts: 621
- Joined: Tue Sep 16, 2008 1:35 am
I have seemed to encounter a problem. Whenever a sprite is drawn to the screen, it totally locks up and freezes. I have been searching through the places I have been in the code, and i haven't changed sprites at all. The sprites are correctly scaled, but it still freezes. Can't find the problem for the life of me
EDIT: Not too sure what I did, but Sprites now load in regular maps, but not HLBSP maps
EDIT: Not too sure what I did, but Sprites now load in regular maps, but not HLBSP maps
-

Mexicouger - Posts: 514
- Joined: Sat May 01, 2010 10:12 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest