Re: FxTexture: -textureId returns zero?
Re: FxTexture: -textureId returns zero?
- Subject: Re: FxTexture: -textureId returns zero?
- From: Steve Christensen <email@hidden>
- Date: Mon, 24 Mar 2008 13:12:55 -0700
Thanks for the info, Paul. At least I now know what's going on. I mentioned in replying to Darrin's note that I've filed a couple of bugs, for better documentation and for an initializer that does create a texture. On Mar 24, 2008, at 9:22 AM, Paul Schneider wrote: the FxTexture class has some usability (and documentation!) issues.
Creating an instance of an FxTexture won't actually allocate a GL texture. You'll need to do that yourself, something like this:
GLuint texID = 0; glGenTextures (1, &texID); FxTexture* fxTexture = [[FxTexture alloc] initWithInfo:info andTextureId:texID];
I can understand why you'd think that the default initializer would generate the texture ID for you, but it doesn't work like that. In fact, -initWithInfo:andData: won't do it either.
FxTexture does a pretty bad job of insulating you from GL texturing calls; it's probably easier just to call GL directly when you're managing your own textures.
- Paul
On Mar 24, 2008, at 11:19 AM, Steve Christensen wrote: I'm calling [[FxTexture alloc] initWithInfo:textureInfo] to create a FxTexture, which succeeds. When I then call -textureId, it returns zero. Yet when I call -textureId on the input texture, I get a non-zero value. Am I missing something? The documentation on FxTexture is pretty much non-existent so I don't know what I'm doing wrong or what more I should be doing.
steve
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden