Jump to content
  • Advertisement
Sign in to follow this  
thuong

OpenGL Texture show base on driver GFX card

This topic is 4313 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi all, i have problem with show texture use opengl, following is my code: bool CreateTexture() { GLuint TextID; glGenTextures(1, &TextID); //affects an unused name of texture object glBindTexture(GL_TEXTURE_BINDING_RECTANGLE_ARB, TextID); // Pointe la texture glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,GL_TEXTURE_MIN_FILTER,GL_LINEAR); // Linear Filtering glTexParameteri(GL_TEXTURE_RECTANGLE_ARB,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // Linear Filtering // Generate The Texture switch (_Texture.Type) { case TXT_RGB: glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGB, _Texture.Width, _Texture.Height, 0, GL_RGB, GL_UNSIGNED_BYTE, _Texture.Bits); break; } _TextureStruct.ID = TextID; return true; } my GFX card is GeFox 8x, i have problem show above image, if i install correct driver for my GFX card then careating texture good and show it ok, but i remove my driver to default driver is Micorosoft Corporation then i can create texture and show it, anybody know this problem have any way to fix it? how check driver support on opengl? thanks very much,

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure I understand you correctly, but I'm guessing English is not your main language.

Are you saying the following:
With nVidia drivers installed your textures work ok. Without them (so using default windows drivers) textures do not work?

You can use glGetString to get information about the driver.

Quote:

GL_VENDOR
Returns the company responsible for this
GL implementation. This name does not
change from release to release.

GL_RENDERER
Returns the name of the renderer. This
name is typically specific to a
particular configuration of a hardware
platform. It does not change from
release to release.

GL_VERSION
Returns a version or release number.

GL_EXTENSIONS
Returns a space-separated list of
supported extensions to GL.

Share this post


Link to post
Share on other sites
thanks very much,

if Gfx have not support how to render texture rectangle? can you help me?

thanks very much,

Share this post


Link to post
Share on other sites
Quote:
Original post by thuong
thanks very much,

if Gfx have not support how to render texture rectangle? can you help me?

thanks very much,
If the GL_ARB_texture_rectangle extension is not supported then you can't use it. You will have to either resize your image data to power-of-two dimensions before creating a texture, or stuff it into a power-of-two sized texture that is large enough to hold the non-power-of-two image data you have and then change the texture coordinates so that only the part of the texture that contains the image data is rendered.

You also should use GL_TEXTURE_RECTANGLE_ARB in your call to glBindTexture; GL_TEXTURE_BINDING_RECTANGLE_ARB is only used for state queries.

Share this post


Link to post
Share on other sites
Thanks for your helping

i had question i load image with large size(4096 x 4096) when render had white screen, pls help me solve this problem?

Thanks very much

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!