Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (408)
games submitted by our members
Games in WIP (293)
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  
  Pixel Buffers  (Read 1172 times)
0 Members and 1 Guest are viewing this topic.
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Posted 2003-04-03 19:27:43 »

How would one go about creating a pixel cache in VRAM, similar to VolatileImages, in LWJGL? I suppose I could create a texture, but I see two problems with that:

1. Many cards are limited to textures of no larger than 512x512
2. Textures have to be powers of 2. A 640x480 background image for a game would need a texture of 1024x1024.


There is a WGL extention for PixelBuffers, but that only works on Windows. Any ideas?

Java Game Console Project
Last Journal Entry: 12/17/04
Offline Spasi
« Reply #1 - Posted 2003-04-03 21:22:51 »

I don't know what the best approach would be right now (considering platforms other than Windows), but I heard that a standard extension is prepared for OpenGL, that will give pixel buffer functionality in a clean and standard way for all platforms. Don't know when it's gonna be ready though...

Oh, at GDC they announced another standard extension, vertex buffers (the equivalent of NV vertex array range and ATI vertex array object). The new nVidia drivers support this extension already. LWJGL team? When will this be added to the api?
Offline Orangy Tang

JGO Kernel


Medals: 48
Projects: 11


Monkey for a head


« Reply #2 - Posted 2003-04-03 23:02:16 »

Theres an extension for non-power-of-2 textures (GL_NV_texture_rectangle), not sure if theres an ARB or EXT version of it though, maybe ati cards just support it directly..

Other than that, packing lots of data into several large textures would be a better way of doing things. Its been done for ages for lightmap packing etc. so there should be plenty of info.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Games published by our own members! Check 'em out!
Try the Free Demo of Titan Attacks
Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #3 - Posted 2003-04-03 23:28:20 »

Thanks guys. Guess it's back to segmented memory for me. Smiley

Java Game Console Project
Last Journal Entry: 12/17/04
Offline elias

Senior Member





« Reply #4 - Posted 2003-04-04 07:22:16 »

Quote


Oh, at GDC they announced another standard extension, vertex buffers (the equivalent of NV vertex array range and ATI vertex array object). The new nVidia drivers support this extension already. LWJGL team? When will this be added to the api?


We're right on their trails - the extension in question is ARB_vertex_buffer_object and it has been added to lwjgl cvs as of yesterday. In fact, I'm already porting my own vertex buffer code to the new extension as we speak.

EDIT: that is, expect to be able to use it in lwjgl 0.6.

- elias

Offline princec
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


Eh? Who? What? ... Me?


« Reply #5 - Posted 2003-04-04 13:58:18 »

For a background image either use a 512x512 texture and blow it up to the correct size (fastest, easiest way and probably very similar in appearance to 640x480), or use glDrawPixels which blits rectangles straight from client memory. If this memory happens to be in AGP RAM on nvidia cards it's somewhat faster. Make sure it's in the same format as the framebuffer though or it's dreadfully slow.

Cas Smiley

Offline jbanes

JGO Coder


Projects: 1


"Java Games? Incredible! Mr. Incredible, that is!"


« Reply #6 - Posted 2003-04-04 15:10:28 »

Hi Cas,

Thanks for your answer. It just leaves me with one question. How do I get ahold of the AGP memory without using textures?

Java Game Console Project
Last Journal Entry: 12/17/04
Offline elias

Senior Member





« Reply #7 - Posted 2003-05-26 15:58:47 »

FWIW, Pixel Buffers are in cvs now, using WGL_pixel_buffer on win32 and GLX 1.3 pixel buffers on linux. Render to texture through pixel buffers has not yet been implemented, because only a win32 extention exists for now (expecting that to change soon though, GLX_render_to_texture is in the workings).

Expect to see the functionality along with native cursors in 0.7. Hopefully the macosx port will be included too!

- elias

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

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (120 views)
2013-05-17 21:29:12

alaslipknot (128 views)
2013-05-16 21:24:48

gouessej (158 views)
2013-05-16 00:53:38

gouessej (149 views)
2013-05-16 00:17:58

theagentd (163 views)
2013-05-15 15:01:13

theagentd (148 views)
2013-05-15 15:00:54

StreetDoggy (192 views)
2013-05-14 15:56:26

kutucuk (216 views)
2013-05-12 17:10:36

kutucuk (215 views)
2013-05-12 15:36:09

UnluckyDevil (218 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.125 seconds with 20 queries.