Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CreateTextureFromView probs



DOH! And I'm supposed to be this cool GFX programmer. I must've stared at that code for 20+ hours, while I completely failed to actually READ the 4 lines of docs...

Long live midnight coding.

Thanks

Nicholas Francis
www.otee.dk
On Sep 28, 2004, at 9:34 PM, Alex Eddy wrote:


On Sep 28, 2004, at 12:11 PM, Nicholas Francis wrote:
I'm trying to hack render2texture into GooBall, using the NSView
createTexture:FromView:InternalFormat function, but I keep getting an
Invalid enum.

well,

	unsigned long tid;
	glGenTextures(1, &tid);	
	glBindTexture(kRenderTexTarget, tid);
		[MasterOpenGLContext() createTexture: tid fromView: [surfaceWindow
contentView] internalFormat: GL_RGBA];

that's why. the first argument to createTexture: is the target, not a texture id. try kRenderTexTarget instead.




_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.