Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (755)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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 1087 times)
0 Members and 1 Guest are viewing this topic.
Offline Goliat

Junior Devvie

« 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 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  

DesertCoockie (52 views)
2018-05-13 18:23:11

nelsongames (83 views)
2018-04-24 18:15:36

nelsongames (74 views)
2018-04-24 18:14:32

ivj94 (758 views)
2018-03-24 14:47:39

ivj94 (87 views)
2018-03-24 14:46:31

ivj94 (643 views)
2018-03-24 14:43:53

Solater (102 views)
2018-03-17 05:04:08

nelsongames (184 views)
2018-03-05 17:56:34

Gornova (426 views)
2018-03-02 22:15:33

buddyBro (1086 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!