Author Topic: OldSkool Effects with Opengl  (Read 3190 times)

0 Members and 1 Guest are viewing this topic.

Offline energy

  • Amiga 1200
  • ****
  • Posts: 280
  • Karma: 25
    • View Profile
OldSkool Effects with Opengl
« on: December 15, 2007 »
Hello to all!
I started using OpenGL this time and want to ask to share and explain some codings for Oldskool effects with OPENGL
like scrollers etc....
Jim posted some examples for copperbars, but i think only in 2D Mode...
How to use all effects mixed with 2D/3D mode?

Cheers and thanks in advance
eNeRGy

coding: jwasm,masm
hobby: www.scd2003.de

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: OldSkool Effects with Opengl
« Reply #1 on: December 15, 2007 »
Quote
How to use all effects mixed with 2D/3D mode?
Just switching from orthographic mode to perspective mode and vice versa.

orthographic mode:
Code: [Select]
glViewport(0, 0, 800, 600);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0f, 800, 600,0.0f);

perspective mode:
Code: [Select]
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(45.0f,800.0f/600.0f,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

Challenge Trophies Won:

Offline energy

  • Amiga 1200
  • ****
  • Posts: 280
  • Karma: 25
    • View Profile
Re: OldSkool Effects with Opengl
« Reply #2 on: December 15, 2007 »
Thanks RBraz !  :-*
coding: jwasm,masm
hobby: www.scd2003.de