Half Life maps all black
Re: Half Life maps all black
Um?Ghost_Fang wrote:stock GLquake iphone port
Maybe I haven't been paying attention, but there is an iPhone GLQuake port *with source code*?
Anyways, the iPhone uses OpenGL ES and not regular OpenGL. There are some differences.
Maybe that is your problem.
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 ..
I guess I haven't been paying attention...
I guess you posted this in another thread:
http://code.google.com/p/quake1-iphone/source/browse/
Well ... be sure to look at the changes marked "#ifdef ESQUAKE" as that is what the iPhone is going to be using.
When I have more time, I'll see if I can spot anything obvious in particular in what the GL_LoadTexture32 might need to do differently to work.
I guess you posted this in another thread:
http://code.google.com/p/quake1-iphone/source/browse/
Well ... be sure to look at the changes marked "#ifdef ESQUAKE" as that is what the iPhone is going to be using.
When I have more time, I'll see if I can spot anything obvious in particular in what the GL_LoadTexture32 might need to do differently to work.
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 ..
Eh? Well initially it looks like bad news ...
It is using GL_Upload8_EXT and PALETTE8_RGBA8 so it looks you've got a 256 color palette limitation in the port as-is.
It is using GL_Upload8_EXT and PALETTE8_RGBA8 so it looks you've got a 256 color palette limitation in the port as-is.
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 ..
-
- Posts: 336
- Joined: Thu Nov 12, 2009 4:37 am
No, because browsing through this ..Ghost_Fang wrote:would it be too difficult to change it so it doesnt have that limitation?
I see them, #ifdef ESQUAKE. Would i get some terrible results if i just got rid of them or replaced GL ES's texture load method with normal GL texture method?
http://code.google.com/p/quake1-iphone/ ... EAGLView.m
It looks like it is requesting a 8-bit video mode (but it isn't quite clear to me where it is doing this).
Now what you could do is (in theory) is compare and contrast with the Quake 3 port to the iPhone and get it to set, say, a 32 bit video mode.
But then you are going to have mess with a lot of stuff in the iPhone GLQuake gl_draw.c to get it to channel the texture upload process through a 32-bit one.
I say this because I noticed the code is using a *GLOBAL* 256 color palette (it says this in comments) rather than a texture indicated 256 color palette.
Depending on whether or not you want to fight that fight, you might consider a custom 256 color palette and use Q1BSP. There *is* quite a bit you can do with 256 colors.
http://www.youtube.com/watch?v=JfIx7efqvf4
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 ..
-
- Posts: 2126
- Joined: Sat Nov 25, 2006 1:49 pm
I suspect that, if it's using such limited mode, there must be some hardware limitation.Ghost_Fang wrote:would it be too difficult to change it so it doesnt have that limitation?
I see them, #ifdef ESQUAKE. Would i get some terrible results if i just got rid of them or replaced GL ES's texture load method with normal GL texture method?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC (LordHavoc)
There's no global 8bbp palette limitation on the iPhone's OpenGL ES, silly.frag.machine wrote:I suspect that, if it's using such limited mode, there must be some hardware limitation.Ghost_Fang wrote:would it be too difficult to change it so it doesnt have that limitation?
I see them, #ifdef ESQUAKE. Would i get some terrible results if i just got rid of them or replaced GL ES's texture load method with normal GL texture method?
using regular textures instead of paletted textures will work, it'll just cost you 4 times as much memory.
the original glquake paletted textures is buggy.
I may be wrong on this, but GL_EXT_paletted_texture has a separate distinct palette for each texture, there are no shared palettes, you have to upload one for each texture.
WTF? that quake-iphone project uses glCompressedTexImage2D in GL_Upload8_EXT. That's... not right
It uses 5551 or 565 for quake-paletted images.
I suggest you do the same. :)
the original glquake paletted textures is buggy.
I may be wrong on this, but GL_EXT_paletted_texture has a separate distinct palette for each texture, there are no shared palettes, you have to upload one for each texture.
WTF? that quake-iphone project uses glCompressedTexImage2D in GL_Upload8_EXT. That's... not right
It uses 5551 or 565 for quake-paletted images.
I suggest you do the same. :)
http://www.khronos.org/registry/gles/ex ... exture.txt
aha, that's what the GL_Upload8_EXT thing is about.
internalformat = PALETTE8_RGB8_OES
data = palette,mip0,mip1,etc, concatinated without padding
level = (numberofmiplevels-1) * -1 (or 0 if you cba generating mips)
the issue with mip levels will probably result in it looking horrible though, its not really convienient to generate 8bit mips on the fly.
So yeah, just use 565/5551 for your halflife textures (see GL_Upload16).
aha, that's what the GL_Upload8_EXT thing is about.
internalformat = PALETTE8_RGB8_OES
data = palette,mip0,mip1,etc, concatinated without padding
level = (numberofmiplevels-1) * -1 (or 0 if you cba generating mips)
the issue with mip levels will probably result in it looking horrible though, its not really convienient to generate 8bit mips on the fly.
So yeah, just use 565/5551 for your halflife textures (see GL_Upload16).
-
- Posts: 336
- Joined: Thu Nov 12, 2009 4:37 am
I apologize, but after reading all the posts many times, it is still unclear to me what needs to be done (it may be my lack of engine coding knowledge). Maybe there is an alternative to what i want? I did HLBSP for the individual texture palettes for each texture. Baker, when you said "you might consider a custom 256 color palette and use Q1BSP" did you mean make my own 256 color palette or modify Q1bsp so the textures can have their own palette? If making Q1bsp texture have their own palette is easier I'm all for it.
Like i said, im not any good with engine yet and you guys are naming off all these functions and stuff and telling me thats the problem and i have no idea what you guys are trying to tell me and then i look like im retarded or something.
So, recap. Now that some of you did some research, what is the problem and how would i fix it? Or whats my alternative?
Like i said, im not any good with engine yet and you guys are naming off all these functions and stuff and telling me thats the problem and i have no idea what you guys are trying to tell me and then i look like im retarded or something.
So, recap. Now that some of you did some research, what is the problem and how would i fix it? Or whats my alternative?
-
- Posts: 2126
- Joined: Sat Nov 25, 2006 1:49 pm
I guess Baker suggested to you create a custom color palette and stick with the regular Q1BSP format, avoiding the hassle of implementing HL1BSP support. And I second that.Ghost_Fang wrote:I apologize, but after reading all the posts many times, it is still unclear to me what needs to be done (it may be my lack of engine coding knowledge). Maybe there is an alternative to what i want? I did HLBSP for the individual texture palettes for each texture. Baker, when you said "you might consider a custom 256 color palette and use Q1BSP" did you mean make my own 256 color palette or modify Q1bsp so the textures can have their own palette? If making Q1bsp texture have their own palette is easier I'm all for it.
Like i said, im not any good with engine yet and you guys are naming off all these functions and stuff and telling me thats the problem and i have no idea what you guys are trying to tell me and then i look like im retarded or something.
So, recap. Now that some of you did some research, what is the problem and how would i fix it? Or whats my alternative?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC (LordHavoc)
-
- Posts: 336
- Joined: Thu Nov 12, 2009 4:37 am