Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075927 Posts in 44152 Topics- by 36120 Members - Latest Member: Royalhandstudios

December 29, 2014, 03:55:25 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)OpenGL Models in their own classes (LWJGL)
Pages: [1]
Print
Author Topic: OpenGL Models in their own classes (LWJGL)  (Read 460 times)
thatredant
Level 0
***


if(post.create){ thatredant.reply; }


View Profile Email
« on: November 19, 2011, 08:24:44 AM »

Hi, all! In a little prototype of an FPS thing I'm working on, I have a single cube on the screen, which I can move around. This one quad is added onto the screen in a single class. This main class has both the ground and the cube set up on it. I want to set these up on seperate classes, and I want to add different models on different classes, as well. Any idea how to do this? I'm a noob with OpenGL and LWJGL, so if I could have some help. ;P
Logged

Working on a resource-gathering realtime roguelike!

Netsu
Level 10
*****


proficient at just chillin'


View Profile WWW
« Reply #1 on: November 19, 2011, 08:45:55 AM »

Create a class that has properties like position, orientation, size etc. and give it a draw() method.
Then when you draw it use it's position and other info needed to display it properly.
Logged

thatredant
Level 0
***


if(post.create){ thatredant.reply; }


View Profile Email
« Reply #2 on: November 19, 2011, 09:55:51 AM »

Thanks! Smiley
Logged

Working on a resource-gathering realtime roguelike!

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic