Proxy Texture
BlitzMax Forums/OpenGL Module/Proxy Texture
| ||
I'am try to use GLAdjustTexSize ...SuperStrict Framework Brl.GLGraphics Global Width : Int Global Height : Int Graphics(640, 480) Width = 512 Height = 512 GLAdjustTexSize(Width, Height) EndGraphics() End The result is "Unable to calculate tex size". So I try it self... Framework Brl.GLGraphics Global Width : Int Global Height : Int Graphics(640, 480) glTexImage2D(GL_PROXY_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, Null) DebugLog glGetError() glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, Varptr(Width)) DebugLog glGetError() glGetTexLevelParameteriv(GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, Varptr(Height)) DebugLog glGetError() DebugLog Width DebugLog Height EndGraphics() End glTexImage2D produce the error code 1282 -> 0x502 -> GL_INVALID_OPERATION GL_INVALID_OPERATION is generated if glTexImage2D is executed between the execution of glBegin and the corresponding execution of glEnd. GL_INVALID_OPERATION is generated if type is one of GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, or GL_UNSIGNED_SHORT_5_6_5_REV and format is not GL_RGB. GL_INVALID_OPERATION is generated if type is one of GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV and format is neither GL_RGBA nor GL_BGRA. So whats the problem? cu olli |
| ||
replace graphics with glgraphics |
| ||
Yes, sorry, GLGraphics, but same problem. cu olli |
| ||
Mustn't textures be smaller than the opengl context IE in this case a maximum of 256x256 as this is the largest smaller square PoT size? |
| ||
No :) |
| ||
Not even in OpenGL 1.2 on which the commands you use are fixed? ;-) |
| ||
on my system it didnt work with graphics but glgraphics did work. you could try setting the gldriver as default see if that helps... basically ensure that opengl is initialised and working |