Skip to main content
GameDev.net gamedev.net
🔒 Locked

SIS Mirage 3 graphics card compatible driver

Started by vandana123 Sep 27, 2007 at 12:40 AM 13 replies 11.4k views
Original Post
vandana123
vandana123
Hi, I am facing problem to create compressed texture using OpenGL function with only SIS Mirage 3 graphics card on the Vista machine Hardware and Software configuration are given below in detail: 1) I am using SIS Mirage 3 graphics card driver version 7.14.10.5053. 2) OpenGL version is defined in my application as #define GL_VERSION_1_2 1 #define GL_VERSION_1_3 1 3) And creting compressed texture using glTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_ARB, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_BYTE, TextureImage[0]->data); function. 4) BMP image is used of size 512,512. This function is working fine with graphics cards other than SIS Mirage 3; With SIS Mirage 3 on Vista machine, this function returns GL_INVALID_ENUM value. There is no problem on Vista machine with Intel Graphics card
vibe3d
vibe3d
u posted this on an nvidia forum too!

1) - Double check your gpu supports this extension
2) - Look up error codes and usage here Official Documentation

vandana123
vandana123
Hi ,
i dont know how to check GPU support for extendsion, can you please let me know in detail and what do you mean by "double check"?
vibe3d
vibe3d
how are you loading extensions in your app? ...are you manually loading them? ...using glew or glee?

What i mean is you must check if your gpu actually supports GL_ARB_texture_compression before using any functions from this extension.

If you are still not sure what i mean i suggest you do a search in google for opengl extensions.

vibe3d
vibe3d
i think you need to calm down on the double posting too, not only is this in an nvidia forum (i have no idea what sis has to do with nvidia) but i just noticed you posted this same question twice in here and it was answered.

You will end up getting no help if you continure posting like this.
vandana123
vandana123
extension loading process is given below:

#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
#define GL_COMPRESSED_RGB_ARB 0x84ED

GLint nNoOfFormat;
GLint nGenaricFormat;
//Get no for compression supported by the card
glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB,&nNoOfFormat);

//Get generic compression format
glGetIntegerv(GL_COMPRESSED_TEXTURE_FORMATS_ARB,&nGenaricFormat);

if(!nGenaricFormat)
{
// Error handler
//Free Image buffer
if (TextureImage[0])
{
// If Texture Image Exists
if (TextureImage[0]->data)
{
// Free The Texture Image Memory
free(TextureImage[0]->data);
}
// Free The Image Structure
free(TextureImage[0]);
}

m_bIsTextureCompressed = FALSE;

return;

}


glTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_ARB,
TextureImage[0]->sizeX,
TextureImage[0]->sizeY, 0,
GL_RGB, GL_BYTE,
TextureImage[0]->data);


// Here checking for velue returned by the above function
dwErrorCode = glGetError();

if(dwErrorCode != 0)
{
// Displaying error message
}
vandana123
vandana123
I am new in these types of forum, i dont think it matters if i am not getting any specific solution of my problem and i post on different forums.

i posted this problem twice, but if you go thorugh this you will come to know i have updated my problem, ealier i had insisting on Vista but in new thread i had insisting on SIS driver.

this is a particular hardware related problem so i posted it on many places beacused i am not getting answer of it.

vibe3d
vibe3d
i would highly recommend using an extension loading library such as glee or glew (you will not have todo all these manual defines that you are doing)

now using glee here is an example on how to check for the support you want

if (!GLEE_ARB_texture_compression)
{
//O Bugger, your GPU and or drivers DO NOT support ARB Texture Compression
}

if you are manually loading extensions you will have to check with

glGetString(GL_EXTENSIONS) which will return back all the opengl extensions currently supported by your driver.

If you do indeed have support for texture compression and it still ain't working

1) - Current opengl drivers could be buggy (wouldn't be suprised since it is sis)
2) - Your format could be wrong
_the_phantom_
_the_phantom_
Quote:
Original post by vandana123
I am new in these types of forum, i dont think it matters if i am not getting any specific solution of my problem and i post on different forums.

i posted this problem twice, but if you go thorugh this you will come to know i have updated my problem, ealier i had insisting on Vista but in new thread i had insisting on SIS driver.

this is a particular hardware related problem so i posted it on many places beacused i am not getting answer of it.


The root of the problem is still the same; texture compression isn't working on a perticular card.

Please keep that in mind in future when posting questions, even if one minor aspect changes the details should still be kept in one thread. And in this case the other thread in question gave you the correct answers based on the limited information given.
V-man
V-man
Quote:
Original post by vibe3d
i think you need to calm down on the double posting too, not only is this in an nvidia forum (i have no idea what sis has to do with nvidia) but i just noticed you posted this same question twice in here and it was answered.

You will end up getting no help if you continure posting like this.


You means the forums at http://developer.nvidia.com/forums/index.php?showforum=6

or is there a nvidia forum on gamedev?
vibe3d
vibe3d
yeah the forums over at forums.nvidia.com (not the developer forums though) and TechSpot forums too but i ain't trying to crucify the lad.
vandana123
vandana123
Vibe,
I am doing the same using glGetString and this is supposted by OpenGL.

As far as the question is using Glee and Glew i heared this name first time, i am loading Extensions API using getProcAddress.
steps are given below:

1)Initializing extension API;first of all getting all extension using glGetString supposted by OpenGL.

I checked that compressed extension is supported, then for compressed texture
calling lglGetProcAddress function for "glCompressedTexImage3DARB","glCompressedTexImage2DARB","glCompressedTexImage1DARB","glCompressedTexSubImage3DARB","glCompressedTexSubImage2DARB","glCompressedTexSubImage1DARB","glGetCompressedTexImageARB" APIs.

2) Checking for ARB_texture_compression extension which is retrieved; if this is supported then checking for OpenGL version which is 1.2.

3) Doing memoryset for texture image.
4) Opening bitmap file.
5) calling these functions as i mentioned earlier
//Get no for compression supported by the card
glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB,&nNoOfFormat);

//Get generic compression format
glGetIntegerv(GL_COMPRESSED_TEXTURE_FORMATS_ARB,&nGenaricFormat);

6) finally calling
glTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_ARB,
TextureImage[0]->sizeX,
TextureImage[0]->sizeY, 0,
GL_RGB, GL_BYTE,
TextureImage[0]->data);

when i am getting error code after this function using dwErrorCode = glGetError(); API, returns GL_INVALID_ENUM only with this card.

i already checked with format of it, please let me know any specific format if you know about it.

vibe3d
vibe3d
does it work when you are not using texture compression?

try changing the GL_COMPRESSED_RGB_ARB to just GL_RGB and see what happens.

Also try changing type to GL_UNSIGNED_BYTE and let me know what happens
vibe3d
vibe3d
o yeah one other thing i forgot to mention

this is taken from the official spec

"Generic compressed internal formats are not actual image formats, but are instead mapped into one of the specific compressed formats provided by the GL (or to an uncompressed base internal format if no appropriate compressed format is available)"

so you may want to check if your gpu supports something like s3tc or any other compression format.

Although this should not give you the error you are getting, as the spec says it should fall back to an uncompressed format if it can't find any compression algo's to use but as said many times before, it is SIS so anything could happen ;-)

If your exact code is working on other GPU's i think it is safe to assume it is indeed an SIS driver problem.
vandana123
vandana123
exactly it is workig on other place using the same function but creating compressed image its not working on SIS mirage 3.

one another thing i just checked it out, it is giving uncertain result, now glGenTextures function is getting failed with SIS Mirage 3 graphics card; i have not done any change to the previous code but other function is failed.

actually i am calling glGetError(); function to get dword value of returned code and checking like if(dwErrorCode != 0) to display error.


why am i getting these uncertain results?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.