OpenGL and kInten8/kAInten88

Any Topic

Moderator: OpenUru.org Moderators

Post Reply
Stucuk
Member
Posts: 36
Joined: Mon May 23, 2011 8:22 am

OpenGL and kInten8/kAInten88

Post by Stucuk »

With DelURU the first thing i have been loading from PRP files is the "plMipmaps". What i am wondering is if anyone knows how to load kInten8 and kAInten88 with OpenGL without manualy converting it into GL_RGBA.

When it comes to kRGB8888,kRGB4444,kRGB1555 you can get OpenGL to convert them to GL_RGBA for you by doing the following:

Code: Select all

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, FWidth, FHeight, 0, GL_RGBA, Format, FData);
Where Format is GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_INT_8_8_8_8_REV or GL_UNSIGNED_SHORT_1_5_5_5_REV. But i can't see any which would work with a single colour channel texture or a single colour channel texture with an alpha channel.
Image
-Stu
Christian Walther
Member
Posts: 317
Joined: Sat Dec 13, 2008 10:54 am

Re: OpenGL and kInten8/kAInten88

Post by Christian Walther »

I would guess that something like GL_LUMINANCE and GL_LUMINANCE_ALPHA should do the trick.

The fastest way of reaching someone who can give you a definitive answer (e.g. Branan or Lontahv) is probably [url=irc://irc.guildofwriters.com/%23writers]#writers[/url].

Edit: Or look here.
Stucuk
Member
Posts: 36
Joined: Mon May 23, 2011 8:22 am

Re: OpenGL and kInten8/kAInten88

Post by Stucuk »

Thanks.
Image
-Stu
User avatar
branan
Member
Posts: 84
Joined: Wed Apr 06, 2011 11:35 pm

Re: OpenGL and kInten8/kAInten88

Post by branan »

I was going to point you to my renderer code, but CWalther beat me to it.

Don't hesitate to ask me for help if you run in to any roadblocks with your drawing code. Most Plasma material information is mapped 1:1 with the last-generation fixed function pipelines: texture combiners in OpenGL terms. It makes incredible use of the GPUs from that era, but that makes the whole thing a bit insane, especially if you're more familiar with more modern techniques like shaders. Of course, having the DirectX source to look at should make the implementation many times easier. I was stuck digging through the assembly code to sort out how things worked.
Stucuk
Member
Posts: 36
Joined: Mon May 23, 2011 8:22 am

Re: OpenGL and kInten8/kAInten88

Post by Stucuk »

branan wrote:Don't hesitate to ask me for help if you run in to any roadblocks with your drawing code.
Thanks, i will ask if i get stuck.
branan wrote:especially if you're more familiar with more modern techniques like shaders.
When it comes to "Texture Combiners" i have only ever touched GL_TEXTURE_ENV_MODE. I have used shaders before but i never really got into them (Lack of decent tutorials on the net that i could find. At least ones which work with a GeForce FX). But i do understand how they work and how to code the engine side.... Just lack the knowledge to make any decent shaders.
Image
-Stu
Post Reply

Return to “Open Discussion”