Motherboard Forums


Reply
Thread Tools Display Modes

arrays of floats or array of structures for opengl ?

 
 





















Skybuck Flying
Guest
Posts: n/a

 
      10-01-2009, 10:58 AM


Hello,

I am "researching" vertex buffer objects...

I am wondering how to combine positions with texture coordinates.

It seems there are two possibilities:

array of position;
array of texture_coordinate;

or

array of structure;

Which this document shows:

http://www.opengl.org/wiki/Common_Mistakes

The opengl doc mentions "stride".

Confusion would be with the possibility of memory being in system memory or
video memory... the programmer don't know...

Maybe the graphic cards has an internal format for verteces ? Does it use
arrays or does it use structures ?

In other words:

What would be the best memory layout for performance ?

Strides would add gaps... so I am thinking... maybe array of floats is
better ?!?

This is one of those things that must be decided upon perform starting to
code a lot of stuff... because it would require significant code changes in
the future if one has to switch.

For now I am still in experimenting phase

Though even for me doing a benchmark would require extra programming time ?!

Bye,
Skybuck.


 
Reply With Quote
 
Skybuck Flying
Guest
Posts: n/a

 
      10-01-2009, 11:23 AM
This document is nice:

http://www.opengl.org/resources/code...01/perfogl.pdf

It mentions something interesting:

"Depth testing is expensive..."

I am not sure if this includes verteces going out of view or so... in 2d
mode...

Maybe depth testing is not required to make verteces go out of view by the z
value as I was planning to do...

Actually this is probably not an issue at all anymore... since each verteces
will be determined after each round or so ?!

But not completely sure.

So interesting read anyway.

Bye,
Skybuck.


 
Reply With Quote
 
Skybuck Flying
Guest
Posts: n/a

 
      10-01-2009, 11:39 AM
This sux:

"
Once again, for certain architectures, this may be the best format for
specifying geometry. The only way
to know is to conduct a benchmark case
"

Would be nice if opengl/drivers had some hints for the programmer for a
change !

Bye,
Skybuck


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
p5q won't rebuild array Brad P Asus 1 04-24-2009 01:26 AM
RAID 0+1 array disaster. Asus A8V Deluxe. Please someone help. kelendral Asus 1 04-07-2008 12:31 AM
Replacing hard disks in an RAID array Brad P Asus 7 10-12-2007 09:34 PM
New Intel Array Manager for XPS 410/Dimension 9200 Tom Scales Dell 9 06-27-2007 06:46 PM
Rebuilding RAID Array On P4C800 milkmandan Asus 0 03-20-2007 11:28 PM


All times are GMT. The time now is 05:24 AM.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43