realbasic-games
[Top] [All Lists]

Asher's GLTexture Class

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Asher's GLTexture Class
From: Seth Willits <seth at freaksw dot com>
Date: Fri, 19 Nov 2004 21:23:30 -0800
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <6F383A7C-354D-11D9-82F9-000A95A5E76E at freaksw dot com> <9B81AB9C-35C1-11D9-9472-000A95DB6C90 at fireyesoftware dot com> <2E7D14C1-35CB-11D9-AE77-000A95A5E76E at freaksw dot com> <EDE36421-35CD-11D9-9472-000A95DB6C90 at fireyesoftware dot com>
On Nov 13, 2004, at 3:44 PM, Asher Dunn wrote:

Here's a class adapted from my wrappers: <http://www.fireyesoftware.com/opengl/GLTexture.rbo>

Example:

dim tex as new glTexture
tex.loadPicture(somePicture)

tex.create(GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR)

now you can call glBindTexture(tex.handle) to use the texture.


Two things: The bind glBindTExture in create should be right after glGenTexture_RB not at the end of the method, and using both glTexImage2d and gluBuild2DMipmaps is redundant. Using either of them is just fine.

After moving the bind, the class worked great.


Thanks,


Seth Willits
------------------------------------------------------------------------ ---
President and Head Developer of Freak Software - http://www.freaksw.com
REALbasic Guru at ResExcellence - http://www.resexcellence.com/realbasic

"Information is free. Intelligence is a gift."
------------------------------------------------------------------------ ---

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>