Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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  
  direct access to ogl ... or an terrains odysee  (Read 725 times)
0 Members and 1 Guest are viewing this topic.
Offline Goliat

Junior Duke





« Posted 2005-09-23 16:16:40 »

howdy once again ...

i used the last week trying to implement a terrain as descriped in the gamasutra article [ insert link here ... have forgotten my username at gamasutra ... 'll add this when i'm back at my pc ]

i know there is a terrain rendering mechanism in xith ... but i'd like to try and learn doing things myself

so ... now i came across some problems:
the gamasutra mechanism doesn't store any per-vertex data to improve memory usage

what i tried to implement is an instance of GeomDataInterface which is able to return my coords ... but there is no possibiliy to add these to GeomContainer or TriangleArray so i put a setCoordsDataInterface method in GeomContainer ...
i got to the point that i had my coordData on screen ...

but ... oh no ... they were all white and stuff ... so i looked at the source and found out i had to implement several GeomDataInterfaces for coords, normals, texCoords etc ...

so i build a structure which served several GeomDataInterfaces as a data source ( this was in fact a bin tree + linked list structure thingy which i spend a whole day debugging cause i've mixed up some pointers ... :/ )
when this was done ... i was happy ... and tried to run the whole thing ... and ... it didn't work ...

i decided that this wasn't the way of doing this ...

the next thought was to keep the per vertex data once rendered ... which reduced calculation times but had a large hit on memory

i use a NodeUpdater that calles the recursive rendering methods which then put there data into an instance of TriangleArray ( actually into TriangleArray.coords, .texCoords and .normals which are implementations of GeomDataInterface if i remember correctly )

this puts my vertex data into several FloatBufferS which i get initialized which a fixed size ( i don't really understand how this thingys work ... but i believe they reserve the full size in memory which is not desirable in this case )

the introduction on http://xith.org states that  xith is supposed to be able to access the gl calls directly ... i searched through this forum and found this to be not possible without modifying xith's source ...

as i have mentioned in some other posts already i have a lot of spare time at the moment ... so i'll try to fix this ...

if i understand Will's 'explanation of xiths render pipeline' correct a RenderAtom holds all the data necessary to render anything
so i guess the easiest way to let the user pass stuff down the render pipeline would be to implement a Node that holds a predefined RenderAtom which got wrote by the user

implementing this as a Node in the scenegraph gives the user access to some features like Behaviors and/or Updaters that get called through the scenegraph

i don't know if this is all there is to do ... any thoughts on this?
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.

Longarmx (38 views)
2014-10-17 03:59:02

Norakomi (29 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (56 views)
2014-10-14 00:39:48

TehJavaDev (55 views)
2014-10-14 00:35:47

TehJavaDev (46 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
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

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