Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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 1528 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 17: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 19: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: 56
Projects: 11


Monkey for a head


« Reply #2 - Posted 2003-04-03 21: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!
Legends of Yore - The Casual Retro Roguelike
Offline jbanes

JGO Coder


Projects: 1


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


« Reply #3 - Posted 2003-04-03 21: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 Devvie





« Reply #4 - Posted 2003-04-04 05: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

« JGO Spiffy Duke »


Medals: 434
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #5 - Posted 2003-04-04 11: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 13: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 Devvie





« Reply #7 - Posted 2003-05-26 13: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.

 

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

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (21 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (49 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (105 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!