too many projects, too little time, but I have long been thinking redoing Homers terraindemo, but from scratch myway instead and have it structured for dx/gpu works, instead of traditional sort
with BSP/OSP whatever sort used couldnt that be rewritten to be customized to be handling , like texture=textureobject and all its instances is sorted to be rendered at one time, switch to next texture and render that on top of earlier texture, with this overdraw earlier textureobjects can be for example rendered with 'garbage' trianglestrips between two grassplains, which are invisible when rockobject are rendered on top of those garbage strips

Posted on 2006-04-21 12:57:58 by daydreamer

TERRAINSTRUCT struct DWORD
texturenr DWORD ?
blend DWORD ?
meshpointer DWORD ?;to original mesh
level DWORD ? ;lower part in order seabottom,sea,sand,grass,stone,snow , higher part if its ontop of
house/mountain or terrain on higher ground, to render in right order
visible DWORD ? true/false returned by BSP/OSP
x FLOAT ? ;same mountaintop mesh can be translated to several places
y FLOAT ?
z FLOAT ?
TERRAINSTRUCT ends
now sort by level and render all seabottom, blend all sea ontop of that,all sand etc
if higher parts of terrain exist, might be nesserary to render grassplain on higher ground, so run the loop a secondtime
best would be use triangles, not trianglestrips, so each level is only one settexture+one rendercall

just writing an .obj fileimporter, so all objects could be using the same structure and only add a few settexture+rendercalls ontop of terrainrendering
and was thinking of maybe implementing my own .COM interface this way:
init loops thru all calls to initialations of objects
main loops thru all animation/AI calls of objects
cleanup loops thru all cleanup calls of objects

init proc of terrain reads either meshdata or converts terrainmap to customvertex
animation for example changes terrain to show hidden entrances, hole opens up and you fall, river flows etc
cleanup frees up allocated memory and closes files
for example a terraintile which is left behind, no longer visible, gets reused , reading in new terraindata ahead, probably a big terrainmap file is constantly opened

Posted on 2006-07-09 06:57:54 by daydreamer
question, does OA32 have some helpmacros or such for initialize .COM jumptable to all different classes you write yourself?
or I need to write these manually?
Posted on 2006-07-09 07:19:20 by daydreamer
Hi daydreamer
If I understand your question correctly, the VMT (Virtual method Table) of a COM compatible Object of your own is build automatically, so you donít have to worry about it.
You simply have to use InterfaceMethod to put this method in the COM VMT and define an INTERFACE using the macro with the same name to use ICall. In the package are some examples you can see how to use them.

Biterider
Posted on 2006-07-09 10:27:11 by Biterider

Hi daydreamer
If I understand your question correctly, the VMT (Virtual method Table) of a COM compatible Object of your own is build automatically, so you donít have to worry about it.
You simply have to use InterfaceMethod to put this method in the COM VMT and define an INTERFACE using the macro with the same name to use ICall. In the package are some examples you can see how to use them.

Biterider


thanks
I check up on that, right now busy with fileimporter
Posted on 2006-07-09 15:15:09 by daydreamer