Sign in to follow this  

r6010 error

This topic is 1953 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

I am encountering an r6010 error.This a runtime error. I am using opengl and c++.I am trying to load a bmp file for texture mapping a quad. Here is the code I am having trouble with.

void initRendering()
{
Image* image = loadBMP("chest.bmp");
_textureId = loadTexture(image);
delete image;
}

let me know if you need addtional code.

Share this post


Link to post
Share on other sites
You'll, uh, need to provide more code. What is loadBMP, what is loadTexture, and what is Image, a class (can we have its definition)? Also, did you ensure it isn't a filesystem problem, e.g. chest.bmp not found because you haven't set the current directory right?

[font=arial,helvetica,sans-serif]The [url="http://www.cplusplus.com/forum/beginner/60565/"]first meaningful google hit[/url] for r6010 error points to an Allegro-related forum question which also has to do with bitmaps. Are you using Allegro? Have you looked at that link? There's also [url="http://www.gamedev.net/topic/623494-error-r6010/"]a Gamedev.net hit[/url] for your question, with precisely the same context, please look at it even if it doesn't have many replies... did you check it out? [/font][font=arial,helvetica,sans-serif]Or perhaps you are following NeHe's tutorials (c.f. loadBMP)? Etc...[/font]

[font=arial,helvetica,sans-serif]Please give additional details, as it is now this is like saying "I have a problem in this code: [font=courier new,courier,monospace]main();[/font] ".[/font]

Share this post


Link to post
Share on other sites
well here is some more code,I think it is a directory problem,but I am unsure of how to fix it.
GLuint loadTexture(Image* image)
{
GLuint textureId;
glGenTextures(1,&textureId);
glBindTexture(GL_TEXTURE_2D,textureId);
glTexImage2D(GL_TEXTURE_2D,
0,
GL_RGB,
image->width, image->height,
0,
GL_RGB,
GL_UNSIGNED_BYTE,
image->pixels);
return textureId;
}

Share this post


Link to post
Share on other sites

This topic is 1953 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this