Jump to content

  • Log In with Google      Sign In   
  • Create Account


pixelbuffer? frame? how to call it


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 fir   Members   -  Reputation: -452

Like
0Likes
Like

Posted 11 March 2014 - 03:55 AM

I got a table of unsigneds, here i render things per pixel,

The trouble is if I dad to use it for years I should chose a real

good name for this table, and cannot really decide what name

would be good, I used many: pBits, pixels, pixelbuffer think also about 

frame, target, dont know seen some use real much names for this

 

What name to choose? I thing this better should be shorter than longer 

but also should be good (also need names for its sizes like int pixels_x,

int pixels_y)

 

?

 

some advice?

 



Sponsor:

#2 Olof Hedman   Crossbones+   -  Reputation: 2754

Like
0Likes
Like

Posted 11 March 2014 - 04:28 AM

Not so short, but maybe framebuffer?

 

That is a pretty common name for a buffer you draw into



#3 fir   Members   -  Reputation: -452

Like
0Likes
Like

Posted 11 March 2014 - 04:54 AM

Not so short, but maybe framebuffer?

 

That is a pretty common name for a buffer you draw into

 

I also thinked so, but is such pixelbuffer i mean, a

framebuffer? (does not framebuffer have some other

meaning realted to gpu or something?)

 

also it is somewhat to long, also this 'buffer' is vague 

more plastic would be for example framebitmap,

rawframebits or something

 

as to frame and as to bitmap 

 

this is bitmap but this is not general bitmap but frame

contents (not sure if i can or shuld redesign my framework to 

render to any bitmap then only blit it so framebuffor notion would 

be skipped at all

 

as to frame it has other strong meaning so also im not sure if i could use this (maybe?)

 

recently i was using pixelbuffer name but i am unhappy with it

 

(if someone has some idea better or worse feel free to advice that)



#4 Ravyne   Crossbones+   -  Reputation: 7120

Like
0Likes
Like

Posted 11 March 2014 - 06:31 PM

I wouldn't waste too many cycles over-thinking it.

 

'buffer' is common for refering to a homogeneous block of memory -- if we're talking about an internal name (e.g. a class member variable) then something like that is appropriate. I also sometimes will choose a simple descriptor of what the data is in plural form, like "pixels".

 

If we're talking about a higher-level concept -- for example, a class your app exposes which represents the backing storage for draw operations -- then something like 'framebuffer' that describes it more conceptually is appropriate. In my old software rendering library I originally had Textures (image data sources), and Surfaces (derived from Texture, adding methods to support draw calls), but I realized not long later that the distinction was pretty silly, and the making a single class that was const-correct could serve as both mutable and non-mutable image storage. I also separated the drawing methods from the storage itself.

 

Its been awhile since I looked, but I believe the current state of affairs is that I have 'Surface's that are mutable or imitable depending on whether they are declared const -- those that are const can't be the target of drawing operations, and are loaded with image data through a callback provided at construction, those that are not const can be the target of draw operations or a source of image data.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS