01-02-2005, 02:27 PM
Well, I figured out what I was doing wrong...
I was doing this...
But, it should have been this...
So, it works now.
Do you have an example of loading an Sdl_Surface into an Ogl Texture variable Texture(Width,Height,2)? I still can't get that to work right.
:roll:
EDIT:
Here's the code I tried to stick an Sdl_Surface onto an Ogl texture var with...
Texture() is ubyte
image1 is Sdl_Surface ptr
I was doing this...
Code:
Type LightType
R as Single
G as Single
B as Single
A as Single
End Type
Dim Light_Ambient as LightType
But, it should have been this...
Code:
Dim Light_Ambient(3) as Single
So, it works now.
Do you have an example of loading an Sdl_Surface into an Ogl Texture variable Texture(Width,Height,2)? I still can't get that to work right.
:roll:
EDIT:
Here's the code I tried to stick an Sdl_Surface onto an Ogl texture var with...
Texture() is ubyte
image1 is Sdl_Surface ptr
Code:
glEnable Gl_Texture_2D
glBindTexture(GL_TEXTURE_2D, Texture(0,0,0))
glTexImage2D(GL_TEXTURE_2D, 0, 3, imagew-1, imageh-1, 0, GL_RGB, GL_UNSIGNED_BYTE, image1)