Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  New Question about the Vertex pointers  (Read 783 times)
0 Members and 1 Guest are viewing this topic.
Offline shadejmg

JGO n00b
*

Posts: 28


Java Rocks!


« on: 2003-08-05 19:59:19 »

First thank you to all who helped me get my vertex pointers working!!!

My question is now about multiple vertex pointers..

lets say i load 2 or more shapes from external files.. I load int via vertex pointers.. ( right now i do this for one )...  is there any trick in doing it for two or more.. ie

do i need to signal that its a new shape?
do i just continue to make vertext pointers after pointers and just call drawarrays when im done.?

Thanks,
JMG

A thousand monkeys on a thousand computers .. typing away randomly .. eventually one will create a great java game! Smiley
Offline pepijnve

Sr. Member
**

Posts: 379
Medals: 1


Java games rock!


« Reply #1 on: 2003-08-06 02:19:58 »

The only thing you need to do is call glVertexPointer with the buffer you actually want to use before you call glDrawArrays.
1  
2  
3  
4  
5  
6  
7  
draw() {
  glVertexPointer(..., buffer1);
  glDrawArrays(...);

  glVertexPointer(..., buffer2);
  glDrawArrays(...);
}

Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.099 seconds with 21 queries.