Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Scrolling  (Read 759 times)
0 Members and 1 Guest are viewing this topic.
Offline Mr_Ridd

Senior Newbie




Java games rock!


« Posted 2004-01-20 04:46:44 »

Howzit

What is the best way to do scrolling?

At the moment I use glTranslatef and it works fine, but when I put another object on the screen it doesn't scroll. So what I did then was add/substract the same amount that the ground moves from the model. That works but it looks like the model is moving on the ground.

I'm using

gluPerspective(45.0f, (float) Display.getWidth() / (float) Display.getHeight(), 1.0f, 10000.0f)

for the default view
Offline wiesi

Senior Newbie




Java rulez!


« Reply #1 - Posted 2004-01-20 14:00:25 »

Call glLoadIdentity after you drew the last object and
then call glTranslatef again.

MfG
WiESi
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (4 views)
2014-07-23 12:16:32

Riven (6 views)
2014-07-23 12:07:15

Riven (6 views)
2014-07-23 11:56:16

ctomni231 (40 views)
2014-07-17 21:55:21

Zero Volt (36 views)
2014-07-17 14:47:54

danieldean (30 views)
2014-07-17 14:41:23

MustardPeter (32 views)
2014-07-16 14:30:00

Cero (47 views)
2014-07-15 15:42:17

Riven (48 views)
2014-07-14 09:02:53

OpenGLShaders (38 views)
2014-07-14 07:23:47
HotSpot Options
by dleskov
2014-07-07 18:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-13 15:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-13 15:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 02:13:37

HotSpot Options
by Roquen
2014-05-15 00:59:54

HotSpot Options
by Roquen
2014-05-06 06:03:10

Escape Analysis
by Roquen
2014-04-29 13:16:43

Experimental Toys
by Roquen
2014-04-28 04:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!