Proxy Texture

BlitzMax Forums/BlitzMax OpenGL Programming/Proxy Texture

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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