Opengl Error 1281 Glteximage2d
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss
Gltexstorage2d
the workings and policies of this site About Us Learn more about glpixelstorei Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions
Gltexsubimage2d
Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. glgeterror Join them; it only takes a minute: Sign up glTexImage2D throws error 1281 for height or width > 128 pixels up vote 0 down vote favorite I' new to openGL ES 1.0/1.1 programming, and this error's been haunting me for a few days.. I'm trying to init a texture with glTexImage2D, however it always throws a 0x501/1281 error whenever I try creating a POT (power of two) texture with dimensions greater than 128 (either height or width or both). This is the call I'm using. glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, aWidth, aHeight, 0,GL_RGB, GL_UNSIGNED_SHORT_5_6_5, NULL); The whole code goes something like: #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to catch glTexImage2D error when resolution is incompatible? up vote 1 down vote favorite 1 I am trying to catch the error that comes from incompatible image texture resolution in glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, http://stackoverflow.com/questions/6030112/glteximage2d-throws-error-1281-for-height-or-width-128-pixels img->width, img->height, 0, GL_RGB, GL_UNSIGNED_BYTE, imgdata); 1. Compatible resolution, working fine = 1024x1024, 1920x1200, 1920x1080, 704x891 2. Incompatible resolutions, all giving error = 2058x1734, 1018x1280, 591x602, etc. I don't know why glTexImage2D is working fine with #1 resolutions and giving error with #2 resolutions. I couldn't extract the resolution pattern that it follows means that some resolution are working fine and some not. I don't know why. Now the issue is, if user try to create a texture with incompatible resolution http://stackoverflow.com/questions/14001944/how-to-catch-glteximage2d-error-when-resolution-is-incompatible then OpenGL should catch the error and I should get 0 if texture is not created but glTexImage2D is not returning anything so we are unable to make something secure for user OK. "This resolution is not supported, do not use it." But the issue is OpenGL doesn't not catch the glTexImage2D error. During run-time execution cout< Start here for a quick overview of the site Help Center Detailed answers to any questions you might http://gamedev.stackexchange.com/questions/74949/pixel-buffer-object-pbo-does-not-work-correctly have Meta Discuss the workings and policies of this site About http://www.gamedev.net/topic/441627-glteximage2d-converting-to-signed-char/ Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Game Development Questions Tags Users Badges Unanswered Ask Question _ Game Development Stack Exchange is a question and answer site for professional and independent game opengl error developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Pixel Buffer Object (PBO) does not work correctly up vote 0 down vote favorite I've written a very simple OpenGL application. Its opengl error 1281 goal is to load a texture and draw it on a plane using a PBO. If I use the function 'glTexSubImage2D' the plane is not textured and the function 'glGetError' returns the error '1281' (invalid value). However if I use the function 'glTexImage2D' my plane plane is textured correctly (and I have no error). Here's the code for the texture loading : #define OFFSET_BUFFER(offset) ((char*)NULL + offset) void core::RootDevice::LoadTexture(char const *pFileName) { SDL_Surface *pSurface = IMG_Load(pFileName); char *pPixels = reinterpret_cast topic ForumsMembersHelp Files Developer Journals Gallery Calendar Downloads Resources Store Classifieds Tracker Links Home For Beginners Articles All Articles Post an Article Technical Game Programming General Programming Graphics Programming and Theory DirectX and XNA OpenGL and Vulkan Multiplayer and Network Programming Artificial Intelligence Math and Physics Mobile Development Middleware, Libraries, and Tools Virtual and Augmented Reality Creative Game Design Music and Sound Visual Arts Business Breaking into the Industry Production and Management Interviews Business and Law Event Coverage Forums All Forums Technical Game Programming General Programming Graphics Programming and Theory DirectX and XNA OpenGL & Vulkan Multiplayer and Network Programming Artificial Intelligence Math and Physics Mobile & Console Development Build Systems & Source Control Middleware, Libraries, and Tools Virtual and Augmented Reality Creative Game Design Writing For Games Music and Sound Visual Arts Gallery Business Breaking into the Industry Business & Law Production & Management Community GDNet Lounge Coding Horrors Article Writing Comments, Suggestions and Ideas Your Announcements Hobby Project Classifieds Indie Project Showcase Community Developer Journals Gallery Classifieds Jobs Freelancers Hobby Projects GDNet+ Membership Store Marketplace Newsletter » Home » Forums » The Technical Side » OpenGL and Vulkan Chat Watched Content New Content 0 glTexImage2D converting to signed char? Started by CyberSlag5k, Mar 30 2007 08:29 AM Old topic! Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic. You cannot reply to this topic 3 replies to this topic #1