LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 08-30-2004, 08:29 PM   #1
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 540

Rep: Reputation: 32
Texture matrix transforms on on multi texture?


Is it possible to do an eqiv' "set matrix to texture matrix" and use glRotate glScale and glTranslate when using multitexturing? I mean, is it possible to do such transformations on each different layer in multitexturing?

thanks in advance
 
Old 08-30-2004, 10:22 PM   #2
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 31
I haven't done much with multitexturing myself, but looking at the spec it says that there is a matrix for each texture unit. It sounds like the texture matrix that is affected by matrix operations depends on which unit is selected by glActiveTextureARB... so I'm assuming you could do something like so:

Code:
glActiveTextureARB(TEXTURE0_ARB);
glMatrixMode(GL_TEXTURE);
// do transformations for TEXTURE0_ARB's stack

glActiveTextureARB(TEXTURE1_ARB);
glMatrixMode(GL_TEXTURE);  // Not sure if this is necessary, but wouldn't hurt
// do transformations for TEXTURE1_ARB's stack
Note: I'm reading this from an old spec I printed out long ago, and since the multitexturing is part of the core OpenGL 1.2 functions, the ARB extensions probably aren't necesarily needed anymore...
 
Old 08-31-2004, 10:36 PM   #3
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 540

Original Poster
Rep: Reputation: 32
Thanks. I'll try that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Flickering Texture tariqzi Linux - Hardware 0 10-24-2005 03:28 AM
How to render a window to a GL texture SilverEagle Programming 1 03-20-2005 10:03 AM
DDS texture Loading BenRichards Programming 0 11-04-2004 02:37 PM
OpenGL texture matrix rotation The_Nerd Programming 3 09-03-2004 02:11 PM
extracting and creating .wad texture files qwijibow Linux - Software 7 01-12-2004 03:24 PM


All times are GMT -5. The time now is 10:11 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration