Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
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  
  2 jogl questions  (Read 1436 times)
0 Members and 1 Guest are viewing this topic.
Offline kendric

Junior Newbie

« Posted 2007-04-18 13:56:33 »

#1) I want to have fixed position fixed size text in 3d opengl. So basically i wanted to use the raster2i and the glutbitmap text. Is this possible, it seemed like the raster2i only worked in ortho mode and not in 3d mode(my text wouldn't appear on screen in 3d mode)
#2)I want a scrolling background. I had this working in my project in java2d before i ported to jogl, but I can't figure out how to draw a texture directly to screen co-ordinates rather then just mapping it to a quad. If i map it to a quad it doesn't get an absolute position and its very hard to get it to wrap around as the player goes in a straight direction. If i could just somehow paste the image verbatim and then do my 3d rendering that would work. Now that I type this I wonder if i can switch between ortho and 3d mid render...
If anyone has any thoughts I would apreciate it. Thanks.
Offline kendric

Junior Newbie

« Reply #1 - Posted 2007-04-18 15:43:59 »

I figured out why glRasterPos2f wasn't working, It wants 0,0 for the center of the screen, and it looked like -0.5,-0.5 was the bottom left. So i guess my question on this is now, is this arbitrary or is -.5 -.5 the exact bottom left corner such that a picture drawn that was screenwidth,screenheight and having the raster set to -.5 -.5 would fit perfectly on the screen no matter what size the screen was?
Offline kendric

Junior Newbie

« Reply #2 - Posted 2007-04-19 20:35:29 »

Figured out the scrolling background:

Thanks for the help. Incase anyone else wants a moving background, basically what I ended up doing was this:



map texture to quad as follows

Thanks for your help!

Next I have to figure out how to solve the problem that a giant texture like this causes massive slow downs and memory consumption. I could use a smaller one and tile it, but i liked the idea of having distinct things in my background that shouldnt have 4-5 copies on the screen at once.

My current background is 2048x2048(idea being i could have 4 completly unique screens of background they can move through(they move in all cardinal directions))

For the text i believe I can switch to ortho view and then put it back after im done with the text.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

numerical (278 views)
2017-02-21 07:32:16

numerical (276 views)
2017-02-21 07:31:46

theagentd (388 views)
2017-02-18 13:42:33

theagentd (387 views)
2017-02-18 13:35:16

h.pernpeintner (1554 views)
2017-01-24 22:39:11

h.pernpeintner (1541 views)
2017-01-24 22:38:32

Galdo (2106 views)
2017-01-12 13:44:09

Archive (2106 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2642 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2348 views)
2016-12-15 21:50:57
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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‑
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!