0

I am trying to draw to a 1D texture that is longer than the max view-port dimensions(2^16 units long at present). It is bound to a frame-buffer and set as the render target(depth). Is there a way I can draw to the whole texture without splitting it into multiple draw calls or making the texture 2D?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Dast99
  • 35
  • 1
  • 7
  • This QA could be useful: http://stackoverflow.com/questions/25551457/texture-mapping-using-a-1d-texture-with-opengl-4-x – vcp Mar 23 '16 at 08:45
  • 2
    a 1D texture is limited to 16K (because beyond that you start to get sub-texel precision issues when fetching from it). So you'll have to move to 2D to get beyond that. What are you trying to achieve? – Bahbar Mar 23 '16 at 09:33
  • @Bahbar the limit is platform dependent. – Andreas Mar 28 '16 at 14:34
  • @Andreas It is. My main point stands though. The reason the limit is never beyond 16k is one of floating point precision primarily. If you know of one going beyond, I'd like to hear which. – Bahbar Mar 28 '16 at 19:49
  • @Bahbar I don't know of any platform supporting it. But the standard itself does not prohibit it. And the reason is not really floating point precision. It is because of the market not demanding it and vendors find it cheaper not to. Cheaper because calculations require less precision, yes, but it is not impossible. – Andreas Mar 28 '16 at 20:14
  • Hi, thanks for the feedback, I don't really mind using 2D textures if it is the only way, its just that using a 1D texture is one less coordinate needed, my question is can I create one larger than the maximum viewport dimensions (16K) and if so is there a way to render to it in one call using a framebuffer? – Dast99 Mar 28 '16 at 22:38
  • @Dast99 and the response is "no". Hence why I've asked what you are trying to achieve, to get you better ideas on how to go 2D (In particular, rendering to 1D is in itself somewhat uncommon, hence the question). – Bahbar Mar 29 '16 at 06:59
  • Hi sorry for the delayed reply, what I am trying to do is create a buffer of depths, created from an arbitrary number points at random locations and depth. However, the size I'm aiming for is tens of thousands of points, which, if I have to have two unsigned int coordinates will result in a massive memory cost, as such I would like to have it 1D to minimize this. if it is not possible my 2D implementation will have to suffice. – Dast99 Mar 30 '16 at 07:05

0 Answers0