• Advertisement
Sign in to follow this  

r6010 error

This topic is 2025 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
Advertisement
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 first meaningful google hit 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 a Gamedev.net hit 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
I have tried compiling the original source code I got on videotutorialsrock.com under the texture lesson.I am still getting the same r6010 error.

Share this post


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

  • Advertisement