Author Topic: oldschool 2d and opengl  (Read 22783 times)

0 Members and 1 Guest are viewing this topic.

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: oldschool 2d and opengl
« Reply #40 on: December 16, 2007 »
@rel yep thats a great way. i used it to do ogl sin waved text in a couple of my demos.

the only thing is that its quite slow even using gltexsubimage2d for updating the vram. i think personaly that shaders are the way to go for oldskool stuff as they give you the speed and they are more apropriet for 3d hardware in real time.

although they are tricky to learn.
Challenge Trophies Won:

Offline stormbringer

  • Time moves by fast, no second chance
  • Amiga 1200
  • ****
  • Posts: 453
  • Karma: 73
    • View Profile
    • www.retro-remakes.net
Re: oldschool 2d and opengl
« Reply #41 on: December 16, 2007 »
@ninogenio: I tend to disagree, it depends on what you do. As long as the texture in VRAM has the same format as the memory region you want to upload, it's really fast.

and shaders for old-school demos/intros/etc... well, yes but there are simpler ways too. None of my remakes use shaders or gl extensions to simulate the Amiga's copper.
We once had a passion
It all seemed so right
So young and so eager
No end in sight
But now we are prisoners
In our own hearts
Nothing seems real
It's all torn apart

Offline ninogenio

  • Pentium
  • *****
  • Posts: 1668
  • Karma: 133
    • View Profile
Re: oldschool 2d and opengl
« Reply #42 on: December 16, 2007 »
well yes your right stormbringer,

for say a single full screen vram buffer emulating a ptc viewport. gltexsub2dimage is pretty fast although in my own test marginally slower than ptc but what i mean when i say its a bit slow is eg..

a cube with 6 difrrent double bufferd textures, each texture at 512x512 and diffrent effects going off on each texture then this methode is slow in comparison with shaders.

at the end of the day any vmem,sysmem poking is slow thats why i say shaders are better for this stuff but..

i guess it all comes down to prefrence if your good with shaders and your app is too slow with glteximage then use them or else use teximage.
« Last Edit: December 16, 2007 by ninogenio »
Challenge Trophies Won:

Offline stormbringer

  • Time moves by fast, no second chance
  • Amiga 1200
  • ****
  • Posts: 453
  • Karma: 73
    • View Profile
    • www.retro-remakes.net
Re: oldschool 2d and opengl
« Reply #43 on: December 16, 2007 »
it really depends on what you want to do. it's clear that shaders are the best in terms of performance. But as you mentioned old-schoold effects, not all of them need shaders and some good C code with in-memory drawing can be quite fast as well. I'm not using any framework like PTC, so I always write appropriate code for the effects. This way I can keep control on what I do.

One example I can thing of that would be better with shaders is stencil vectors..
We once had a passion
It all seemed so right
So young and so eager
No end in sight
But now we are prisoners
In our own hearts
Nothing seems real
It's all torn apart

Offline relsoft

  • DBF Aficionado
  • ******
  • Posts: 3303
  • Karma: 47
    • View Profile
Re: oldschool 2d and opengl
« Reply #44 on: December 17, 2007 »
@rel yep thats a great way. i used it to do ogl sin waved text in a couple of my demos.

the only thing is that its quite slow even using gltexsubimage2d for updating the vram. i think personaly that shaders are the way to go for oldskool stuff as they give you the speed and they are more apropriet for 3d hardware in real time.

although they are tricky to learn.

However, not all cards have shader capabilities. Even the WII is still FFP.
Challenge Trophies Won: