Sharing texturemap globally with all features...? - Page 4

Sharing texturemap globally with all features...?

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Sharing texturemap globally with all features...?

Post by TradeMark »

i dont need texture repetition. i know what im doing. i just need to finish this s3o exporter >_>

you will see it when its ready :-)

only help i need now is the file format... its not exactly clear to me yet...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Sharing texturemap globally with all features...?

Post by Argh »

Okie doke.

So... let's back up here... you have a bunch of vertex data for a bunch of quads.

So, why convert to S3O at all? That's entirely un-necessary. Simply use Lua, and draw the quads / triangle-strips just like you'd do in your original application, and use a shader to emulate Spring's ARB.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Sharing texturemap globally with all features...?

Post by TradeMark »

the problem is i dont know lua
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Sharing texturemap globally with all features...?

Post by Argh »

You hardly have to know any Lua, other than a few basics, for this kind of thing. I can help point you in the right direction for that part.

If you are already comfortable with OpenGL, then just look at the Lua reference here:

http://springrts.com/wiki/Lua_OpenGL_Api

And write your code. Each building type would be it's own display list, etc.

But basically, you're about to waste a huge amount of time, if you're doing this as an engine modification. For a lazy guy, you're doing this about the hardest way possible, frankly.
Last edited by Argh on 31 Jul 2009, 23:18, edited 1 time in total.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Sharing texturemap globally with all features...?

Post by TradeMark »

besides i hate lua, im not so sure how fast its in rendering... and i dont want to use it yet.

i want first try this way, and if it totally fails, i can try lua :wink:

And write your code. Each building type would be it's own display list, etc.
i already made my own rendering engine for this, using each cube in own display list, and do you know how much it lags?
its better to split them into 8x8 squares and put those into display lists... (actually i put 8x8 quads into display list and render... not 8x8x8)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Sharing texturemap globally with all features...?

Post by Argh »

That's why I referred to building "types". Whether that's multiple buildings in one display list or not is irrelevant.

As for rendering speed... IIRC, you're pretty much making direct function calls to Spring's OpenGL, so it's almost as fast as C++... and it would make the rest of this a lot easier.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Sharing texturemap globally with all features...?

Post by TradeMark »

about the lua drawing, yeah you might call it easy,.. but honestly, i dont know lua, and it will take me a week or two to get used to it.. to know all the possible things i can do wrong etc.

so can you help me in this s3o format ?
i just need to get a clarify on those dwords, are they pointers or wtf.

and those two vars, numVertices and vertexTableSize, they seem to be exactly same values... so whats the point of the second var?
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Sharing texturemap globally with all features...?

Post by Kloot »

I am lazy guy... (lazy guy syndrome includes learning how-to-use some other programs...)
Your laziness does not excuse asking questions that could be answered in 5 minutes if you bothered to read how the engine parses S3O's instead of using other people's time to explain everything to you.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: Sharing texturemap globally with all features...?

Post by TradeMark »

Kloot wrote:
I am lazy guy... (lazy guy syndrome includes learning how-to-use some other programs...)
Your laziness does not excuse asking questions that could be answered in 5 minutes if you bothered to read how the engine parses S3O's instead of using other people's time to explain everything to you.
actually it includes that too... i saw that file before, and decided to not read it since the file format seemed to be simple.

gosh, its just 2 things im asking, not _everything_, why cant you just say what i ask, now i need to waste 2 hours in reading that shit

it probably took you longer time to actually find that file and copypaste it here, than just answer my simple questions >_>
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Sharing texturemap globally with all features...?

Post by smoth »

Argh wrote:Or wait for Smoth to get done with whatever he's doing.
Please leave me out of this
Post Reply

Return to “Engine”