Opengl Error 1281
Contents |
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 opengl error 1281 minecraft this site About Us Learn more about Stack Overflow the company Business Learn opengl error 1281 (invalid value) more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Opengl Error 1281 Glteximage2d
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 OpenGL
Opengl Error 1281 Optifine
glGetError 1281 bad value up vote 5 down vote favorite 1 I am using OpenGL with vertices and shaders, nothing got displayed on my screen so i used glGetError to debug : I got an error 1281(bad value) on one of my buffer called color_array_buffer, here is the section i am talking about : GLenum error = glGetError(); if(error) { cout << error gl errors << endl; return ; } else { cout << "no error yet" << endl; } //no error // Get a handle for our "myTextureSampler" uniform GLuint TextureID = glGetUniformLocation(shaderProgram, "myTextureSampler"); if(!TextureID) cout << "TextureID not found ..." << endl; // Bind our texture in Texture Unit 0 glActiveTexture(GL_TEXTURE0); sf::Texture::bind(texture); // Set our "myTextureSampler" sampler to user Texture Unit 0 glUniform1i(TextureID, 0); // 2nd attribute buffer : UVs GLuint vertexUVID = glGetAttribLocation(shaderProgram, "color"); if(!vertexUVID) cout << "vertexUVID not found ..." << endl; glEnableVertexAttribArray(vertexUVID); glBindBuffer(GL_ARRAY_BUFFER, color_array_buffer); glVertexAttribPointer(vertexUVID, 2, GL_FLOAT, GL_FALSE, 0, 0); error = glGetError(); if(error) { cout << error << endl; return ; } //error 1281 And here is the code where i link my buffer to the array : if (textured) { texture = new sf::Texture(); if(!texture->loadFromFile("textures/simple.jpeg"/*,sf::IntRect(0, 0, 128, 128)*/)) std::cout << "Error loading texture !!" << std::endl; glGenBuffers(1, &color_array_buffer); glBindBuffer(GL_ARRAY_BUFFER, color_array_buffer); glBufferData(GL_ARRAY_BUFFER, uvs.size() * sizeof(glm::vec3), &uvs[0], GL_STATIC_DRAW); } and my values of uvs : uvs[0] : 0.748573-0.750412 uvs[1] : 0.749279-0.501284 uvs[2] : 0.99911-0.501077 uvs[3] : 0.999455-0.75038 uvs[4] : 0.250471-0.500702 uvs[5] : 0.249682-0.749677 uvs[6] : 0.001085-0.75038 uvs[7] : 0.001517-0.499994 uvs[8] : 0.499422-0.500239 uvs[9] : 0.500149-0.750166 uvs[10] : 0.748355-0.99823 uvs[1
4 Reference Pages OpenGL 3.3 Reference Pages OpenGL 2.1 Reference Pages OS/Platform Implementations OpenGL Books Coding Resources OpenGL SDK FAQs Sample Code & Tutorials GLUT & Utility Libraries Programming Language Bindings Benchmarks Mailing Lists
Opengl Error 1281 Gltexsubimage2d
& News Groups Archived Resources Wiki Forums About OpenGL Contact Us OpenGL gluseprogram 1281 logo Advertise on OpenGL Jobs Register Help Remember Me? What's New? Forum New Posts FAQ Calendar Forum Actions Mark Forums opengl error 1282 Read Quick Links Today's Posts View Site Leaders Khronos Forums COLLADA forums OpenGL: Getting Started Advanced Search Forum DEVELOPERS OpenGL coding: beginners OpenGL error 1281 caused by glTexSubImage2D First time visitors, please http://stackoverflow.com/questions/24507571/opengl-glgeterror-1281-bad-value read our FAQ and our Forum Rules and Guidelines. You must register before you can post. Results 1 to 3 of 3 Thread: OpenGL error 1281 caused by glTexSubImage2D Thread Tools Show Printable Version Email this Page… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 01-19-2011,09:41 AM #1 chris_jan View Profile View Forum Posts Private Message Junior Member Newbie Join Date Jan https://www.opengl.org/discussion_boards/showthread.php/173288-OpenGL-error-1281-caused-by-glTexSubImage2D 2011 Posts 18 OpenGL error 1281 caused by glTexSubImage2D I've got a problem with glTexSubImage2D: First I used SDL for Graphics output, but now I use OpenGL (with SDL creating a context). But I still wanted to use for example SDL_ttf. But when I use that code: Code : // This function was already OK when I used SDL SDL_Surface *pFontSurface = Font.RenderTextSurface(sText, TextColor, RenderMode, ShadedBGColor); // This function is used because SDL_ttf returns rendered font in ARGB // This function cannot be the mistake because - when I remove it - it still doesn't work (apart from that it is in the wrong format) pFontSurface = ConvertSDLSurface->ARGB_To_RGBA(pFontSurface); glEnable(GL_TEXTURE_2D); // m_pImage->Texture is the texture the font image should be rendered to (GLuint) glBindTexture(GL_TEXTURE_2D, m_pImage->Texture); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, pFontSurface->w, pFontSurface->h, GL_RGBA, GL_UNSIGNED_BYTE, pFontSurface->pixels); cerr << "OpenGL error: " << glGetError() << endl; SDL_FreeSurface(pFontSurface); glDisable(GL_TEXTURE_2D); cerr prints "OpenGL error: 1281" on the console. The mistake can't be a "glPixelStorei == 4" problem because I create the texture like this: Code : SDL_Surface *pSDLSurface = SDL_CreateRGBSurface(SDL_SWSURFACE | SDL_SRCALPHA, MyMath->power_of_two(GetTextureW()), MyMath->power_of_two(GetTextureH()), 32, #if SDL_BYTEORDER == SDL_BIG_ENDIAN 0xff000000,
JHelioviewer Edit Fix Released High Markus Langenberg Edit You need to log in to change https://bugs.launchpad.net/bugs/657085 this bug's status. Affecting: JHelioviewer Filed here by: Malte Nuhn When: 2010-10-08 Confirmed: 2010-10-11 Assigned: 2010-10-11 Started work: 2010-10-14 Completed: 2010-11-11 Target Distribution Baltix BOSS Juju Charms Collection Elbuntu Guadalinex Guadalinex Edu Kiwi Linux nUbuntu PLD Linux Tilix tuXlab Ubuntu Ubuntu Linaro Evaluation Build Ubuntu RTM Package (Find…) Project (Find…) Status Importance Fix opengl error Released High Assigned to Me Markus Langenberg (markus-langenberg) Comment on this change (optional) Email me about changes to this bug report Also affects project (?) Also affects distribution/package Nominate for series Bug Description In some constellations (seems to somehow depend on the zoom level and the window size), I am able to opengl error 1281 produce very "nasty" OpenGL renderings. When seeing these strange images, I get a lot of OpenGL error messages (I just improved the error message for that to give more detail). It is OpenGL Error "1281", which translates to "Invalid Value". I currently can't provide more information about this. However, I had these problems already every now and then, so I guess it is not related to some recent changes. Add tags Tag help Related branches lp:jhelioviewer lp:~markus-langenberg/jhelioviewer/jhv-markus (Merged) Malte Nuhn (malte.nuhn) wrote on 2010-10-08: #1 Screenshot Edit (788.1 KiB, image/png) Malte Nuhn (malte.nuhn) wrote on 2010-10-08: #2 Download full text (5.8 KiB) I tried to debug the application with "gDEBugger - an OpenGL Debugger and Profiler". Unfortunately it can't debug JAVA applications on a Mac (but on Windows and Linux). So it might be interesting if someone else can reproduce this bug on his non-Mac machine. Here are the details of my machine: //////////////////////////////////////////////////////////// // This